/* Ratgeber — "Ruhige Redaktion": calm German editorial on the noflop
   brand. Standalone on purpose: the static pages must not depend on
   Vite's hashed CSS bundle. Token VALUES are duplicated from
   src/index.css (@theme, Stitch "Monastic Workspace"); if the app
   tokens ever change, update them here too.

   Signature elements: numbered section counters (echo of the paid
   report's numbered dimensions), inverted indigo lead card on the
   index, CSS scroll-driven reading-progress hairline. */

:root {
  --surface: #f9f9fb;
  --surface-container: #ebeef2;
  --surface-container-low: #f2f4f6;
  --surface-container-lowest: #ffffff;
  --primary: #4c56af;
  --primary-dim: #4049a2;
  --primary-container: #e0e0ff;
  --on-primary: #f9f6ff;
  --on-primary-container: #3f48a1;
  --on-surface: #2d3338;
  --on-surface-variant: #596065;
  --outline: #757c81;
  --outline-variant: #acb3b8;
  --font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-label: "Inter", ui-sans-serif, system-ui, sans-serif;
  --shadow-soft: 0 12px 32px -4px rgba(26, 35, 126, 0.06);
  --shadow-lift: 0 20px 44px -12px rgba(26, 35, 126, 0.14);
  --ease-zen: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --measure: 42rem;
}

@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope-VariableFont_wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* Paper light with a faint indigo wash at the top — never flat white. */
  background:
    radial-gradient(90% 26rem at 50% -6rem, rgba(76, 86, 175, 0.07), transparent 70%),
    var(--surface);
  color: var(--on-surface);
  font-family: var(--font-display);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}

::selection {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

a {
  color: var(--primary);
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--on-primary);
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0;
  z-index: 30;
}

.skip-link:focus {
  left: 0;
}

/* ── Header + reading progress ──────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(249, 249, 251, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(172, 179, 184, 0.25);
}

.site-header-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo img {
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav-link {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color 300ms var(--ease-zen);
}

.site-nav-link[aria-current] {
  color: var(--primary);
}

.site-nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: var(--on-primary);
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 300ms var(--ease-zen);
}

@media (max-width: 480px) {
  .site-header-inner {
    padding: 0 1rem;
    gap: 0.75rem;
  }
  .site-nav {
    gap: 1rem;
  }
  .site-nav-cta {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }
}

@media (hover: hover) {
  .site-nav-link:hover {
    color: var(--primary);
  }
  .site-nav-cta:hover {
    transform: scale(1.03);
  }
}

/* After the hover block so a pressed button scales down even mid-hover. */
.site-nav-cta:active {
  transform: scale(0.96);
}

/* Scroll-driven reading progress — a 2px indigo hairline that fills as
   the article scrolls. Progressive enhancement: browsers without
   animation-timeline simply never show it. */
.reading-progress {
  display: none;
}

@supports (animation-timeline: scroll()) {
  .reading-progress {
    display: block;
    position: absolute;
    left: 0;
    bottom: -3px;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dim));
    transform-origin: 0 50%;
    transform: scaleX(0);
    animation: reading-progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes reading-progress {
    to {
      transform: scaleX(1);
    }
  }
}

/* ── Shared column ──────────────────────────────────────── */

.article-main,
.index-main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5.5rem;
}

.article {
  max-width: var(--measure);
  margin: 0 auto;
}

/* ── Kicker system ──────────────────────────────────────── */

.article-kicker,
.index-item-kicker,
.index-kicker,
.cta-card-kicker {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 0.875rem;
}

/* ── Article header (staggered entrance) ────────────────── */

.breadcrumb {
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--on-surface-variant);
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.breadcrumb a {
  color: var(--on-surface-variant);
  text-decoration: none;
}

@media (hover: hover) {
  .breadcrumb a:hover {
    color: var(--primary);
  }
}

