/* Kapitalruhe — theme.css
 * Design tokens + BEM rules. Single source of truth.
 * Portable to WordPress + Kadence (no Tailwind @apply, no CSS-in-JS).
 */

:root {
  /* Colors */
  --c-tinte:      #1A1F1C;
  --c-papier:     #F7F4EF;
  --c-porzellan:  #FBFAF6;
  --c-forst:      #2F5249;
  --c-forst-dark: #244039;
  --c-kupfer:     #A06A3E;
  --c-stein:      #6B6F69;
  --c-asche:      #E8E3DA;

  /* Type scale */
  --t-display-size: 4rem;     --t-display-lh: 1.08; --t-display-weight: 600;
  --t-h2-size: 2rem;          --t-h2-lh: 1.20;      --t-h2-weight: 600;
  --t-h3-size: 1.5rem;        --t-h3-lh: 1.30;      --t-h3-weight: 600;
  --t-h4-size: 1.125rem;      --t-h4-lh: 1.40;      --t-h4-weight: 600;
  --t-lead-size: 1.25rem;     --t-lead-lh: 1.60;    --t-lead-weight: 400;
  --t-body-size: 1.125rem;    --t-body-lh: 1.70;    --t-body-weight: 400;
  --t-meta-size: 0.875rem;    --t-meta-lh: 1.50;    --t-meta-weight: 500;
  --t-stand-size: 0.8125rem;  --t-stand-lh: 1.50;   --t-stand-weight: 500;

  /* Spacing */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Layout */
  --w-page: 1180px;
  --w-text: 680px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* Reset basics */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--t-body-size);
  line-height: var(--t-body-lh);
  font-weight: 400;
  color: var(--c-tinte);
  background: var(--c-papier);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; color: var(--c-tinte); }
p { margin: 0; }
a { color: var(--c-forst); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Tabular numerics utility */
.kr-tnum { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* Focus */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--c-forst); outline-offset: 2px; }

/* Skip link — visually hidden until focus */
.kr-skip-link {
  position: absolute;
  left: var(--s-4); top: var(--s-4);
  background: var(--c-papier);
  color: var(--c-forst);
  padding: var(--s-3) var(--s-5);
  font-weight: 500;
  border: 1px solid var(--c-forst);
  border-radius: 4px;
  z-index: 1000;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  width: 1px; height: 1px;
  overflow: hidden; white-space: nowrap;
}
.kr-skip-link:focus, .kr-skip-link:focus-visible {
  clip: auto; clip-path: none;
  width: auto; height: auto;
  overflow: visible; white-space: normal;
}

/* Container */
.kr-container {
  max-width: var(--w-page);
  margin: 0 auto;
  padding-left: var(--s-5);
  padding-right: var(--s-5);
}

/* Eyebrow */
.kr-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-forst);
}

.kr-meta {
  font-size: var(--t-meta-size);
  line-height: var(--t-meta-lh);
  color: var(--c-stein);
  font-weight: 500;
}

/* ================ MASTHEAD ================ */
.kr-masthead {
  background: var(--c-papier);
  padding-top: var(--s-7);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid hsla(38, 22%, 86%, 0.6);
}
.kr-masthead__wordmark {
  font-size: 36px;
  font-weight: 700;
  color: var(--c-tinte);
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.kr-masthead__wordmark a { color: inherit; }
.kr-masthead__wordmark a:hover { text-decoration: none; }
.kr-masthead__tagline {
  margin-top: var(--s-2);
  font-size: 14px;
  font-weight: 400;
  color: var(--c-stein);
  line-height: 1.5;
}
.kr-masthead__nav {
  margin-top: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
}
.kr-masthead__nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--c-stein);
}
.kr-masthead__nav a:hover { color: var(--c-tinte); text-decoration: none; }

@media (max-width: 1023px) {
  .kr-masthead__wordmark { font-size: 32px; }
}
@media (max-width: 767px) {
  .kr-masthead__wordmark { font-size: 28px; }
}

