.tk-studie {
  color-scheme: light;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6f6d68;
  --line: #e1e0d9;
  --axis: #c3c2b7;
  --surface: #ffffff;
  --tint: #f6f5f2;
  --accent: #2a78d6;
  --link: #1c5cab;
  --bar-muted: #c9c7bf;
  --bar-h: 18px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 16px 64px;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}
.tk-studie *, .tk-studie *::before, .tk-studie *::after { box-sizing: border-box; }
.tk-studie h1 { font-size: clamp(1.75rem, 4.6vw, 2.5rem); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 12px; font-weight: 700; }
.tk-studie h2 { font-size: 1.5rem; line-height: 1.25; margin: 56px 0 12px; font-weight: 700; scroll-margin-top: 24px; position: relative; }
.tk-studie h3 { font-size: 1.05rem; margin: 28px 0 8px; font-weight: 650; }
.tk-studie p { margin: 0 0 16px; }
.tk-studie .tk-lead { font-size: 1.15rem; color: var(--ink-2); margin-bottom: 20px; }
.tk-studie .tk-meta { font-size: 0.9rem; color: var(--muted); margin: 0 0 28px; }
.tk-studie a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.tk-studie a:hover { text-decoration-thickness: 2px; }
.tk-studie ul, .tk-studie ol { margin: 0 0 20px; padding-left: 1.4em; }
.tk-studie li { margin-bottom: 8px; }
.tk-studie strong { font-weight: 650; }
.tk-studie .tk-anchor { position: absolute; left: -1.1em; width: 1em; color: var(--axis); text-decoration: none; opacity: 0; transition: opacity .15s; }
.tk-studie h2:hover .tk-anchor, .tk-studie .tk-anchor:focus { opacity: 1; }

/* Inhaltsverzeichnis */
.tk-studie nav.tk-toc { background: var(--tint); border-radius: 8px; padding: 16px 20px; margin: 0 0 32px; font-size: 0.95rem; }
.tk-studie nav.tk-toc p { font-weight: 650; margin: 0 0 6px; }
.tk-studie nav.tk-toc ol { margin: 0; padding-left: 1.3em; columns: 2 16rem; column-gap: 32px; }
.tk-studie nav.tk-toc li { margin: 0 0 4px; break-inside: avoid; }

/* Kennzahlen */
.tk-studie .tk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 28px; }
.tk-studie .tk-stat { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: var(--surface); }
.tk-studie .tk-stat-value { display: block; font-size: 2rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.tk-studie .tk-stat-label { display: block; font-size: 0.92rem; line-height: 1.4; color: var(--ink); margin-bottom: 8px; }
.tk-studie .tk-stat-source { display: block; font-size: 0.8rem; color: var(--muted); }
.tk-studie .tk-stat-source a { color: var(--muted); }

/* Tabellen */
.tk-studie .tk-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 8px; }
.tk-studie table { border-collapse: collapse; width: 100%; font-size: 0.9rem; line-height: 1.45; }
.tk-studie th, .tk-studie td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tk-studie thead th { background: var(--tint); font-weight: 650; }
.tk-studie tbody tr:last-child td { border-bottom: 0; }
.tk-studie td.num, .tk-studie th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tk-studie td.num { white-space: nowrap; }
.tk-studie table.tk-wide { min-width: 640px; }
.tk-studie .tk-note { font-size: 0.88rem; color: var(--ink-2); }

