/* R4X Ratgeber Integration v2974: binds editorial pages to the shared dashboard shell. */
body[data-r4x-ratgeber] {
  min-width: 0;
  padding: 0;
}

body[data-r4x-ratgeber] > .r4x-header {
  z-index: 1000;
}

body[data-r4x-ratgeber] > main {
  display: block;
  min-width: 0;
}

/* The shared header is the only persistent navigation. Keep the editorial
   breadcrumb slim so the page never looks like a second page inside the shell. */
body[data-r4x-ratgeber] .topbar .mark {
  display: none;
}

body[data-r4x-ratgeber] .topbar .wrap {
  justify-content: flex-start;
}

body[data-r4x-ratgeber] .topbar .crumb {
  text-align: left;
}

body[data-r4x-ratgeber] .topbar .crumb a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .18em;
}

body[data-r4x-ratgeber] .topbar .crumb a:hover,
body[data-r4x-ratgeber] .topbar .crumb a:focus-visible {
  color: var(--gold-deep, #8a6514);
  text-decoration-color: currentColor;
}

/* Global polish also targets .hero. On these full-width editorial pages its
   drop shadow creates a false inset-card edge, so the hero stays flat. */
body[data-r4x-ratgeber] .hero {
  box-shadow: none !important;
}

body[data-r4x-ratgeber] [id] {
  scroll-margin-top: calc(var(--r4x-shared-header-height, 96px) + 16px);
}

body[data-r4x-ratgeber] .r4x-official-sources {
  margin-bottom: .75rem;
}

body[data-r4x-ratgeber] .r4x-official-sources a {
  font-weight: 600;
}

body[data-r4x-ratgeber] iframe[src*="youtube-nocookie.com"] {
  color-scheme: dark;
}

@media (max-width: 700px) {
  body[data-r4x-ratgeber] .topbar .wrap {
    min-height: 64px;
    height: auto;
    gap: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  body[data-r4x-ratgeber] .topbar .crumb {
    font-size: 12px;
    line-height: 1.45;
  }

  body[data-r4x-ratgeber] .hero h1 {
    overflow-wrap: anywhere;
  }

  body[data-r4x-ratgeber] .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-r4x-ratgeber] .card,
  body[data-r4x-ratgeber] .card--wide {
    grid-column: auto;
    min-width: 0;
  }

  body[data-r4x-ratgeber] .tablewrap {
    max-width: calc(100vw - 44px);
  }
}

@media (max-width: 430px) {
  body[data-r4x-ratgeber] .topbar .wrap {
    justify-content: flex-start;
  }
}