/* ================ SYSTEM LIST (Hero right column) ================ */
.kr-hero__system { grid-column: 9 / span 4; align-self: start; }
.kr-system-list {
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  margin-top: var(--s-5);
}
.kr-system-list__eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-forst);
  margin-bottom: var(--s-2);
}
.kr-system-list__item { display: block; }
.kr-system-list__head {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--c-tinte);
}
.kr-system-list__num {
  color: var(--c-forst);
  font-weight: 500;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  margin-right: var(--s-2);
}
.kr-system-list__ctx {
  margin-top: var(--s-2);
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-stein);
}
@media (max-width: 1023px) {
  .kr-hero__system { display: none; }
}

/* ================ HERO ================ */
.kr-hero {
  padding-top: var(--s-10);
  padding-bottom: var(--s-9);
}
.kr-hero__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-5);
}
.kr-hero__content {
  grid-column: 1 / span 8;
}
.kr-hero__h1 {
  margin-top: var(--s-5);
  font-size: var(--t-display-size);
  line-height: var(--t-display-lh);
  font-weight: var(--t-display-weight);
  letter-spacing: -0.02em;
  color: var(--c-tinte);
}
.kr-hero__standfirst {
  margin-top: var(--s-6);
  font-size: var(--t-lead-size);
  line-height: var(--t-lead-lh);
  color: var(--c-stein);
  max-width: 540px;
}
.kr-hero__link {
  display: inline-block;
  margin-top: var(--s-5);
  color: var(--c-forst);
  font-size: var(--t-body-size);
  font-weight: 500;
}

/* ================ TOPIC GRID ================ */
.kr-topic-grid-wrap {
  padding-top: var(--s-7);
  padding-bottom: var(--s-9);
}
.kr-topic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--c-asche);
  padding: 1px;
}
.kr-topic-grid__cell {
  background: var(--c-papier);
  padding: var(--s-7);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.kr-topic-grid__cell:hover { background: var(--c-porzellan); }
.kr-topic-grid__h3 {
  font-size: var(--t-h3-size);
  line-height: var(--t-h3-lh);
  font-weight: var(--t-h3-weight);
}
.kr-topic-grid__hook {
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-stein);
}
.kr-topic-grid__signal {
  margin-top: auto;
  padding-top: var(--s-4);
  font-size: 14px;
  color: var(--c-stein);
  border-top: 1px solid var(--c-asche);
}

/* ================ FEATURED ================ */
.kr-featured {
  background: var(--c-porzellan);
  padding-top: var(--s-9);
  padding-bottom: var(--s-9);
}
.kr-featured__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-5);
}
.kr-featured__side { grid-column: 1 / span 4; }
.kr-featured__main { grid-column: 5 / span 8; }
.kr-featured__date { margin-top: var(--s-3); color: var(--c-stein); font-size: 14px; }
.kr-featured__h2 {
  font-size: var(--t-h2-size);
  line-height: var(--t-h2-lh);
  font-weight: var(--t-h2-weight);
  letter-spacing: -0.01em;
}
.kr-featured__standfirst {
  margin-top: var(--s-5);
  font-size: var(--t-lead-size);
  line-height: var(--t-lead-lh);
  color: var(--c-stein);
}
.kr-featured__link {
  display: inline-block;
  margin-top: var(--s-5);
  color: var(--c-forst);
  font-weight: 500;
}

/* ================ TRUST ================ */
.kr-trust { padding-top: var(--s-9); padding-bottom: var(--s-9); }
.kr-trust__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-5);
}
.kr-trust__portrait { grid-column: 1 / span 4; }
.kr-trust__portrait-img {
  width: 240px;
  height: 300px;
  background: var(--c-stein);
}
.kr-trust__portrait-caption {
  margin-top: var(--s-3);
  font-size: 14px;
  color: var(--c-stein);
}
.kr-trust__text { grid-column: 6 / span 6; }
.kr-trust__h3 {
  font-size: var(--t-h3-size);
  line-height: var(--t-h3-lh);
  font-weight: var(--t-h3-weight);
}
.kr-trust__bio {
  margin-top: var(--s-5);
  font-size: 18px;
  line-height: 1.75;
  color: var(--c-tinte);
}
.kr-trust__links {
  margin-top: var(--s-5);
  display: flex;
  gap: var(--s-5);
}
.kr-trust__links a { color: var(--c-forst); font-weight: 500; }