.article-title {
  font-size: clamp(2rem, 5.5vw, 3.125rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.08;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.article-teaser {
  font-size: 1.1875rem;
  line-height: 1.62;
  color: var(--on-surface-variant);
  margin: 0 0 1.75rem;
  text-wrap: pretty;
}

.article-meta,
.index-item-meta {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--on-surface-variant);
  display: flex;
  gap: 0.625rem;
  margin: 0;
}

.article-header {
  border-bottom: 1px solid rgba(172, 179, 184, 0.35);
  padding-bottom: 2.25rem;
  margin-bottom: 2.5rem;
}

.article-header > * {
  animation: rise-in 500ms var(--ease-out) both;
}

.article-header > :nth-child(2) { animation-delay: 60ms; }
.article-header > :nth-child(3) { animation-delay: 120ms; }
.article-header > :nth-child(4) { animation-delay: 180ms; }
.article-header > :nth-child(5) { animation-delay: 240ms; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── TOC ────────────────────────────────────────────────── */

.article-toc {
  background: var(--surface-container-low);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  margin-bottom: 3rem;
}

.article-toc-title {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin: 0 0 1rem;
}

.article-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.article-toc li {
  counter-increment: toc;
  margin: 0.5rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.article-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

.article-toc-note {
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--on-surface-variant);
  border-top: 1px solid rgba(172, 179, 184, 0.3);
  padding-top: 0.875rem;
  margin: 1rem 0 0;
}

.article-toc a {
  color: var(--on-surface);
  text-decoration: none;
  background-image: linear-gradient(var(--primary), var(--primary));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 300ms var(--ease-zen), color 300ms var(--ease-zen);
}

@media (hover: hover) {
  .article-toc a:hover {
    color: var(--primary);
    background-size: 100% 1px;
  }
}

/* ── Body copy with numbered sections ───────────────────── */

.article-body {
  font-size: 1.0625rem;
  counter-reset: section;
  text-wrap: pretty;
}

.article-body h2 {
  counter-increment: section;
  font-size: 1.5625rem;
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin: 3.25rem 0 1rem;
  scroll-margin-top: 5.5rem;
  text-wrap: balance;
}

/* The numbered counter — visual echo of the paid report's numbered
   dimensions (01/02/…). */
.article-body h2::before {
  content: counter(section, decimal-leading-zero);
  display: block;
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.375rem;
}

.article-body h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  margin: 2.25rem 0 0.75rem;
  scroll-margin-top: 5.5rem;
}

.article-body p {
  margin: 0 0 1.3125rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.3125rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin: 0.375rem 0;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 1px solid var(--outline-variant);
  color: var(--on-surface-variant);
  font-size: 1.125rem;
}

.article-body a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(76, 86, 175, 0.4);
  transition: text-decoration-color 300ms var(--ease-zen);
}

@media (hover: hover) {
  .article-body a:hover {
    text-decoration-color: var(--primary);
  }
}

.article-body strong {
  font-weight: 700;
  color: var(--on-surface);
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem auto 0.75rem;
  border: 1px solid rgba(172, 179, 184, 0.35);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-soft);
}

/* Caption convention: an italic-only paragraph directly after an image
   (the image may be wrapped in a lightbox link, hence no child combinator). */
.article-body p:has(img) + p > em:only-child {
  display: block;
  font-style: normal;
  font-family: var(--font-label);
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
  text-align: center;
}

/* ── Lightbox (images wrapped in a link open a <dialog>) ── */

.article-body a:has(> img) {
  display: block;
  cursor: zoom-in;
}

.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(94vw, 1200px);
  max-height: 94vh;
  cursor: zoom-out;
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 94vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid rgba(172, 179, 184, 0.35);
  border-radius: 0.75rem;
}

.lightbox::backdrop {
  background: rgba(23, 25, 27, 0.66);
}

.lightbox[open] {
  animation: lightbox-in 200ms var(--ease-zen);
}

@keyframes lightbox-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox[open] {
    animation: none;
  }
}

/* ── CTA card ───────────────────────────────────────────── */

.cta-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: var(--on-primary);
  border-radius: 1rem;
  padding: 2.5rem;
  margin-top: 3.5rem;
}

.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 55% at 22% -5%, rgba(255, 255, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.cta-card-kicker {
  color: rgba(249, 246, 255, 0.88); /* 4.5:1 on --primary (WCAG AA for the 11px label) */
}

.cta-card-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

.cta-card-text {
  color: rgba(249, 246, 255, 0.85);
  margin: 0 0 1.75rem;
  max-width: 34rem;
}

.cta-card-button {
  display: inline-block;
  background: var(--surface-container-lowest);
  color: var(--primary);
  padding: 0.8125rem 2.125rem;
  border-radius: 9999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 300ms var(--ease-zen);
}

.cta-card-note {
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: rgba(249, 246, 255, 0.88);
  margin: 1rem 0 0;
}

.back-to-top {
  margin: 2.5rem 0 0;
}

.back-to-top a {
  font-family: var(--font-label);
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
  text-decoration: none;
}

@media (hover: hover) {
  .back-to-top a:hover {
    color: var(--primary);
  }
}

/* ── Weiterlesen (related articles) ─────────────────────── */

.related {
  margin-top: 3rem;
  border-top: 1px solid rgba(172, 179, 184, 0.35);
  padding-top: 1.75rem;
}

.related-title {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin: 0 0 0.5rem;
}

.related a {
  display: block;
  padding: 0.875rem 0;
  color: inherit;
  text-decoration: none;
}

.related a + a {
  border-top: 1px solid rgba(172, 179, 184, 0.2);
}

.related-kicker {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 0.25rem;
}

.related-item-title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.35;
  margin: 0;
  transition: color 300ms var(--ease-zen);
}