/* Diagramme */
.tk-studie figure.tk-chart { margin: 8px 0 24px; padding: 20px 20px 14px; border: 1px solid var(--line); border-radius: 8px; }
.tk-studie .tk-chart-title { font-size: 1.05rem; font-weight: 650; line-height: 1.35; margin: 0 0 4px; }
.tk-studie .tk-chart-sub { font-size: 0.88rem; color: var(--ink-2); margin: 0 0 16px; }
.tk-studie .tk-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.82rem; color: var(--ink-2); margin: -6px 0 14px; padding: 0; list-style: none; }
.tk-studie .tk-legend li { margin: 0; display: flex; align-items: center; gap: 6px; }
.tk-studie .tk-swatch { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.tk-studie .tk-bars { display: grid; grid-template-columns: minmax(7.5rem, 13rem) 1fr; row-gap: 10px; column-gap: 12px; align-items: center; }
.tk-studie .tk-bars.has-extra { grid-template-columns: minmax(7.5rem, 13rem) 1fr 4.2rem; }
.tk-studie .tk-bars.val-left { --res: 0.5rem; grid-template-columns: minmax(7.5rem, 13rem) 3.4rem 1fr; }
.tk-studie .tk-bars.val-left .tk-val { text-align: right; }
.tk-studie .tk-bars-head { font-size: 0.78rem; color: var(--muted); line-height: 1.3; align-self: end; }
.tk-studie .tk-bars-head.right { text-align: right; }
.tk-studie .tk-bar-label { font-size: 0.88rem; line-height: 1.3; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; min-width: 0; }
.tk-studie .tk-bar-label small { display: block; color: var(--muted); font-size: 0.78rem; }
.tk-studie .tk-track { position: relative; display: flex; align-items: center; gap: 8px; min-height: 26px; border-left: 1px solid var(--axis); }
.tk-studie .tk-bar { height: var(--bar-h); width: calc((100% - var(--res, 3.6rem)) * var(--v)); min-width: 3px; background: var(--bar-muted); border-radius: 0 4px 4px 0; flex: none; }
.tk-studie .tk-bar.hi { background: var(--accent); }
.tk-studie .tk-val { font-size: 0.85rem; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tk-studie .tk-extra { font-size: 0.85rem; color: var(--ink-2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tk-studie .tk-ref { position: absolute; top: -4px; bottom: -4px; left: calc((100% - var(--res, 3.6rem)) * var(--r)); border-left: 1px dashed var(--muted); pointer-events: none; }
.tk-studie .tk-ref-label { font-size: 0.75rem; color: var(--muted); position: relative; height: 1.2em; }
.tk-studie .tk-ref-label span { position: absolute; left: calc((100% - var(--res, 3.6rem)) * var(--r) + 6px); white-space: nowrap; }
.tk-studie figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 14px; line-height: 1.45; }
.tk-studie details { margin-top: 10px; font-size: 0.88rem; }
.tk-studie summary { cursor: pointer; color: var(--link); }
.tk-studie details .tk-table-wrap { margin-top: 10px; }

/* Zitieren */
.tk-studie blockquote { margin: 0 0 16px; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--tint); border-radius: 0 8px 8px 0; font-size: 1.02rem; }
.tk-studie .tk-cite { border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.tk-studie .tk-copy { margin: 0 0 16px; }
.tk-studie .tk-copy-label { font-size: 0.82rem; font-weight: 650; color: var(--ink-2); margin: 0 0 6px; display: block; }
.tk-studie .tk-copy-row { display: flex; gap: 8px; align-items: stretch; }
.tk-studie .tk-copy-row code { flex: 1; min-width: 0; display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.5; background: var(--tint); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; overflow-wrap: anywhere; color: var(--ink); }
.tk-studie button.tk-copy-btn { flex: none; font: inherit; font-size: 0.82rem; padding: 6px 12px; border: 1px solid var(--axis); border-radius: 6px; background: var(--surface); color: var(--ink); cursor: pointer; }
.tk-studie button.tk-copy-btn:hover { background: var(--tint); }
.tk-studie ol.tk-sources li { font-size: 0.92rem; }

@media (max-width: 560px) {
  .tk-studie { font-size: 16px; padding-top: 28px; }
  .tk-studie h2 { font-size: 1.3rem; margin-top: 44px; }
  .tk-studie figure.tk-chart { padding: 16px 12px 12px; }
  .tk-studie .tk-bars, .tk-studie .tk-bars.has-extra { column-gap: 8px; }
  .tk-studie .tk-bars { grid-template-columns: 7rem 1fr; }
  .tk-studie .tk-bars.has-extra { grid-template-columns: 7rem 1fr 2.9rem; }
  .tk-studie .tk-bars.val-left { grid-template-columns: 7rem 3rem 1fr; }
  .tk-studie .tk-copy-row { flex-direction: column; }
  .tk-studie .tk-anchor { display: none; }
}
@media print {
  .tk-studie nav.tk-toc, .tk-studie button.tk-copy-btn, .tk-studie .tk-anchor { display: none; }
  .tk-studie details { display: none; }
}

/* Einbettung in Ecommax: Lesefläche und Inhaltsstruktur der Vorlage erhalten. */
.tk-studie { font-family: var(--font-sans); --accent:#3f5a12; --link:#355716; padding-inline:24px; }
.tk-studie ul { list-style:disc; }
.tk-studie ol { list-style:decimal; }
.tk-studie .tk-legend { list-style:none; }
.tk-studie a:focus-visible,.tk-studie button:focus-visible { outline:2px solid #3f5a12; outline-offset:4px; }
.tk-studie .tk-table-wrap { max-width:100%; }
.tk-studie .tk-copy-status { font-size:14px; color:var(--ink-2); }
@media (max-width:560px) { .tk-studie { padding-inline:18px; } }
@media (max-width:360px) {
  .tk-studie .tk-ref-label { height:2.7em; }
  .tk-studie .tk-ref-label span { left:0; right:0; white-space:normal; text-align:right; line-height:1.2; }
}