/* ================ NEWSLETTER ================ */
.kr-newsletter {
  padding-top: var(--s-9);
  padding-bottom: var(--s-9);
  border-top: 1px solid var(--c-asche);
}
.kr-newsletter__inner {
  max-width: 640px;
  margin: 0 auto;
}
.kr-newsletter__h3 {
  font-size: var(--t-h3-size);
  line-height: var(--t-h3-lh);
  font-weight: var(--t-h3-weight);
}
.kr-newsletter__copy {
  margin-top: var(--s-4);
  font-size: 18px;
  line-height: 1.6;
  color: var(--c-stein);
  max-width: 520px;
}
.kr-newsletter__copy p { margin: 0; }
.kr-newsletter__copy p + p { margin-top: var(--s-1); }
.kr-newsletter__form {
  margin-top: var(--s-6);
  display: flex;
  gap: var(--s-3);
}
.kr-input {
  flex: 1;
  font-family: inherit;
  font-size: 16px;
  padding: var(--s-3) var(--s-4);
  background: var(--c-papier);
  color: var(--c-tinte);
  border: 1px solid var(--c-asche);
  border-radius: 4px;
}
.kr-input:focus-visible {
  outline: 2px solid var(--c-forst);
  outline-offset: 0;
  border-color: var(--c-forst);
}
.kr-btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  padding: var(--s-3) var(--s-5);
  background: var(--c-forst);
  color: var(--c-papier);
  border: 1px solid var(--c-forst);
  border-radius: 4px;
  cursor: pointer;
  transition: background 150ms ease;
}
.kr-btn:hover { background: var(--c-forst-dark); border-color: var(--c-forst-dark); }
.kr-newsletter__fine {
  margin-top: var(--s-4);
  font-size: 13px;
  color: var(--c-stein);
}
.kr-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ================ FOOTER ================ */
.kr-footer {
  border-top: 1px solid var(--c-asche);
  background: var(--c-papier);
  padding-top: var(--s-9);
  padding-bottom: var(--s-7);
}
.kr-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s-7);
}
.kr-footer__wordmark { font-size: 20px; font-weight: 600; color: var(--c-tinte); }
.kr-footer__tagline { margin-top: var(--s-2); font-size: 14px; color: var(--c-stein); }
.kr-footer__copy { margin-top: var(--s-4); font-size: 14px; color: var(--c-stein); }
.kr-footer__links { display: flex; flex-direction: column; gap: var(--s-2); }
.kr-footer__links a { color: var(--c-stein); font-size: 14px; }
.kr-footer__links a:hover { color: var(--c-tinte); }
.kr-footer__disclaimer { font-size: 14px; color: var(--c-stein); max-width: 280px; line-height: 1.5; }

/* ================ ARTICLE ================ */
.kr-article-wrap { padding-top: var(--s-9); padding-bottom: var(--s-10); }
.kr-article {
  max-width: var(--w-text);
  margin: 0 auto;
}
.kr-breadcrumb { font-size: 14px; color: var(--c-stein); }
.kr-breadcrumb a { color: var(--c-stein); }
.kr-breadcrumb a:hover { color: var(--c-tinte); }
.kr-breadcrumb__sep { margin: 0 var(--s-2); color: var(--c-asche); }