@media (hover: hover) {
  .related a:hover .related-item-title {
    color: var(--primary);
  }
}

@media (hover: hover) {
  .cta-card-button:hover {
    transform: scale(1.03);
  }
}

/* After the hover block so a pressed button scales down even mid-hover. */
.cta-card-button:active {
  transform: scale(0.96);
}

/* ── Index (editorial masthead + lead card + list) ──────── */

.index-header {
  max-width: var(--measure);
  margin: 0 auto 3.5rem;
}

.index-title {
  font-size: clamp(2rem, 5.5vw, 3.125rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.08;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.index-sub {
  font-size: 1.125rem;
  color: var(--on-surface-variant);
  margin: 0;
  max-width: 36rem;
  text-wrap: pretty;
}

/* Inverted indigo lead card — echo of the report's inverted verdict
   surface. Carries the page with n=1 articles. */
.index-featured {
  position: relative;
  overflow: hidden;
  display: block;
  max-width: var(--measure);
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: var(--on-primary);
  border-radius: 1rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 300ms var(--ease-zen), box-shadow 300ms var(--ease-zen);
}

.index-featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 55% at 22% -5%, rgba(255, 255, 255, 0.14), transparent 70%);
  pointer-events: none;
}

@media (hover: hover) {
  .index-featured:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
  }
}

.index-featured .index-item-kicker {
  color: rgba(249, 246, 255, 0.88); /* 4.5:1 on --primary */
}

.index-featured-title {
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.index-featured .index-item-teaser {
  color: rgba(249, 246, 255, 0.85);
  max-width: 36rem;
}

.index-featured .index-item-meta {
  color: rgba(249, 246, 255, 0.85);
}

.index-featured-read {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--on-primary);
  border-bottom: 1px solid rgba(249, 246, 255, 0.5);
  padding-bottom: 2px;
}

/* Follow-up articles: quiet editorial list rows, hairline-divided —
   cardless on purpose. */
.index-grid {
  max-width: var(--measure);
  margin: 1rem auto 0;
}

.index-item {
  display: block;
  padding: 2rem 0.25rem;
  border-bottom: 1px solid rgba(172, 179, 184, 0.3);
  text-decoration: none;
  color: inherit;
}

.index-item-title {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  background-image: linear-gradient(var(--primary), var(--primary));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  display: inline;
  transition: background-size 300ms var(--ease-zen);
}

@media (hover: hover) {
  .index-item:hover .index-item-title {
    background-size: 100% 1px;
  }
}

.index-item-teaser {
  color: var(--on-surface-variant);
  margin: 0.5rem 0 1rem;
  text-wrap: pretty;
}

.index-upcoming {
  max-width: var(--measure);
  margin: 3rem auto 0;
}

.index-upcoming-title {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin: 0 0 0.875rem;
}

.index-upcoming ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.index-upcoming li {
  color: var(--on-surface-variant);
  padding: 0.625rem 0.25rem;
  border-bottom: 1px solid rgba(172, 179, 184, 0.2);
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  background: var(--surface-container-low);
  padding: 3rem 1.25rem;
}

.site-footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.site-footer-copy {
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}

.site-footer-links a {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  /* --on-surface-variant, not --outline: 11px labels need 4.5:1 on the
     footer surface (#757c81 is only 3.8:1) */
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color 300ms var(--ease-zen);
}

@media (hover: hover) {
  .site-footer-links a:hover {
    color: var(--primary);
  }
}

/* ── Motion / print ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
  .reading-progress {
    display: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta-card,
  .article-toc,
  .related,
  .skip-link {
    display: none;
  }
  body {
    background: #ffffff;
  }
}
