/* The HorseLoop — Artikel-Template
   Cream / Light theme — matching Verzeichnis palette for readability.
   Navbar stays dark (brand chrome). */
:root {
  --bg: #f5ebd7;
  --bg-soft: #fffdf8;
  --bg-warm: #faf3e3;
  --ink: #1f3a32;
  --ink-soft: #42554c;
  --muted: #6f7d73;
  --muted-2: #98a39a;
  --line: #e6dcc6;
  --accent: #0A8C5C;
  --accent-deep: #087048;
  --danger: #c1493e;
  --ok: #4a8c37;

  --font-display: 'Fraunces', 'Source Serif 4', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 32px;

  --pad-x: clamp(20px, 5vw, 80px);
}
* { box-sizing: border-box; }
/* overflow-x: clip statt hidden — verhindert Horizontal-Scroll, bricht aber
   (anders als hidden) position:sticky nicht → die Artikel-Navbar bleibt sichtbar. */
html, body { margin: 0; padding: 0; overflow-x: clip; overscroll-behavior-x: none; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; }

/* Top bar — dark navy chrome (brand-consistent, like Verzeichnis) */
.article-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 24, 38, 0.92);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(13, 24, 38, 0.6);
  box-shadow: 0 2px 0 0 #3fbf8e, 0 6px 18px rgba(13, 24, 38, 0.18);
}
.article-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--pad-x);
}
.article-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #d1dce5;
  transition: color .15s;
}
.article-nav__back:hover { color: #3fbf8e; text-decoration: none; }
.article-nav__back svg { width: 16px; height: 16px; }
.article-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eaf1f5;
}
.article-nav__brand__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  font-variation-settings: "SOFT" 40, "opsz" 40;
}
.article-nav__brand__wordmark em {
  font-style: italic;
  font-weight: 500;
  color: #3fbf8e;
}
.article-nav__brand svg { width: 26px; height: 22px; color: #eaf1f5; }

/* Hero */
.article-hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px var(--pad-x) 32px;
}
.article-hero__kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.article-hero__kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--accent);
}
.article-hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variation-settings: "SOFT" 80, "opsz" 144, "wght" 450;
  font-weight: 400;
  margin: 0 0 24px;
  max-width: 22ch;
  text-wrap: balance;
}
.article-hero__title em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.article-hero__lede {
  font-size: 22px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 32px;
  text-wrap: pretty;
}
.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-hero__meta b { color: var(--ink); font-weight: 500; letter-spacing: 0.1em; }
.article-hero__meta__item { display: flex; align-items: center; gap: 8px; }
.article-hero__meta__item svg { width: 14px; height: 14px; color: var(--accent); }

.article-hero__image {
  margin: 32px 0 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-warm);
}
.article-hero__image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.article-hero__caption {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  margin-top: 12px;
  line-height: 1.6;
  padding: 0 var(--pad-x);
}

/* Body */
.article-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px var(--pad-x) 80px;
}

/* TL;DR Box */
.tldr {
  background: linear-gradient(135deg, rgba(10, 140, 92, 0.07) 0%, rgba(10, 140, 92, 0.02) 100%);
  border: 1px solid rgba(10, 140, 92, 0.18);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  margin: 0 0 48px;
  position: relative;
}
.tldr__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tldr__label::before {
  content: "";
  width: 20px; height: 1px;
  background: var(--accent);
}
.tldr__text {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.4;
  font-variation-settings: "SOFT" 70, "opsz" 24;
  font-weight: 400;
  margin: 0;
  color: var(--ink);
  text-wrap: pretty;
}

/* Prose */
.prose h2 {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 70, "opsz" 60;
  font-weight: 500;
  margin: 48px 0 16px;
  color: var(--ink);
  text-wrap: balance;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
  font-variation-settings: "SOFT" 60, "opsz" 36;
  font-weight: 500;
  margin: 32px 0 12px;
  color: var(--ink);
}
.prose p {
  margin: 0 0 24px;
  font-size: 22px;
  line-height: 1.7;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.prose p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 0.9;
  float: left;
  margin: 4px 12px 0 -2px;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-weight: 400;
  color: var(--accent);
}
.prose ul, .prose ol {
  margin: 0 0 28px;
  padding-left: 24px;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1.7;
}
.prose ul li, .prose ol li {
  margin-bottom: 8px;
}
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--accent); font-family: var(--font-mono); font-size: 14px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; color: var(--ink); }
.prose blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.4;
  font-variation-settings: "SOFT" 80, "opsz" 36;
  font-style: italic;
  color: var(--ink);
  text-wrap: pretty;
}

/* "Das Wichtigste in Kürze" */
.keypoints {
  margin-top: 56px;
  padding: 36px 36px 32px;
  background: var(--bg-soft);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(74, 52, 33, 0.06);
}
.keypoints__title {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.1;
  font-variation-settings: "SOFT" 70, "opsz" 36;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--ink);
}
.keypoints__title em { font-style: italic; color: var(--accent); }
.keypoints__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.keypoints__list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}
.keypoints__list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.keypoints__list li::before {
  content: "";
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.18;
  position: relative;
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* Related articles */
.related {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px var(--pad-x) 80px;
  border-top: 1px solid var(--line);
}
.related__title {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  font-variation-settings: "SOFT" 70, "opsz" 60;
  font-weight: 500;
  margin: 0 0 32px;
  color: var(--ink);
}
.related__title em { font-style: italic; color: var(--accent); }
.related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-soft);
  transition: all .3s;
  color: inherit;
}
.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(10, 140, 92, 0.25);
  box-shadow: 0 12px 28px rgba(74, 52, 33, 0.1), 0 4px 10px rgba(74, 52, 33, 0.06);
  text-decoration: none;
}
.related-card__media {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-warm);
}
.related-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.related-card:hover .related-card__media img { transform: scale(1.05); }
.related-card__body {
  padding: 18px 20px 20px;
}
.related-card__cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.related-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
  font-variation-settings: "SOFT" 60, "opsz" 36;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