.kr-article__eyebrow { margin-top: var(--s-6); }
.kr-article__h1 {
  margin-top: var(--s-4);
  font-size: 2.75rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.kr-article__lead {
  margin-top: var(--s-6);
  font-size: 20px;
  line-height: 1.6;
  color: var(--c-tinte);
}
.kr-article__meta {
  margin-top: var(--s-6);
  font-size: 14px;
  color: var(--c-stein);
  font-weight: 500;
}
.kr-article__affiliate {
  margin-top: var(--s-3);
  font-size: 15px;
  color: var(--c-tinte);
  font-weight: 500;
  border-bottom: 1px solid var(--c-kupfer);
  display: inline-block;
  padding-bottom: 2px;
}

.kr-article__body { margin-top: var(--s-8); }
.kr-article__body p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--c-tinte);
  margin-bottom: var(--s-5);
}
.kr-article__body h2 {
  font-size: var(--t-h2-size);
  line-height: var(--t-h2-lh);
  font-weight: 600;
  margin-top: var(--s-8);
  margin-bottom: var(--s-5);
  letter-spacing: -0.01em;
}
.kr-article__body h3 {
  font-size: var(--t-h3-size);
  line-height: var(--t-h3-lh);
  font-weight: 600;
  margin-top: var(--s-7);
  margin-bottom: var(--s-4);
}
.kr-article__body a { color: var(--c-forst); }
.kr-article__body a:hover { text-decoration: underline; text-underline-offset: 3px; }

.kr-answer-first {
  border-left: 2px solid var(--c-forst);
  padding: var(--s-2) 0 var(--s-2) var(--s-4);
  margin: var(--s-5) 0 var(--s-6);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.6;
  color: var(--c-tinte);
}

.kr-pullquote {
  border-left: 2px solid var(--c-forst);
  padding: var(--s-2) 0 var(--s-2) var(--s-5);
  margin: var(--s-7) 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--c-tinte);
}

.kr-methodology {
  background: var(--c-porzellan);
  padding: var(--s-5);
  margin: var(--s-6) 0;
  border: 1px solid var(--c-asche);
  border-radius: 4px;
}
.kr-methodology__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-tinte);
  margin-bottom: var(--s-3);
}
.kr-methodology p, .kr-methodology li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-tinte);
}
.kr-methodology ul { padding-left: var(--s-5); margin: var(--s-2) 0; }

/* Anbieter-Karte */
.kr-anbieter-karte {
  background: var(--c-porzellan);
  border: 1px solid var(--c-asche);
  border-radius: 4px;
  padding: var(--s-5);
  margin: var(--s-6) 0;
}
.kr-anbieter-karte__name {
  font-size: var(--t-h4-size);
  font-weight: 600;
  color: var(--c-tinte);
}
.kr-anbieter-karte__context {
  margin-top: var(--s-3);
  font-size: 18px;
  line-height: 1.55;
  color: var(--c-tinte);
}
.kr-anbieter-karte__criteria {
  margin-top: var(--s-4);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--c-asche);
}
.kr-anbieter-karte__criteria li {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--c-asche);
  font-size: 15px;
  color: var(--c-tinte);
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
}
.kr-anbieter-karte__criteria li > span:first-child { color: var(--c-stein); }
.kr-anbieter-karte__foot {
  margin-top: var(--s-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
}
.kr-anbieter-karte__method-link {
  font-size: 13px;
  color: var(--c-stein);
}
.kr-anbieter-karte__cta {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-forst);
}

.kr-ymyl {
  background: var(--c-porzellan);
  border: 1px solid var(--c-asche);
  border-radius: 4px;
  padding: var(--s-5);
  margin: var(--s-8) 0 var(--s-6);
}
.kr-ymyl__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-tinte);
  margin-bottom: var(--s-3);
}
.kr-ymyl p { font-size: 16px; line-height: 1.6; color: var(--c-stein); margin: 0; }

.kr-cluster {
  margin-top: var(--s-9);
  border-top: 1px solid var(--c-asche);
  padding-top: var(--s-6);
}
.kr-cluster__title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-forst);
  margin-bottom: var(--s-5);
}
.kr-cluster__list { list-style: none; padding: 0; margin: 0; }
.kr-cluster__list li {
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--c-asche);
}
.kr-cluster__list li:last-child { border-bottom: 0; }
.kr-cluster__list a {
  font-size: 18px;
  font-weight: 500;
  color: var(--c-tinte);
}
.kr-cluster__list a:hover { color: var(--c-forst); text-decoration: none; }
.kr-cluster__meta {
  display: block;
  margin-top: var(--s-1);
  font-size: 14px;
  font-weight: 400;
  color: var(--c-stein);
}

