/* Self-hosted fonts (local, no external font CDN — DSGVO) */
@font-face { font-family:"Inter"; font-style:normal; font-weight:400; font-display:swap; src:url("/static/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:500; font-display:swap; src:url("/static/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:600; font-display:swap; src:url("/static/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:700; font-display:swap; src:url("/static/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family:"Instrument Serif"; font-style:normal; font-weight:400; font-display:swap; src:url("/static/fonts/instrument-serif-400.woff2") format("woff2"); }
@font-face { font-family:"Instrument Serif"; font-style:italic; font-weight:400; font-display:swap; src:url("/static/fonts/instrument-serif-400i.woff2") format("woff2"); }
@font-face { font-family:"General Sans"; font-style:normal; font-weight:400; font-display:swap; src:url("/static/fonts/general-sans-400.woff2") format("woff2"); }
@font-face { font-family:"General Sans"; font-style:normal; font-weight:500; font-display:swap; src:url("/static/fonts/general-sans-500.woff2") format("woff2"); }
@font-face { font-family:"General Sans"; font-style:normal; font-weight:600; font-display:swap; src:url("/static/fonts/general-sans-600.woff2") format("woff2"); }
@font-face { font-family:"General Sans"; font-style:normal; font-weight:700; font-display:swap; src:url("/static/fonts/general-sans-700.woff2") format("woff2"); }
:root {
  --radius: 16px; --radius-sm: 10px; --rule-w: 1px;
  --serif: "Instrument Serif", "Iowan Old Style", "Charter", Georgia, serif;
  --display: "General Sans", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(16,32,24,.04), 0 1px 3px rgba(16,32,24,.05);
  --shadow-md: 0 4px 14px rgba(16,32,24,.06), 0 2px 6px rgba(16,32,24,.04);
  --shadow-lg: 0 24px 60px rgba(16,32,24,.14), 0 8px 24px rgba(16,32,24,.08);
}
/* Light is the default & primary look */
:root, [data-theme="light"] {
  --bg:#f3f4f6; --bg-soft:#ffffff; --bg-tint:#eef0f3;
  --fg:#15201a; --fg-mid:#475249; --fg-dim:#8a958c;
  --accent:#16a34a; --accent-strong:#15803d; --accent-soft:#dcfce7; --accent-fg:#ffffff;
  --rule:#e5e7eb; --rule-soft:#eef0f3;
}
[data-theme="dark"] {
  --bg:#0c1310; --bg-soft:#121b16; --bg-tint:#15201a;
  --fg:#e7efe9; --fg-mid:#a7b5ab; --fg-dim:#6f7d74;
  --accent:#22c55e; --accent-strong:#4ade80; --accent-soft:#14241a; --accent-fg:#071009;
  --rule:#1e2a23; --rule-soft:#16201a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:#0c1310; --bg-soft:#121b16; --bg-tint:#15201a;
    --fg:#e7efe9; --fg-mid:#a7b5ab; --fg-dim:#6f7d74;
    --accent:#22c55e; --accent-strong:#4ade80; --accent-soft:#14241a; --accent-fg:#071009;
    --rule:#1e2a23; --rule-soft:#16201a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow-md: 0 6px 20px rgba(0,0,0,.35);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--sans);
  margin: 0; padding-top: 52px; line-height: 1.6; font-size: 17px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .25s ease, color .25s ease;
  position: relative; min-height: 100vh;
}
/* Flat single-colour background (gradients/vignette removed) */
::selection { background: var(--accent-soft); color: var(--fg); }

/* ── Topbar ── */
.topstack { position: fixed; top: 0; left: 0; right: 0; z-index: 20; }
.topbar {
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: var(--rule-w) solid var(--rule);
}
.topbar-inner {
  max-width: 1040px; margin: 0 auto; padding: .85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.topbar-left { display: inline-flex; align-items: center; gap: .85rem; }
.hamburger {
  appearance: none; background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  border-radius: 10px; width: 38px; height: 38px; cursor: pointer; padding: 0;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-shadow: var(--shadow-sm); transition: border-color .15s ease, background .15s ease;
}
.hamburger:hover { border-color: var(--accent); }
.hamburger span { display: block; width: 17px; height: 2px; background: var(--fg-mid); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.brand {
  font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: .01em;
  color: var(--fg); text-decoration: none; display: inline-flex; align-items: center;
}
.brand-ai { color: var(--accent); }
.theme-toggle { display: inline-flex; align-items: center; border: var(--rule-w) solid var(--rule); border-radius: 999px; padding: 3px; background: var(--bg-soft); box-shadow: var(--shadow-sm); }
.topbar-right { display: inline-flex; align-items: center; gap: .7rem; }
.sidebar-theme { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: var(--rule-w) solid var(--rule-soft); }
.puls-quicklink {
  display: inline-flex; align-items: center; gap: .5rem;
  appearance: none; cursor: pointer;
  font-family: var(--sans); font-size: .82rem; font-weight: 600; color: var(--fg);
  background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  border-radius: 999px; padding: .4rem .9rem; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.puls-quicklink:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); }
.puls-quicklink .pq-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent);
  animation: pqblip 1.8s ease-out infinite;
}
@keyframes pqblip {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.theme-toggle button { appearance: none; background: transparent; border: 0; width: 30px; height: 30px; border-radius: 999px; cursor: pointer; color: var(--fg-dim); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; transition: color .15s ease, background .15s ease; }
.theme-toggle button:hover { color: var(--fg); }
.theme-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }

/* ── Hero ── */
.hero {
  max-width: 1040px; margin: 0 auto;
  padding: 4rem 1.5rem 2.5rem;
}
.hero .eyebrow {
  font-family: var(--sans); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .18em; color: var(--accent-strong);
  margin: 0 0 1rem; display: inline-flex; align-items: center; gap: .5rem;
}
.hero .eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.hero h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem); line-height: 1.06;
  letter-spacing: -.02em; margin: 0 0 .9rem; max-width: 16ch;
}
.hero h1 em { font-style: normal; color: var(--accent-strong); }
.hero p { margin: 0; color: var(--fg-mid); font-size: 1.08rem; max-width: 46ch; }

/* ── Layout ── */
.container {
  max-width: 1040px; margin: 0 auto;
  padding: 1rem 1.5rem 6rem;
}
main { min-width: 0; }

