:root {
  --paper: #f7f5f0;
  --card: #ffffff;
  --ink: #15171b;
  --ink-2: #3b3f47;
  --muted: #6b707a;
  --rule: #e2ddd3;
  --rule-strong: #15171b;
  --red: #c8102e;
  --red-ink: #a50d26;
  --chip: #efebe3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111317; --card: #181b20; --ink: #ecebe7; --ink-2: #c9c7c1; --muted: #979ba3;
    --rule: #2a2e35; --rule-strong: #ecebe7; --red: #ff4d5e; --red-ink: #ff6b79; --chip: #23272e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111317; --card: #181b20; --ink: #ecebe7; --ink-2: #c9c7c1; --muted: #979ba3;
  --rule: #2a2e35; --rule-strong: #ecebe7; --red: #ff4d5e; --red-ink: #ff6b79; --chip: #23272e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: inherit; text-decoration: none; }
a:hover .hl, a.hl:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Kopf ---------- */
.topbar { border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.masthead { text-align: center; padding: 26px 0 18px; }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand img { width: 46px; height: 46px; }
.brand .name { font: 700 46px/1 var(--serif); letter-spacing: -0.01em; }
.tagline { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
nav.main { border-top: 3px solid var(--rule-strong); border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--paper); z-index: 5; }
nav.main ul { list-style: none; margin: 0 auto; padding: 0 16px; display: flex; justify-content: center; gap: 4px; overflow-x: auto; max-width: 1180px; scrollbar-width: none; }
nav.main a { display: block; padding: 11px 12px; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
nav.main a:hover { color: var(--red); }
nav.main a[aria-current="page"] { border-bottom-color: var(--red); color: var(--red); }

/* ---------- Bausteine ---------- */
.kicker { color: var(--red); font-weight: 700; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.meta { color: var(--muted); font-size: 13px; }
.meta .dot::before { content: "·"; margin: 0 6px; }
.hl { font-family: var(--serif); font-weight: 700; letter-spacing: -0.005em; margin: 4px 0 6px; line-height: 1.18; }
.lead-text { color: var(--ink-2); margin: 0 0 8px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--chip); border-radius: 3px; padding: 2px 6px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; border-top: 3px solid var(--rule-strong); padding-top: 8px; margin: 36px 0 14px; }
.section-title h2 { font: 700 24px/1.2 var(--serif); margin: 0; }
.section-title a { font-size: 13px; font-weight: 600; color: var(--red); }

/* ---------- Startseite ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; margin-top: 24px; }
.top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.top .lead .hl { font-size: clamp(28px, 3.4vw, 40px); }
.top .lead .lead-text { font-size: 18px; }
.top .side article + article { border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 14px; }
.top .side .hl { font-size: 19px; }
.lead-band { height: 6px; width: 64px; background: var(--red); margin-bottom: 14px; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.cols h3 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.list article { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.list article:last-child { border-bottom: 0; }
.list .hl { font-size: 18px; }
.list .lead-text { font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty-col { color: var(--muted); font-size: 14px; padding: 12px 0; }

/* ---------- Seitenleiste ---------- */
aside.rail { font-size: 14px; }
.box { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 14px 16px; margin-bottom: 24px; }
.box h2 { font: 700 13px/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 var(--red); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(200,16,46,.5); } 70% { box-shadow: 0 0 0 7px rgba(200,16,46,0); } 100% { box-shadow: 0 0 0 0 rgba(200,16,46,0); } }
@media (prefers-reduced-motion: reduce) { .live { animation: none; } }
.ticker { list-style: none; margin: 0; padding: 0; }
.ticker li { padding: 8px 0; border-top: 1px solid var(--rule); line-height: 1.35; }
.ticker li:first-child { border-top: 0; padding-top: 0; }
.ticker .src { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.ticker a:hover { color: var(--red); }
.box p { margin: 0 0 8px; color: var(--ink-2); }
.box .more { font-weight: 600; color: var(--red); font-size: 13px; }

/* ---------- Artikel ---------- */
.article { max-width: 720px; margin: 32px auto 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--red); font-weight: 600; }
.article h1 { font: 700 clamp(30px, 4.4vw, 44px)/1.12 var(--serif); letter-spacing: -0.01em; margin: 6px 0 14px; }
.article .lead-text { font-size: 20px; line-height: 1.5; color: var(--ink); font-weight: 600; margin-bottom: 18px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 24px; }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--chip); padding: 3px 8px; border-radius: 3px; }
.ai-badge svg { width: 12px; height: 12px; }
.body { font-family: var(--serif); font-size: 19.5px; line-height: 1.65; }
.body p { margin: 0 0 1.05em; }
.body h2 { font: 700 21px/1.3 var(--sans); margin: 1.6em 0 0.6em; }
.sources { margin-top: 36px; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 18px 20px; }
.sources h2 { font: 700 13px/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 4px; }
.sources > p { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }
.sources ol { margin: 0; padding-left: 20px; font-size: 14.5px; }
.sources li { margin: 6px 0; }
.sources li a:hover { color: var(--red); text-decoration: underline; }
.sources .src { font-weight: 700; }
.tags { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.related { max-width: 720px; margin: 0 auto; }

/* ---------- Listen & Textseiten ---------- */
.page-head { margin: 32px 0 8px; }
.page-head h1 { font: 700 36px/1.15 var(--serif); margin: 0 0 6px; }
.page-head p { color: var(--muted); margin: 0; }
.pager { display: flex; justify-content: space-between; margin: 24px 0; font-weight: 600; color: var(--red); }
.prose { max-width: 720px; margin: 32px auto 0; }
.prose h1 { font: 700 36px/1.15 var(--serif); margin: 0 0 16px; }
.prose h2 { font: 700 21px/1.3 var(--sans); margin: 1.8em 0 0.5em; }
.prose p, .prose li { color: var(--ink-2); }
.prose a { color: var(--red); text-decoration: underline; }
table.status { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.status th, table.status td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.status th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ok { color: #1f8a4c; font-weight: 700; }
.err { color: var(--red); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.stat { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px; }
.stat b { display: block; font: 700 26px/1.1 var(--serif); }
.stat span { font-size: 12.5px; color: var(--muted); }
.notice { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--red); padding: 14px 16px; border-radius: 4px; margin: 24px 0; }

/* ---------- Fuß ---------- */
footer.site { margin-top: 56px; border-top: 3px solid var(--rule-strong); padding: 24px 0 40px; font-size: 13.5px; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer.site nav a { margin-right: 16px; font-weight: 600; color: var(--ink-2); }
footer.site p { margin: 0; max-width: 560px; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .top { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .masthead { padding: 18px 0 12px; }
  .brand img { width: 36px; height: 36px; }
  .brand .name { font-size: 36px; }
  .tagline { font-size: 13px; }
  nav.main ul { justify-content: flex-start; }
  .cols { grid-template-columns: 1fr; gap: 8px; }
  .topbar .hide-sm { display: none; }
  .body { font-size: 18px; }
  .article .lead-text { font-size: 18px; }
}
.ticker-more { margin-top: 10px; }
.prose.wide { max-width: 1000px; }
table.status td.url { word-break: break-all; }

/* ---------- Redaktion ---------- */
.admin { max-width: 1100px; margin: 28px auto 0; }
.admin-login { max-width: 420px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-head h1, .admin-login h1 { font: 700 30px/1.2 var(--serif); margin: 0; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--rule); margin: 14px 0 22px; }
.admin-nav a { padding: 8px 12px; font-size: 14px; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.admin-nav a:hover { color: var(--red); }
.admin-nav a[aria-current="page"] { border-bottom-color: var(--red); color: var(--red); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 18px 20px; margin-bottom: 24px; }
.panel h2 { font: 700 18px/1.3 var(--sans); margin: 0 0 12px; }
.panel h2:not(:first-child) { margin-top: 22px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 5px; font-size: 14px; font-weight: 600; }
.form label small { font-weight: 400; color: var(--muted); }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.form input:not([type="checkbox"]), .form textarea, .form select {
  font: 15px/1.45 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 5px; padding: 9px 11px; width: 100%;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form label.check input { width: 16px; height: 16px; accent-color: var(--red); }
.req { color: var(--red); }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.btn { display: inline-block; font: 600 14px/1 var(--sans); background: var(--red); color: #fff; border: 1px solid var(--red); border-radius: 5px; padding: 11px 16px; cursor: pointer; justify-self: start; }
.btn:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--chip); border-color: var(--rule); }
.btn-sm { padding: 6px 9px; font-size: 12.5px; }
.btn-danger { color: var(--red); }
.btn.btn-danger:not(.btn-ghost) { color: #fff; }
td.actions { white-space: nowrap; }
td.actions form { display: inline; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.pill-ok { background: #dff3e7; color: #17663a; }
.pill-work { background: #e3ecfb; color: #1d4f9c; }
.pill-wait { background: #f3eedf; color: #7a5a0b; }
.pill-err { background: #fbe3e6; color: #a50d26; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill-ok { background: #173524; color: #7fd6a2; } :root:not([data-theme="light"]) .pill-work { background: #1b2a44; color: #93b6f0; } :root:not([data-theme="light"]) .pill-wait { background: #3a311a; color: #e6c46e; } :root:not([data-theme="light"]) .pill-err { background: #45161e; color: #ff8d99; } }
:root[data-theme="dark"] .pill-ok { background: #173524; color: #7fd6a2; }
.notice-warn { border-left-color: #d4a017; }
.notice { margin: 0 0 20px; }
.result { border-top: 1px solid var(--rule); margin-top: 14px; padding-top: 14px; }
.result .hl { font-size: 24px; }
details { margin: 16px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.dl dt { font-weight: 700; font-size: 13px; margin-top: 10px; }
.dl dd { margin: 2px 0 0; white-space: pre-wrap; color: var(--ink-2); font-size: 14px; }
pre { background: var(--chip); padding: 10px 12px; border-radius: 5px; overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
code { font-size: 0.92em; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } table.status { display: block; overflow-x: auto; } }
table.ranking td.rank { font: 700 18px/1.2 var(--serif); color: var(--muted); width: 32px; }
table.ranking tr:first-child td.rank { color: var(--red); }
table.ranking td.num { white-space: nowrap; }
table.ranking tr.pinned { background: color-mix(in srgb, var(--red) 5%, transparent); }
td.actions .acts { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- Leserbewertung ---------- */
.vote { margin-top: 32px; padding: 20px; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); text-align: center; scroll-margin-top: 70px; }
.vote h2 { font: 700 17px/1.3 var(--sans); margin: 0 0 14px; }
.vote-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.vote-btn { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: 11px 18px; cursor: pointer; transition: border-color .15s, background .15s; }
.vote-btn svg { width: 18px; height: 18px; color: var(--muted); }
.vote-btn:hover { border-color: var(--ink-2); }
.vote-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.vote-btn.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.vote-btn.is-active svg { color: var(--paper); }
.vote-msg { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---------- Social Media ---------- */
.thumb { display: block; width: 64px; height: auto; border-radius: 4px; }
.thumb-story { width: 44px; }
.thumb-card { width: 96px; }
table.social td { vertical-align: top; }
table.social details { margin: 6px 0 0; }
table.social pre { max-width: 460px; font-size: 12px; }
.small { font-size: 12.5px; }
.previews { display: grid; grid-template-columns: 1fr 1fr 0.62fr; gap: 10px; align-items: start; margin-bottom: 12px; }
.previews img { width: 100%; height: auto; border-radius: 4px; display: block; }
.previews a:last-child { grid-column: 1 / -1; }
ol.steps { padding-left: 20px; margin: 10px 0 4px; font-size: 14px; color: var(--ink-2); }
ol.steps li { margin: 5px 0; }