/* TOC sticky */
.kr-article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  max-width: var(--w-page);
  margin: 0 auto;
  padding-left: var(--s-5);
  padding-right: var(--s-5);
}

@media (min-width: 1024px) {
  .kr-article-layout {
    grid-template-columns: 220px 1fr 220px;
  }
  .kr-toc {
    grid-column: 1;
    position: sticky;
    top: var(--s-7);
    align-self: start;
    max-height: calc(100vh - var(--s-7) * 2);
    overflow: auto;
  }
  .kr-article { grid-column: 2; max-width: var(--w-text); margin: 0; }
}

.kr-toc__title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-forst);
  margin-bottom: var(--s-3);
}
.kr-toc ol { list-style: none; padding: 0; margin: 0; }
.kr-toc li { padding: var(--s-2) 0; border-bottom: 1px solid var(--c-asche); }
.kr-toc li:last-child { border-bottom: 0; }
.kr-toc a { font-size: 14px; color: var(--c-stein); line-height: 1.4; display: block; }
.kr-toc a:hover { color: var(--c-tinte); text-decoration: none; }

/* ================ RESPONSIVE ================ */
@media (max-width: 1023px) {
  .kr-toc { display: none; }
}

@media (max-width: 767px) {
  :root {
    --t-display-size: 2.5rem;
  }
  .kr-hero { padding-top: var(--s-8); padding-bottom: var(--s-7); }
  .kr-hero__content { grid-column: 1 / -1; }
  .kr-topic-grid { grid-template-columns: 1fr; }
  .kr-topic-grid__cell { padding: var(--s-6); }
  .kr-featured__side, .kr-featured__main,
  .kr-trust__portrait, .kr-trust__text { grid-column: 1 / -1; }
  .kr-trust__text { margin-top: var(--s-6); }
  .kr-featured__main { margin-top: var(--s-5); }
  .kr-footer__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .kr-newsletter__form { flex-direction: column; }
  .kr-article__h1 { font-size: 2rem; }
  .kr-trust__portrait-img { width: 100%; max-width: 240px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root { --t-display-size: 3rem; }
  .kr-hero__content { grid-column: 1 / span 10; }
  .kr-topic-grid { grid-template-columns: 1fr 1fr; }
}

/* Inline source citation */
.kr-cite {
  color: var(--c-forst);
  font-weight: 500;
  white-space: nowrap;
}

/* Article body table */
.kr-table-wrap { margin: var(--s-5) 0 var(--s-6); }
.kr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
}
.kr-table th, .kr-table td {
  border: 1px solid var(--c-asche);
  padding: var(--s-3) var(--s-4);
  text-align: left;
  vertical-align: top;
  background: var(--c-papier);
}
.kr-table th {
  font-weight: 600;
  color: var(--c-tinte);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.kr-table td.kr-num {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Body bullet list */
.kr-article__body ul {
  margin: var(--s-4) 0 var(--s-6);
  padding-left: var(--s-5);
}
.kr-article__body ul li {
  font-size: 18px;
  line-height: 1.7;
  color: var(--c-tinte);
  margin-bottom: var(--s-3);
}

/* Force pull-quote non-italic (override any UA blockquote default) */
blockquote.kr-pullquote { font-style: normal; quotes: none; margin-left: 0; margin-right: 0; }
blockquote.kr-pullquote::before, blockquote.kr-pullquote::after { content: none; }

/* Sources block at article end */
.kr-sources { margin-top: var(--s-6); }
.kr-sources__title {
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--c-forst); margin-bottom: var(--s-3);
}
.kr-sources ul { list-style: none; padding: 0; margin: 0; }
.kr-sources li {
  font-size: 15px; color: var(--c-stein);
  padding: var(--s-2) 0; border-bottom: 1px solid var(--c-asche);
}
.kr-sources li:last-child { border-bottom: 0; }