/* Footer */
.article-foot {
  padding: 32px var(--pad-x) 48px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-foot a { color: var(--muted); }
.article-foot a:hover { color: var(--accent); }

/* ───────────── Article-Hero Bookmark (cream pill on cream page) ───────────── */
.article-bm {
  margin: 0 0 20px;
  display: flex;
  justify-content: flex-start;
}
.article-hero .bm-btn.bm-btn--lg {
  --bm-size: auto;
  width: auto;
  height: auto;
  border-radius: 999px;
  padding: 9px 18px 9px 14px;
  gap: 8px;
  background: var(--bg-soft);
  color: var(--ink);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  box-shadow: 0 2px 10px -6px rgba(74, 52, 33, 0.12);
}
.article-hero .bm-btn.bm-btn--lg:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(10, 140, 92, 0.4);
  color: var(--accent-deep);
}
.article-hero .bm-btn.bm-btn--lg.is-on {
  background: rgba(10, 140, 92, 0.08);
  border-color: rgba(10, 140, 92, 0.4);
  color: var(--accent-deep);
}
.article-hero .bm-btn.bm-btn--lg svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  transition: fill 0.18s ease;
}
.article-hero .bm-btn.bm-btn--lg.is-on svg {
  fill: var(--accent);
  stroke: var(--accent);
}
.article-hero .bm-btn.bm-btn--lg .bm-btn__label {
  white-space: nowrap;
}

.article-figure {
  margin: 40px 0;
  padding: 0;
}
.article-figure img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}
.article-figure figcaption {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  margin-top: 12px;
  line-height: 1.5;
}

.sources {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.sources__title {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--ink);
}
.sources__list {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  padding-left: 20px;
}
.sources__list li {
  margin-bottom: 10px;
  overflow-wrap: break-word; /* lange DOIs/bare URLs in Zitaten umbrechen statt horizontal überlaufen (Mobile-Wobble) */
}
.sources__list a {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-word;
}
.sources__note {
  margin-top: 20px;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}
.sources__note code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(31, 58, 50, 0.07);
  padding: 1px 6px;
  border-radius: 4px;
}

.tldr__list {
  margin: 0;
  padding-left: 20px;
  font-size: 18px;
  line-height: 1.65;
}
.tldr__list li {
  margin-bottom: 8px;
}

@media (max-width: 720px) {
  .article-hero__title { font-size: clamp(32px, 8vw, 52px); }
  .article-hero__lede { font-size: 18px; }
  .related__grid { grid-template-columns: 1fr; }
  .prose p:first-of-type::first-letter { font-size: 48px; }
  .keypoints { padding: 28px 24px; }
  .tldr { padding: 22px 24px; }
}

/* Lightbox overlay (click figure to zoom) — stays dark */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  cursor: zoom-out;
  animation: lightbox-fade 0.18s ease;
}
.lightbox-overlay img {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.28); }
@keyframes lightbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   Comparison / Data Tables
   ═══════════════════════════════════════════════════════════ */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 32px 0 40px;
  table-layout: fixed;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

/* Scrollable wrapper — break out of prose padding for more room */
.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px calc(-1 * var(--pad-x, 20px)) 40px;
  padding: 0 var(--pad-x, 20px);
  border-radius: 12px;
}
.comparison-table-wrap .comparison-table {
  margin: 0;
  border-radius: 12px;
}

/* Header */
.comparison-table thead th {
  background: rgba(10, 140, 92, 0.08);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 10px 10px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid rgba(10, 140, 92, 0.15);
}

/* Last header column may wrap */
.comparison-table thead th:last-child {
  white-space: normal;
}

/* Body cells */
.comparison-table tbody td {
  padding: 10px 10px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* First column (model name) — highlighted */
.comparison-table tbody td:first-child {
  color: var(--ink);
  font-weight: 500;
}
.comparison-table tbody td:first-child strong {
  color: var(--ink);
}

/* Zebra striping */
.comparison-table tbody tr:nth-child(odd) {
  background: transparent;
}
.comparison-table tbody tr:nth-child(even) {
  background: rgba(31, 58, 50, 0.03);
}

/* Row hover */
.comparison-table tbody tr:hover {
  background: rgba(10, 140, 92, 0.06);
}

/* Last row — no bottom border */
.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

/* Column dividers for better scannability */
.comparison-table th + th,
.comparison-table td + td {
  border-left: 1px solid var(--line);
}

/* Responsive: tighter on small screens */
@media (max-width: 640px) {
  .comparison-table {
    font-size: 12px;
    table-layout: auto;
  }
  .comparison-table thead th {
    font-size: 9px;
    padding: 8px 8px;
  }
  .comparison-table tbody td {
    padding: 8px 8px;
  }
}