/* ── Sidebar as off-canvas drawer (both mobile & desktop) ── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 320px; max-width: 86vw;
  background: var(--bg-soft); border-right: var(--rule-w) solid var(--rule);
  box-shadow: var(--shadow-lg); z-index: 1300;
  padding: 1.5rem 1.4rem; overflow-y: auto;
  transform: translateX(-100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.sidebar.open { transform: translateX(0); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.sidebar-head .section-label { margin: 0; }
.sidebar-close {
  appearance: none; background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  width: 32px; height: 32px; border-radius: 50%; font-size: 1.15rem; line-height: 1;
  color: var(--fg-mid); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s ease, background .15s ease, transform .18s ease;
}
.sidebar-close:hover { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); transform: rotate(90deg); }
.sidebar-overlay {
  position: fixed; inset: 0; background: color-mix(in oklab, var(--fg) 35%, transparent);
  backdrop-filter: blur(2px); z-index: 1250; opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.sidebar-overlay.open { opacity: 1; visibility: visible; }
.sidebar-foot {
  margin-top: 1.5rem; padding-top: 1.25rem; border-top: var(--rule-w) solid var(--rule);
  display: flex; flex-direction: column; gap: .6rem;
}
.sidebar-foot a {
  font-family: var(--sans); font-size: .82rem; font-weight: 500;
  color: var(--fg-mid); text-decoration: none;
  transition: color .15s ease;
}
.sidebar-foot a:hover { color: var(--accent-strong); }

/* ── Search ── */
form.search { margin: 0 0 1.75rem; }
form.search .input-wrap { position: relative; }
form.search .input-wrap::before {
  content: ""; position: absolute; left: .95rem; top: 50%; width: 15px; height: 15px;
  transform: translateY(-50%);
  background: var(--fg-dim);
  -webkit-mask: no-repeat center / contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>');
  mask: no-repeat center / contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>');
}
form.search input[type="text"] {
  width: 100%; padding: .72rem .9rem .72rem 2.4rem; background: var(--bg-soft); color: var(--fg);
  border: var(--rule-w) solid var(--rule); border-radius: 999px; font-family: var(--sans); font-size: .9rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
form.search input[type="text"]::placeholder { color: var(--fg-dim); }
form.search input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ── Facets ── */
.facet-group { margin-bottom: 1.75rem; }
.newsticker { display: flex; align-items: stretch; height: 30px; background: var(--bg-tint); border-bottom: var(--rule-w) solid var(--rule); overflow: hidden; font-family: var(--sans); }
.tk-label { flex: 0 0 auto; display: flex; align-items: center; gap: .4rem; padding: 0 .9rem; background: var(--accent); color: var(--accent-fg); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; }
.tk-viewport { flex: 1 1 auto; overflow: hidden; position: relative; }
.tk-track { display: inline-flex; align-items: center; height: 30px; white-space: nowrap; will-change: transform; animation: tk-scroll 120s linear infinite; }
.newsticker:hover .tk-track { animation-play-state: paused; }
.tk-item { display: inline-block; padding: 0 .15rem; font-size: .8rem; color: var(--fg-mid); text-decoration: none; cursor: pointer; transition: color .15s; }
.tk-item:hover { color: var(--accent-strong); }
.tk-sep { display: inline-block; padding: 0 .9rem; color: var(--accent); font-size: .7rem; }
@keyframes tk-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tk-track { animation: none; } .tk-viewport { overflow-x: auto; } }
.section-label { font-family: var(--sans); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--fg-dim); margin: 0 0 .7rem; }
.facets {
  display: flex; flex-wrap: nowrap; gap: .4rem;
  overflow-x: auto; padding-bottom: .4rem;
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
  -webkit-overflow-scrolling: touch;
}
.facets::-webkit-scrollbar { height: 5px; }
.facets::-webkit-scrollbar-track { background: transparent; }
.facets::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 999px; }
.facets .facet { flex: 0 0 auto; white-space: nowrap; }
.facets-wrap { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
.facet {
  font-family: var(--sans); color: var(--fg-mid); text-decoration: none;
  padding: .32rem .72rem; background: var(--bg-soft);
  border: var(--rule-w) solid var(--rule); border-radius: 999px;
  font-size: .8rem; font-weight: 500; display: inline-flex; align-items: center; gap: .35rem;
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .12s ease;
}
.facet:hover { color: var(--fg); border-color: var(--accent); transform: translateY(-1px); }
.facet.active { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); box-shadow: var(--shadow-sm); }
.facet .count { color: var(--fg-dim); font-size: .7rem; font-variant-numeric: tabular-nums; }
.facet.active .count { color: var(--accent-fg); opacity: .8; }

/* ── Date groups ── */
.date-group { margin-bottom: 2.5rem; }
.date-group h3 {
  font-family: var(--sans); font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--fg-dim);
  margin: 0 0 1rem; display: flex; align-items: center; gap: .6rem;
}
.date-group h3::after { content: ""; flex: 1; height: var(--rule-w); background: var(--rule); }
.date-group h3 .grp-count {
  color: var(--fg-dim); font-size: .74rem; font-weight: 600;
  font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0;
}

/* ── Day pager ── */
.day-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 1.2rem -1.5rem .5rem; padding: .7rem 1.5rem .55rem;
  border-top: var(--rule-w) solid var(--rule);
  position: sticky; top: var(--topstack-h, 0px); z-index: 15;
  background: var(--bg); border-bottom: var(--rule-w) solid var(--rule-soft);
}
.day-nav button {
  appearance: none; background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  border-radius: 999px; padding: .4rem .9rem; cursor: pointer;
  font-family: var(--sans); font-size: .85rem; font-weight: 600; color: var(--fg-mid);
  display: inline-flex; align-items: center; gap: .4rem;
  box-shadow: var(--shadow-sm);
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .12s ease;
}
.day-nav button:hover:not(:disabled) { color: var(--fg); border-color: var(--accent); transform: translateY(-1px); }
.day-nav button:disabled { opacity: .35; cursor: default; }
.day-nav button.day-hidden { visibility: hidden; }
.day-nav .day-current {
  font-family: var(--sans); font-size: .95rem; font-weight: 700; color: var(--accent-strong);
  font-variant-numeric: tabular-nums; text-align: center; line-height: 1.15;
}
.day-nav .day-current .day-pos { display: block; font-size: .72rem; font-weight: 500; color: var(--fg-dim); margin-top: .1rem; }

/* ── Article cards ── */
.article-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.article-item { margin: 0; }
.article-btn {
  --card-accent: var(--accent); --card-tint: var(--bg-soft);
  appearance: none;
  background: var(--bg-soft);
  border: var(--rule-w) solid var(--rule); border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.1rem 1.35rem; width: 100%; text-align: left; cursor: pointer;
  font-family: var(--sans); box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.article-btn::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--card-accent); opacity: .85; transform: scaleY(1);
  transition: opacity .18s ease, width .18s ease;
}
.article-btn:hover, .article-btn:focus-visible {
  border-color: color-mix(in oklab, var(--card-accent) 45%, var(--rule));
  box-shadow: var(--shadow-md); transform: translateY(-2px); outline: none;
}
.article-btn:hover::before, .article-btn:focus-visible::before { opacity: 1; width: 5px; }
.article-btn .title {
  font-family: var(--display); font-weight: 500; font-size: 1.18rem; color: var(--fg);
  margin: 0 0 .9rem; line-height: 1.3; letter-spacing: -.01em;
}
.article-btn .card-foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .75rem;
  font-family: var(--sans); font-size: .76rem; color: var(--fg-dim);
}
.article-btn .card-foot .src { font-weight: 500; }
.article-btn .card-foot .src-filter {
  font-size: .72rem; font-weight: 600; font-family: var(--sans);
  padding: .15rem .5rem; border-radius: 4px;
  background: var(--bg-card-alt, color-mix(in oklab, var(--bg-card) 80%, var(--fg)));
  cursor: pointer; transition: background .12s ease;
}
.article-btn:not(:focus-visible) .card-foot .src-filter:hover {
  background: var(--accent-soft);
}
.article-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.new-badge {
  font-family: var(--sans); font-size: .65rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-strong);
  border: 1px solid var(--accent-strong); border-radius: 3px;
  padding: .1rem .35rem; margin-left: .5rem; vertical-align: middle;
}
.article-btn .card-foot .src-wrap { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.article-btn .card-foot .also {
  color: var(--accent-strong); background: var(--accent-soft);
  padding: .08rem .5rem; border-radius: 999px; font-size: .68rem; font-weight: 600;
}
.article-btn .card-foot .date { font-variant-numeric: tabular-nums; flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.article-btn .card-foot .date .date-span { font-size: .72em; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.article-btn .tagrow {
  margin-top: .85rem; padding-top: .8rem;
  border-top: var(--rule-w) solid var(--rule-soft);
  display: flex; flex-wrap: wrap; gap: 1rem;
  font-family: var(--sans); font-size: .72rem; font-weight: 500; color: var(--fg-mid);
}
.article-btn .tag-seg {
  display: inline-flex; align-items: center; gap: .4rem;
  white-space: nowrap;
}
.article-btn .tag-seg .dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
}
.empty { color: var(--fg-dim); font-style: italic; padding: 4rem 1rem; text-align: center; font-family: var(--serif); font-size: 1.2rem; }

/* ── Footer ── */
footer { text-align: center; color: var(--fg-dim); font-family: var(--sans); font-size: .78rem; padding: 2.5rem 1.5rem 3.5rem; border-top: var(--rule-w) solid var(--rule); }
footer a { color: var(--accent-strong); text-decoration: none; font-weight: 500; }
footer .disclaimer { max-width: 56ch; margin: 0 auto 1rem; line-height: 1.6; color: var(--fg-dim); }
footer p { margin: 0 auto; }
footer .footer-links { margin-top: .5rem; }

/* ── Modal ── */
.modal { position: fixed; inset: 0; background: color-mix(in oklab, var(--fg) 45%, transparent); display: none; align-items: flex-start; justify-content: center; z-index: 1000; padding: 1.5rem 1rem; overflow-y: auto; backdrop-filter: blur(3px); }

.modal.open { display: flex; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal-close {
  position: fixed; top: 1.25rem; right: 1.25rem;
  appearance: none; background: var(--bg-soft);
  border: var(--rule-w) solid var(--rule);
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 1.25rem; line-height: 1;
  color: var(--fg-mid); cursor: pointer; z-index: 1200;
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .18s ease;
}
.modal-close:hover { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); transform: rotate(90deg) scale(1.05); }
.modal-back {
  position: fixed; top: 1.25rem; right: 1.25rem;
  appearance: none; background: var(--bg-soft);
  border: var(--rule-w) solid var(--rule);
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 1.1rem; line-height: 1;
  color: var(--fg-mid); cursor: pointer; z-index: 1400;
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .18s ease;
}
.modal-back:hover { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); transform: scale(1.05); }
.modal-secondary {
  z-index: 1300;
}
.modal-content {
  background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  border-radius: 22px; width: 100%; max-width: 740px; position: relative; margin: 0 auto;
  box-shadow: var(--shadow-lg); overflow: hidden;
  display: flex; flex-direction: column;
  animation: pop .22s cubic-bezier(.2,.8,.3,1);
}
.modal-scroll { overflow-y: auto; flex: 1; max-height: calc(100vh - 5rem); }
.modal-header {
  padding: 1.7rem 2.4rem 1.2rem;
  background: linear-gradient(180deg, color-mix(in oklab, var(--card-tint, var(--bg-tint)) 80%, var(--bg-soft)), var(--bg-soft));
  border-bottom: var(--rule-w) solid var(--rule);
  position: relative;
}
.modal-header::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: var(--card-accent, var(--accent));
}
.modal-header h2 { margin: 0 0 .7rem; font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1.2; letter-spacing: -.015em; }
.modal-header .meta {
  font-family: var(--sans); font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--fg-mid);
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .6rem;
}
.modal-header .meta .sep { opacity: .4; }
.modal-header .meta-src { margin: .7rem 0 0; }
.modal-header .meta-tags { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.modal-header .meta-tags .tag { color: var(--accent-strong); background: var(--accent-soft); text-decoration: none; padding: .14rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.modal-main { padding: 1.8rem 2.4rem 2.4rem; }
.modal-admin-block {
  margin: 0 2.4rem 2.4rem;
  padding: 1rem 1.2rem;
  border: var(--rule-w) solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-family: var(--sans); font-size: .8rem;
}
.modal-admin-title {
  font-weight: 700; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: .75rem;
}
.modal-admin-section {
  font-weight: 600; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg-dim); margin: .75rem 0 .3rem;
}
.modal-admin-actions { margin-top: .75rem; }
.modal-main .summary { font-family: var(--sans); font-size: 1.06rem; line-height: 1.75; color: var(--fg); }
.modal-main .summary p { margin: 0 0 .8rem; }
.modal-main .summary p:last-child { margin: 0; }
.modal-header .summary-note {
  margin: 1rem 0 0; padding-top: .85rem;
  border-top: var(--rule-w) solid var(--rule-soft);
  font-size: .72rem;
}
.summary-note {
  font-family: var(--sans); font-size: .76rem; color: var(--fg-dim);
  font-style: italic; margin: 1.2rem 0 0;
}
.summary-note .ratio { display: block; margin-top: .3rem; font-style: normal; font-variant-numeric: tabular-nums; }
.modal-src-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.modal-src-link:hover { text-decoration: underline; }
.source-link {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: 1rem;
  appearance: none; background: var(--accent); color: var(--accent-fg);
  border: 0; padding: .7rem 1.3rem; border-radius: 999px;
  font-family: var(--sans); font-size: .88rem; font-weight: 600;
  text-decoration: none; box-shadow: var(--shadow-sm);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.source-link:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.source-link::after { content: ""; }
/* Melden-Box (Leser meldet fehlerhafte Zusammenfassung) */
.report-box { margin-top: 1.5rem; padding-top: 1.1rem; border-top: var(--rule-w) solid var(--rule-soft); }
.report-trigger {
  appearance: none; background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: .8rem; font-weight: 500; color: var(--fg-dim);
  padding: 0; transition: color .15s ease;
}
.report-trigger:hover { color: var(--accent-strong); }
.report-panel { margin-top: .85rem; }
.report-q { font-family: var(--sans); font-size: .82rem; font-weight: 600; color: var(--fg-mid); margin-bottom: .6rem; }
.report-reasons { display: flex; flex-wrap: wrap; gap: .5rem; }
.report-reason {
  appearance: none; cursor: pointer;
  font-family: var(--sans); font-size: .78rem; font-weight: 500; color: var(--fg-mid);
  background: var(--bg-soft); border: var(--rule-w) solid var(--rule); border-radius: 999px;
  padding: .4rem .9rem; transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.report-reason:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.report-reason:disabled { opacity: .5; cursor: default; }
.report-done {
  font-family: var(--sans); font-size: .82rem; font-weight: 500; color: var(--accent-strong);
  padding: .2rem 0;
}
.report-done.report-fail { color: #b91c1c; }
.info-text { font-family: var(--sans); font-size: .92rem; line-height: 1.65; color: var(--fg-mid); }
.info-text p { margin: 0 0 .9rem; }
.info-text p:last-child { margin: 0; }
.info-text strong { color: var(--fg); font-weight: 600; }
/* Quellen-Modal: Zeile mit rechteckiger SVG-Flagge */
#quellen-content .src-row { display: flex; gap: .85rem; padding: .95rem 0; border-bottom: var(--rule-w) solid var(--rule-soft); }
#quellen-content .src-row:last-child { border-bottom: none; }
#quellen-content .source-flag { flex-shrink: 0; width: 28px; height: 18.6px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 .5px rgba(0,0,0,.08); margin-top: .15rem; }
#quellen-content .source-flag svg { display: block; width: 100%; height: 100%; }
#quellen-content .src-body { flex: 1; min-width: 0; }
#quellen-content .src-name { font-weight: 700; color: var(--fg); text-decoration: none; font-size: .98rem; }
#quellen-content .src-name:hover { color: var(--accent); }
#quellen-content .src-meta { font-size: .72rem; color: var(--fg-dim); margin: .2rem 0 .35rem; }
#quellen-content .src-desc { font-size: .85rem; line-height: 1.6; color: var(--fg-mid); margin: 0; }
.info-close {
  position: absolute; top: 1.1rem; right: 1.1rem;
  appearance: none; background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  width: 34px; height: 34px; border-radius: 50%; font-size: 1.2rem; line-height: 1;
  color: var(--fg-mid); cursor: pointer; z-index: 5;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s ease, background .15s ease, transform .18s ease;
}
.info-close:hover { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); transform: rotate(90deg); }
.also-sources {
  margin-top: 1.75rem; padding-top: 1.1rem;
  border-top: var(--rule-w) solid var(--rule);
  display: flex; flex-direction: column; gap: .6rem;
}
.updated-note {
  display: flex; gap: .7rem; align-items: flex-start;
  margin: 0 0 1.25rem; padding: .75rem .9rem;
  background: var(--tint, rgba(0,0,0,.03));
  border: var(--rule-w) solid var(--rule); border-radius: 6px;
  font-family: var(--sans); font-size: .85rem; line-height: 1.5;
}
.updated-note .upd-badge {
  flex: none; font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: .2rem .5rem; border-radius: 4px;
  background: var(--fg); color: var(--bg); margin-top: .1rem;
}
.updated-note .upd-old { margin-top: .4rem; color: var(--fg-dim); font-style: italic; }
.updated-note .upd-link {
  display: inline-block; margin-top: .5rem; font-weight: 600; color: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}
.also-sources .also-label {
  display: block;
  font-family: var(--sans); font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--fg);
  padding-bottom: .5rem; margin-bottom: .8rem;
  border-bottom: var(--rule-w) solid var(--rule);
}
.also-sources .also-label-folge { margin-top: 1.6rem; }
.also-links {
  display: flex; flex-direction: column; gap: .75rem;
}
.also-daygroup {
  display: flex; flex-direction: column; gap: .75rem;
}
.also-daygroup + .also-daygroup { margin-top: 1rem; }
.also-dayhead {
  font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  color: var(--fg-dim); font-variant-numeric: tabular-nums;
  padding-bottom: .3rem; border-bottom: var(--rule-w) dashed var(--rule);
}
.also-item {
  display: flex; flex-direction: column; gap: .3rem;
}
.also-item .also-head {
  display: flex; flex-direction: row; align-items: center; gap: .75rem;
}
.also-item .also-title {
  font-family: var(--sans); font-size: .82rem; line-height: 1.35;
  color: var(--fg-mid); text-decoration: none; display: block;
  margin-top: .15rem;
}
.also-item .also-title:hover { color: var(--accent); }
.also-item .also-date {
  font-family: var(--sans); font-size: .72rem; color: var(--fg-dim);
  white-space: nowrap; min-width: 6rem;
}
.also-item .also-src-link {
  font-family: var(--sans); font-size: .85rem; font-weight: 600;
  color: var(--accent-strong); text-decoration: none;
  transition: color .15s ease;
}
.also-item .also-src-link:hover { color: var(--accent); text-decoration: underline; }
.modal-footer { padding: 1.2rem 2.4rem; border-top: var(--rule-w) solid var(--rule); text-align: right; font-family: var(--sans); font-size: .82rem; background: var(--bg-tint); }
.modal-footer a { color: var(--fg-mid); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: .3rem; transition: color .15s ease; }
.modal-footer a:hover { color: var(--accent-strong); }

@media (max-width: 760px) {
  .container { padding: 0 1rem 4rem; }
  .day-nav { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
  .hero { padding: 1.4rem 1.5rem 1rem; }
  .hero .eyebrow { margin: 0 0 .5rem; font-size: .66rem; }
  .hero h1 { font-size: 1.85rem; margin: 0 0 .4rem; max-width: none; }
  .hero p { font-size: .92rem; }
  .modal { padding: 0; }
  .modal-content { max-width: 100%; min-height: 100vh; border-radius: 0; border: 0; }
  .modal-close { top: 1rem; right: 1rem; }
  .modal-header { padding: 1.1rem 1.4rem .9rem; }
  .modal-header h2 { font-size: 1.4rem; line-height: 1.18; margin: 0 0 .55rem; }
  .modal-header .meta { margin: 0 0 .45rem; }
  .modal-header .summary-note { margin: .75rem 0 0; padding-top: .65rem; }
  .modal-main { padding: 1.4rem; }
  .modal-footer { padding: 1.1rem 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { *, .modal.open, .modal-content { animation: none !important; transition: none !important; } }

/* ── Puls overlay (analysis popup) ── */
.puls-modal {
  position: fixed; inset: 0; z-index: 1400; display: none;
  background: color-mix(in oklab, var(--fg) 50%, transparent);
  overflow-y: auto; padding: 2.5rem 1rem;
}
.puls-modal::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.puls-modal.open { display: block; animation: pulsfade .25s ease; }
@keyframes pulsfade { from { opacity: 0; } to { opacity: 1; } }
.puls-shell {
  position: relative; width: 100%; max-width: 920px; margin: 0 auto;
  background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  border-radius: 26px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pulspop .32s cubic-bezier(.2,.85,.3,1);
}
@keyframes pulspop { from { transform: translateY(24px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.puls-close {
  position: fixed; top: 1.6rem; right: 1.6rem; z-index: 1450;
  appearance: none; background: rgba(20,30,25,.55); border: 1.5px solid var(--accent);
  width: 38px; height: 38px; border-radius: 50%; font-size: 1.3rem; line-height: 1;
  color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  transition: transform .18s ease, background .15s ease;
}
.puls-close:hover { background: var(--accent); transform: rotate(90deg) scale(1.05); }

/* Cluster detail panel — slides over the puls popup */
.cluster-panel {
  display: none; position: absolute; inset: 0; z-index: 10;
  background: var(--bg-soft); overflow-y: auto;
  animation: pulsfade .2s ease;
}
.cluster-panel.open { display: block; }
.cluster-panel > .puls-close {
  position: fixed; top: 1.2rem; right: 1.2rem; z-index: 1460;
}
.cluster-panel-head {
  flex-shrink: 0;
  padding: 1.4rem 2rem 1.2rem 2rem;
  border-bottom: var(--rule-w) solid var(--rule);
  margin-bottom: 1rem;
}
.cluster-panel-eyebrow {
  font-family: var(--sans); font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent-strong); margin-bottom: .4rem;
}
.cluster-panel-title {
  font-family: var(--display); font-size: 1.25rem; font-weight: 700;
  line-height: 1.25; letter-spacing: -.01em; margin-bottom: .5rem;
}
.cluster-panel-count {
  font-size: .78rem; color: var(--fg-dim);
}
.cluster-panel-list {
  padding: 0 1.6rem 2.4rem;
}
.cluster-item {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1rem 0; border-bottom: var(--rule-w) solid var(--rule-soft);
  cursor: pointer; transition: opacity .15s ease;
}
.cluster-item:last-child { border-bottom: 0; }
.cluster-item:hover { opacity: .72; }
.cluster-item-meta {
  font-family: var(--sans); font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-strong); display: flex; gap: .4rem; flex-wrap: wrap;
}
.cluster-item-meta .sep { opacity: .4; }
.cluster-item-title {
  font-family: var(--display); font-size: 1rem; font-weight: 600;
  line-height: 1.3; color: var(--fg);
}

/* Animated gradient hero band */
.puls-hero {
  position: relative; overflow: hidden; padding: 2.6rem 2.4rem 2.2rem;
  color: #fff;
  background: linear-gradient(120deg, #0f5132 0%, #16a34a 38%, #0ea5a0 72%, #155e9c 100%);
  background-size: 280% 280%;
  animation: pulsflow 16s ease infinite;
}
@keyframes pulsflow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.puls-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40rem 18rem at 12% -20%, rgba(255,255,255,.28), transparent 60%),
    radial-gradient(30rem 16rem at 110% 120%, rgba(255,255,255,.16), transparent 55%);
}
/* Flowing waves at the bottom of the hero band */
.puls-waves {
  position: absolute; left: 0; right: 0; bottom: 0; height: 70%;
  z-index: 0; pointer-events: none; overflow: hidden;
}
.puls-waves svg { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; }
.puls-waves .wv { fill: rgba(255,255,255,.13); transform-origin: center; }
.puls-waves .wv1 { animation: waveX 11s linear infinite; }
.puls-waves .wv2 { fill: rgba(255,255,255,.10); animation: waveX 17s linear infinite reverse; }
.puls-waves .wv3 { fill: rgba(255,255,255,.07); animation: waveX 23s linear infinite; }
@keyframes waveX { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.puls-hero .ph-eyebrow {
  position: relative; font-family: var(--sans); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .22em; opacity: .85;
  display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 .85rem;
}
.puls-hero .ph-pulse {
  width: 9px; height: 9px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: pblip 1.8s ease-out infinite;
}
@keyframes pblip {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); }
  70% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.puls-hero h2 {
  position: relative; font-family: var(--display); font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.08; letter-spacing: -.02em;
  margin: 0 0 .7rem; max-width: 20ch;
}
.puls-hero p { position: relative; margin: 0; font-size: 1rem; max-width: 48ch; opacity: .92; }
.puls-hero .ph-meta {
  position: relative; margin-top: 1.3rem; display: flex; flex-wrap: wrap; gap: .5rem .9rem;
  font-family: var(--sans); font-size: .8rem; opacity: .9;
}
.puls-hero .ph-meta b { font-weight: 700; }

.puls-body { padding: 2rem 2.4rem 2.6rem; }
.puls-section { margin-bottom: 2.6rem; }
.puls-section:last-child { margin-bottom: 0; }
.puls-section > h3 {
  font-family: var(--display); font-weight: 600; font-size: 1.25rem;
  letter-spacing: -.01em; margin: 0 0 .3rem;
  display: inline-flex; align-items: center; gap: .55rem;
}
.puls-section > h3 .h-accent { width: 6px; height: 1.05em; border-radius: 3px; background: var(--accent); display: inline-block; }
.puls-section > .sub {
  font-family: var(--sans); font-size: .83rem; color: var(--fg-dim);
  margin: 0 0 1.2rem; max-width: 62ch; line-height: 1.55;
}

/* Term landscape — now a multi-line wave chart (see .terms-chart / .wave-chart) */

/* Topic bars — REMOVED, replaced by wave chart (.topics-chart reuses .tl-chart) */
.topics-chart, .terms-chart { position: relative; }
.wave-chart { width: 100%; height: 210px; display: block; overflow: visible; }
.wave-chart .w-area { opacity: 0; animation: areaIn .7s ease forwards; }
.wave-chart .w-line { fill: none; stroke-width: 2; opacity: .9; }
.wave-chart .w-axis { font-family: var(--sans); font-size: 11px; fill: var(--fg-dim); }
.wave-chart .w-dot { opacity: 0; animation: dotIn .4s ease forwards; }
.wave-legend { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.wave-legend .lg { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--sans); font-size: .76rem; color: var(--fg-mid); cursor: pointer; padding: .15rem .2rem; border-radius: 6px; transition: background .15s ease; }
.wave-legend .lg:hover { background: var(--bg-tint); color: var(--fg); }
.wave-legend .lg .swatch { width: 12px; height: 12px; border-radius: 4px; }

/* Timeline — stacked area (flowing) chart */
.timeline { position: relative; }
.tl-chart { width: 100%; height: 220px; display: block; overflow: visible; }
.tl-chart .tl-area { opacity: 0; animation: areaIn .7s ease forwards; }
@keyframes areaIn { to { opacity: 1; } }
.tl-chart .tl-line { fill: none; stroke-width: 1.5; opacity: .55; }
.tl-chart .tl-axis { font-family: var(--sans); font-size: 11px; fill: var(--fg-dim); }
.tl-chart .tl-grid { stroke: var(--rule); stroke-width: 1; opacity: .5; }
.tl-chart .tl-dot { opacity: 0; animation: dotIn .4s ease forwards; }
@keyframes dotIn { to { opacity: 1; } }
.tl-fallback-row { display: grid; grid-template-columns: 4.2rem 1fr auto; align-items: center; gap: .8rem; margin-bottom:.55rem; }
.tl-legend { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.tl-legend .lg { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--sans); font-size: .74rem; color: var(--fg-mid); cursor: default; }
.tl-legend .lg .swatch { width: 11px; height: 11px; border-radius: 3px; }

/* Heatmap (Begriffe / Themen × Tage) */
.heat-chart { width: 100%; display: block; overflow: visible; }
.heat-chart rect.cell { transition: opacity .15s ease; }
.heat-chart .cell-tap { cursor: pointer; }
.heat-chart .heat-row-lbl { font-family: var(--sans); font-size: 12px; fill: var(--fg-mid); cursor: default; }
.heat-chart .heat-row-lbl.has-tooltip { cursor: help; text-decoration: underline dotted; text-decoration-color: var(--fg-dim); }
.heat-chart .heat-col-lbl { font-family: var(--sans); font-size: 11px; fill: var(--fg-dim); }
.heat-chart .heat-val { font-family: var(--sans); font-size: 10px; font-weight: 600; }
.heat-scale { display: flex; align-items: center; gap: .55rem; margin-top: .9rem; font-family: var(--sans); font-size: .72rem; color: var(--fg-dim); }
.heat-scale .grad { height: 9px; flex: 1; border-radius: 5px; border: var(--rule-w) solid var(--rule);
#heat-tooltip {
  position: fixed; z-index: 9999;
  background: var(--fg); color: var(--bg-soft);
  font-family: var(--sans); font-size: .75rem; font-weight: 500;
  padding: .35rem .65rem; border-radius: 8px;
  pointer-events: none; opacity: 0;
  transition: opacity .15s ease;
  max-width: 220px; white-space: normal; line-height: 1.4;
  box-shadow: var(--shadow-md);
}
  background: linear-gradient(90deg, hsl(145 45% 16%), hsl(145 55% 30%), hsl(145 62% 45%), hsl(145 70% 62%)); }
[data-theme="light"] .heat-scale .grad, :root:not([data-theme]) .heat-scale .grad {
  background: linear-gradient(90deg, hsl(145 40% 90%), hsl(145 50% 65%), hsl(145 60% 45%), hsl(145 65% 30%)); }

/* Bump chart (Rang über Zeit) */
.bump-chart { width: 100%; display: block; overflow: visible; }
.bump-chart .bump-line { fill: none; stroke-width: 2.5; opacity: .9; }
.bump-chart .bump-dot { stroke: var(--bg-soft); stroke-width: 1.5; }
.bump-chart .bump-lbl { font-family: var(--sans); font-size: 11px; font-weight: 600; }
.bump-chart .bump-tap { cursor: pointer; }
.bump-chart .bump-tap:hover { text-decoration: underline; }
.bump-chart .bump-rank { font-family: var(--sans); font-size: 10px; fill: var(--fg-dim); }
.bump-chart .bump-axis { font-family: var(--sans); font-size: 11px; fill: var(--fg-dim); }

.puls-empty { color: var(--fg-dim); font-style: italic; font-family: var(--serif); font-size: 1.05rem; padding: 1.4rem 0; }
.puls-soon {
  background: var(--bg-tint); border: var(--rule-w) dashed var(--rule);
  border-radius: var(--radius); padding: 1.2rem 1.4rem;
  font-family: var(--sans); font-size: .85rem; color: var(--fg-dim); line-height: 1.6;
}
.puls-soon strong { color: var(--fg-mid); font-weight: 600; }

@media (max-width: 760px) {
  .puls-modal { padding: 0; }
  .puls-shell { max-width: 100%; min-height: 100vh; border-radius: 0; border: 0; }
  .puls-hero { padding: 2.2rem 1.4rem 1.8rem; }
  .puls-body { padding: 1.6rem 1.4rem 2.2rem; }
  .topic-bar { grid-template-columns: 6.5rem 1fr auto; gap: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .puls-hero { animation: none; }
  .puls-waves .wv { animation: none !important; }
  .tl-chart .tl-area, .tl-chart .tl-dot, .wave-chart .w-area, .wave-chart .w-dot { animation: none; opacity: 1; transform: none; }
}

/* ── Admin Mode ── */
.admin-badge {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 9000;
  background: #e11d48; color: #fff; font-family: var(--sans);
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  padding: .3rem .7rem; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25); pointer-events: none; display: none;
}
body.admin-mode .admin-badge { display: block; }
.admin-bar {
  display: none; position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(225,29,72,.92); backdrop-filter: blur(4px);
  padding: .35rem .6rem; gap: .4rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.2);
}
body.admin-mode .article-card { position: relative; padding-bottom: 2.4rem; }
body.admin-mode .admin-bar { display: flex; }
.admin-bar button {
  appearance: none; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12); color: #fff;
  font-family: var(--sans); font-size: .67rem; font-weight: 600;
  padding: .18rem .55rem; border-radius: 5px; cursor: pointer;
  transition: background .15s ease;
}
.admin-bar button:hover { background: rgba(255,255,255,.28); }
.admin-panel {
  display: none; position: fixed; top: 0; right: 0; bottom: 0;
  width: min(480px, 100vw); background: var(--bg-soft);
  border-left: var(--rule-w) solid var(--rule);
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  z-index: 8500; overflow-y: auto; padding: 1.5rem 1.25rem;
  font-family: var(--sans); font-size: .8rem;
}
.admin-panel.open { display: block; }
.admin-panel-close {
  position: absolute; top: .8rem; right: .8rem;
  appearance: none; background: none; border: none;
  font-size: 1.2rem; cursor: pointer; color: var(--fg-mid); line-height: 1; padding: .2rem;
}
.admin-panel h3 { font-size: .9rem; margin: 0 0 .75rem; color: var(--fg); }
.admin-panel h4 { font-size: .75rem; margin: 1rem 0 .4rem; color: var(--fg-dim); text-transform: uppercase; letter-spacing: .07em; }
.admin-kv { display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; margin-bottom: .5rem; }
.admin-kv dt { color: var(--fg-dim); white-space: nowrap; }
.admin-kv dd { color: var(--fg); word-break: break-all; margin: 0; }
.admin-ev-true  { color: #16a34a; font-weight: 700; }
.admin-ev-false { color: #e11d48; font-weight: 700; }
.admin-ev-none  { color: var(--fg-dim); }
.admin-member { padding: .5rem .6rem; border-radius: 8px; border: var(--rule-w) solid var(--rule); margin-bottom: .4rem; background: var(--bg); }
.admin-member-title { font-size: .78rem; color: var(--fg); margin-bottom: .25rem; }
.admin-member-meta  { font-size: .68rem; color: var(--fg-dim); }
.admin-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.admin-actions button {
  appearance: none; background: var(--accent-soft); color: var(--accent-strong);
  border: var(--rule-w) solid var(--accent); font-family: var(--sans);
  font-size: .75rem; font-weight: 600; padding: .35rem .8rem;
  border-radius: 8px; cursor: pointer; transition: background .15s ease;
}
.admin-actions button:hover { background: var(--accent); color: var(--accent-fg); }
.admin-actions button.danger { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.admin-actions button.danger:hover { background: #e11d48; color: #fff; border-color: #e11d48; }
@keyframes spin { to { transform: rotate(360deg); } }
.admin-spinner { display: inline-block; width: .9rem; height: .9rem; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle; margin-left: .4rem; }

/* ─── Quellen-Seite (/quellen) ─── */
.sources-hero { padding: 2.5rem 0 1.5rem; border-bottom: var(--rule-w) solid var(--rule); margin-bottom: 2rem; }
.sources-hero h1 { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; margin: 0 0 .6rem; }
.sources-hero p { font-family: var(--sans); font-size: .95rem; color: var(--fg-mid); margin: 0; max-width: 56ch; }
.sources-grid { display: flex; flex-direction: column; gap: 0; }
.source-group { margin-bottom: 2.5rem; }
.source-group-label { font-family: var(--sans); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-dim); margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: var(--rule-w) solid var(--rule-soft); }
.source-card { display: flex; gap: 1rem; padding: 1.25rem 0; border-bottom: var(--rule-w) solid var(--rule-soft); }
.source-card:last-child { border-bottom: none; }
.source-body { flex: 1; min-width: 0; }
.source-flag { flex-shrink: 0; width: 30px; height: 20px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 .5px rgba(0,0,0,.08); margin-top: .15rem; }
.source-flag svg { display: block; width: 100%; height: 100%; }
.source-name { font-family: var(--display); font-size: 1.05rem; font-weight: 700; color: var(--fg); text-decoration: none; display: inline-block; margin-bottom: .4rem; }
.source-name:hover { color: var(--accent); }
.source-meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.source-tag { font-family: var(--sans); font-size: .68rem; font-weight: 600; padding: .15rem .5rem; border-radius: 4px; background: var(--bg-card); color: var(--fg-mid); }
.source-tag.type { background: color-mix(in oklab, var(--accent-soft) 40%, var(--bg-card)); color: var(--accent-strong); }
.source-desc { font-family: var(--sans); font-size: .88rem; line-height: 1.7; color: var(--fg-mid); max-width: 72ch; margin: 0; }
.back-link { font-family: var(--sans); font-size: .82rem; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; margin-bottom: 1.5rem; }
.back-link:hover { text-decoration: underline; }
.sources-count { font-family: var(--sans); font-size: .8rem; color: var(--fg-dim); margin-top: .4rem; }

/* ─── Dashboard (/dashboard) ─── */
.dash-wrap { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 6rem; }
.dash-head { margin-bottom: 2rem; }
.dash-head h1 { font-family: var(--display); font-size: 1.9rem; font-weight: 700; margin: 0 0 .4rem; letter-spacing: -.02em; }
.dash-head .sub { color: var(--fg-dim); font-size: .9rem; margin: 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.stat { background: var(--bg-soft); border: var(--rule-w) solid var(--rule); border-radius: var(--radius-sm);
  padding: 1rem 1.4rem; min-width: 140px; }
.stat .val { font-family: var(--display); font-size: 1.7rem; font-weight: 700; color: var(--accent-strong); }
.stat .lbl { font-size: .75rem; color: var(--fg-dim); margin-top: .2rem; }
.audit-card { background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm); overflow: hidden; }
.audit-head { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.audit-title { font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  overflow-wrap: anywhere; word-break: break-word; }
.audit-meta { font-size: .75rem; color: var(--fg-dim); overflow-wrap: anywhere; word-break: break-word; }
.audit-meta a { color: var(--accent-strong); text-decoration: none; overflow-wrap: anywhere; }
.audit-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; min-width: 0; }
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px;
  font-size: .73rem; font-weight: 600; font-family: var(--sans); }
.badge-ok { background: #dcfce7; color: #15803d; }
.badge-warn { background: #fef9c3; color: #a16207; }
.badge-err { background: #fee2e2; color: #b91c1c; }
.badge-pending { background: var(--bg-tint); color: var(--fg-dim); }
[data-theme="dark"] .badge-ok { background: #14241a; color: #4ade80; }
[data-theme="dark"] .badge-warn { background: #2d2000; color: #fbbf24; }
[data-theme="dark"] .badge-err { background: #2d0a0a; color: #f87171; }
.chars { font-size: .73rem; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.verify-btn {
  appearance: none; background: var(--accent); color: var(--accent-fg);
  border: 0; border-radius: 999px; padding: .25rem .85rem;
  font-family: var(--sans); font-size: .73rem; font-weight: 600; cursor: pointer;
  transition: background .15s ease; }
.verify-btn:hover { background: var(--accent-strong); }
.verify-btn:disabled { opacity: .5; cursor: default; }
.issues { margin: .5rem 0 0 1rem; padding: 0; font-size: .82rem; color: var(--fg-mid); line-height: 1.6; }
.issues li { margin-bottom: .25rem; }
.col-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.col { background: var(--bg-tint); border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius-sm); padding: 1rem; }
.col-head { font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--fg-dim); margin-bottom: .6rem; }
.col-body { font-size: .83rem; line-height: 1.65; color: var(--fg-mid);
  white-space: pre-wrap; word-break: break-word; max-height: 1200px; overflow-y: auto; }
.toggle-btn {
  appearance: none; background: transparent; border: 0; padding: .4rem 0 0;
  font-family: var(--sans); font-size: .78rem; color: var(--accent-strong);
  cursor: pointer; text-align: left; }
.toggle-btn:hover { text-decoration: underline; }
.empty-state { color: var(--fg-dim); font-style: italic; padding: 3rem 0;
  text-align: center; font-family: var(--serif); font-size: 1.1rem; }
#toast { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  background: var(--fg); color: var(--bg); padding: .7rem 1.2rem;
  border-radius: 999px; font-size: .82rem; font-weight: 500;
  box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .25s ease;
  pointer-events: none; }
#toast.show { opacity: 1; }
.errors-bar { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.err-row { display: flex; gap: .8rem; padding: .7rem .9rem; border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius-sm); margin-bottom: .5rem; background: var(--bg-soft); align-items: flex-start; }
.err-badge { flex: 0 0 auto; font-size: .65rem; font-weight: 700; padding: .15rem .5rem;
  border-radius: 999px; font-family: var(--sans); letter-spacing: .04em; }
.err-lvl-warn { background: #fef9c3; color: #a16207; }
.err-lvl-err { background: #fee2e2; color: #b91c1c; }
.err-lvl-info { background: var(--bg-tint); color: var(--fg-dim); }
[data-theme="dark"] .err-lvl-warn { background: #2d2000; color: #fbbf24; }
[data-theme="dark"] .err-lvl-err { background: #2d0a0a; color: #f87171; }
.err-body { flex: 1; min-width: 0; }
.err-msg { font-size: .85rem; line-height: 1.5; color: var(--fg-mid); word-break: break-word; }
.err-meta { font-size: .7rem; color: var(--fg-dim); margin-top: .25rem; font-variant-numeric: tabular-nums; }
.run-card { border: var(--rule-w) solid var(--rule); border-radius: var(--radius-sm);
  margin-bottom: .7rem; background: var(--bg-soft); overflow: hidden; }
.run-card.warn { border-left: 3px solid #d97706; }
.run-card.ok { border-left: 3px solid var(--rule); }
.run-head { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem;
  cursor: pointer; user-select: none; }
.run-head:hover { background: var(--bg-tint); }
.run-dot { flex: 0 0 auto; width: .7rem; height: .7rem; border-radius: 999px; background: #16a34a; }
.run-card.warn .run-dot { background: #d97706; }
.run-time { font-family: var(--sans); font-weight: 700; font-size: .9rem;
  font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.run-summary { flex: 1; min-width: 0; font-size: .82rem; color: var(--fg-mid);
  font-family: var(--sans); }
.run-flags { flex: 0 0 auto; display: flex; gap: .35rem; flex-wrap: wrap; }
.run-flag { font-size: .64rem; font-weight: 700; padding: .12rem .45rem; border-radius: 999px;
  background: #fef9c3; color: #a16207; font-family: var(--sans); white-space: nowrap; }
[data-theme="dark"] .run-flag { background: #2d2000; color: #fbbf24; }
.run-chevron { flex: 0 0 auto; color: var(--fg-dim); transition: transform .15s ease; font-size: .8rem; }
.run-card.open .run-chevron { transform: rotate(90deg); }
.run-body { display: none; padding: 0 1rem 1rem; }
.run-card.open .run-body { display: block; }
.run-sec { margin-top: 1rem; }
.run-sec-head { font-family: var(--sans); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--fg-dim);
  margin-bottom: .5rem; cursor: pointer; display: flex; align-items: center; gap: .4rem; }
.run-sec-head .cnt { color: var(--accent-strong); }
.run-sec-body { display: none; }
.run-sec.open .run-sec-body { display: block; }
.run-sec-head::before { content: "▸"; font-size: .7rem; transition: transform .15s; }
.run-sec.open .run-sec-head::before { transform: rotate(90deg); }
.doc-render { font-family: var(--sans); font-size: .9rem; line-height: 1.6; color: var(--fg); max-width: 820px; }
.doc-render h1 { font-size: 1.5rem; margin: 1.2rem 0 .6rem; }
.doc-render h2 { font-size: 1.2rem; margin: 1.4rem 0 .5rem; padding-top: .6rem; border-top: var(--rule-w) solid var(--rule); }
.doc-render h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.doc-render h4 { font-size: .9rem; margin: .8rem 0 .3rem; color: var(--fg-mid); }
.doc-render p { margin: .5rem 0; }
.doc-render ul { margin: .5rem 0; padding-left: 1.3rem; }
.doc-render li { margin: .25rem 0; }
.doc-render code { font-family: var(--mono, monospace); font-size: .82rem; background: var(--bg-tint); padding: .1rem .3rem; border-radius: 4px; }
.doc-render pre { background: var(--bg-tint); padding: .8rem 1rem; border-radius: var(--radius-sm); overflow-x: auto; margin: .6rem 0; }
.doc-render pre code { background: none; padding: 0; }
.doc-render table { border-collapse: collapse; margin: .6rem 0; font-size: .82rem; }
.doc-render th, .doc-render td { border: var(--rule-w) solid var(--rule); padding: .3rem .6rem; text-align: left; }
.doc-render blockquote { border-left: 3px solid var(--accent); margin: .6rem 0; padding: .2rem 0 .2rem .9rem; color: var(--fg-mid); }
.doc-render hr { border: 0; border-top: var(--rule-w) solid var(--rule); margin: 1.2rem 0; }
.doc-render a { color: var(--accent-strong); }
.tabnav { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.8rem;
  border-bottom: var(--rule-w) solid var(--rule); padding-bottom: 0; }
.tabnav button { appearance: none; background: transparent; border: 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: .6rem 1rem; cursor: pointer; font-family: var(--sans);
  font-size: .88rem; font-weight: 600; color: var(--fg-dim);
  transition: color .15s ease, border-color .15s ease; }
.tabnav button:hover { color: var(--fg); }
.tabnav button.active { color: var(--accent-strong); border-bottom-color: var(--accent); }
.tabpane { display: none; }
.tabpane.active { display: block; animation: fadein .2s ease; }
.status-card { background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius); padding: 1.6rem 1.8rem; margin-bottom: 1.2rem; }
.status-phase { display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-size: 1.4rem; font-weight: 600; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--fg-dim); }
.status-dot.live { background: var(--accent); animation: pblip2 1.6s ease-out infinite; }
@keyframes pblip2 { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.status-detail { color: var(--fg-mid); font-size: .92rem; margin-top: .6rem; }
.status-meta { color: var(--fg-dim); font-size: .8rem; margin-top: .8rem; font-variant-numeric: tabular-nums; }
.usage-bars { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.usage-bar-row { display: grid; grid-template-columns: 6rem 1fr auto; align-items: center; gap: .8rem; font-size: .82rem; }
.usage-bar-track { background: var(--bg-tint); border-radius: 999px; height: 12px; overflow: hidden; }
.usage-bar-fill { background: var(--accent); height: 100%; border-radius: 999px; }
.usage-num { font-variant-numeric: tabular-nums; color: var(--fg-mid); }
.model-row { display: grid; grid-template-columns: 8rem 1fr; align-items: center; gap: 1rem;
  padding: .9rem 0; border-bottom: var(--rule-w) solid var(--rule-soft); min-width: 0; }
.model-row span { min-width: 0; overflow-wrap: anywhere; }
.model-row select { font-family: var(--sans); font-size: .85rem; padding: .4rem .7rem;
  border-radius: 8px; border: var(--rule-w) solid var(--rule); background: var(--bg-soft);
  color: var(--fg); max-width: 100%; min-width: 0; width: 100%; box-sizing: border-box; }
.cfg-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.cfg-table th { text-align: left; font-weight: 600; color: var(--fg-dim); padding: .5rem .6rem;
  border-bottom: var(--rule-w) solid var(--rule); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.cfg-table td { padding: .5rem .6rem; border-bottom: var(--rule-w) solid var(--rule-soft); color: var(--fg-mid); }
.cfg-yes { color: var(--accent-strong); font-weight: 600; }
.loading { color: var(--fg-dim); font-style: italic; padding: 2rem 0; }
@media (max-width: 640px) {
  .col-wrap { grid-template-columns: 1fr; }
  .dash-wrap { padding: 1.5rem 1rem 5rem; }
  .usage-bar-row { grid-template-columns: 4.5rem 1fr auto; gap: .5rem; font-size: .75rem; }
  .usage-num { font-size: .7rem; }
  .cfg-table { display: block; overflow-x: auto; white-space: nowrap; }
  .stat { flex: 1 1 calc(50% - .5rem); min-width: 0; }
  .stat .val { font-size: 1.4rem; }
  .audit-card { padding: 1rem; }
  .model-row { grid-template-columns: 1fr; gap: .4rem; }
  .tabnav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin-bottom: 1.2rem; padding-bottom: .3rem; }
  .tabnav button { flex: 0 0 auto; white-space: nowrap; }
  .errors-bar { flex-wrap: wrap; gap: .5rem; }
  .errors-bar select, .errors-bar button { flex: 1 1 auto; min-width: 0; }
  .err-row { flex-direction: column; gap: .4rem; padding: .6rem .7rem; }
  .err-badge { align-self: flex-start; }
  .err-msg { word-break: break-word; overflow-wrap: anywhere; }
}

/* ─── Lazy-Load Tages-Ladezustand ─── */
.day-loading { padding: 2rem 0; text-align: center; color: var(--fg-dim); font-family: var(--sans); font-size: .9rem; }
