/* The guide overview has its own scope; article pages keep their layout. */
.ratgeber-page {
  --ratgeber-cream: #f8f7f2;
  --ratgeber-sage: #f1f2e9;
  --ratgeber-orange: #a34d25;
  color: #263b32;
  background: var(--ratgeber-cream);
}

.ratgeber-page :is(#beitraege, .ratgeber-group) {
  scroll-margin-top: calc(var(--site-header-height, 5rem) + 1rem);
}

.ratgeber-page :is(.ratgeber-hero__copy, .ratgeber-hero__visual,
  .ratgeber-topics__link, .guide-group-heading > div, .guide-teaser,
  .guide-teaser__body, .ratgeber-planning__copy, .ratgeber-planning__visual) {
  min-width: 0;
}

.ratgeber-page .ratgeber-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #f9f8f1;
  background: #1c3129;
}

.ratgeber-page .ratgeber-hero__visual {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.ratgeber-page .ratgeber-hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #1c3129 0%, rgba(28, 49, 41, .97) 28%, rgba(28, 49, 41, .74) 48%, rgba(28, 49, 41, .08) 100%);
}

.ratgeber-page .ratgeber-hero__visual picture {
  display: block;
  height: 100%;
}

.ratgeber-page .ratgeber-hero__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
}

.ratgeber-page .ratgeber-hero__inner {
  display: flex;
  align-items: center;
  min-height: clamp(34rem, 47vw, 42rem);
  padding-block: clamp(3.5rem, 5vw, 5rem);
}

.ratgeber-page .ratgeber-hero__copy {
  width: min(100%, 38rem);
}

.ratgeber-page .ratgeber-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2rem;
  color: #f2a377;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ratgeber-page .ratgeber-hero__eyebrow span + span {
  padding-left: 1rem;
  border-left: 1px solid rgba(249, 248, 241, .32);
  color: #d1dbcf;
}

body[data-page="guides"] .ratgeber-page .ratgeber-hero__title {
  max-width: none;
  margin: 0;
  color: #f9f8f1;
  font-family: var(--font-ui, "Rubik", sans-serif);
  font-size: clamp(3.2rem, 5.2vw, 5.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.045em;
  hyphens: none;
}

.ratgeber-page .ratgeber-hero__title span {
  display: block;
  color: #f6f1e5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .94em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.045em;
}

body[data-page="guides"] .ratgeber-page .ratgeber-hero__lead {
  max-width: 30rem;
  margin: 1.6rem 0 0;
  color: #e0e7dd;
  font-size: var(--fs-lead);
  line-height: var(--leading-body, 1.65);
}

.ratgeber-page .ratgeber-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 1.7rem;
  margin-top: 2rem;
}

.ratgeber-page :is(.ratgeber-hero__actions, .ratgeber-planning__actions) .btn {
  max-width: 100%;
  min-height: 3rem;
  padding: .9rem 1.25rem;
  border-radius: 11px;
  white-space: normal;
}

.ratgeber-page :is(.ratgeber-hero__actions, .ratgeber-planning__actions) .btn--primary {
  color: #fff;
  background: var(--home-cta-gradient, #c84704);
  border-color: #c84704;
  box-shadow: none;
}

.ratgeber-page :is(.ratgeber-hero__actions, .ratgeber-planning__actions) .btn--primary:hover {
  color: #fff;
  background: var(--home-cta-gradient-hover, #b93f04);
  border-color: #b93f04;
}

.ratgeber-page .ratgeber-hero__questions {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #f9f8f1;
  font-weight: 600;
  text-decoration: none;
}

.ratgeber-page .ratgeber-hero__questions:hover {
  color: #f2a377;
}

.ratgeber-page .ratgeber-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  margin-top: clamp(3rem, 5vw, 4.5rem);
  padding-top: 1.2rem;
  border-top: 1px solid rgba(249, 248, 241, .25);
  color: #d1dbcf;
  font-size: .85rem;
}

.ratgeber-page .ratgeber-hero__meta strong {
  margin-right: .2rem;
  color: #fff;
  font-size: 1rem;
}

.ratgeber-page #beitraege {
  padding-block: clamp(3rem, 5vw, 4.5rem);
  background: var(--ratgeber-cream);
}

/* Guide index: search, topic directory and compact article rows. */
.ratgeber-page [hidden] { display: none !important; }

.ratgeber-page .ratgeber-library-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, .9fr);
  align-items: end;
  gap: 2rem 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #dce1d3;
}

.ratgeber-page .ratgeber-library-heading__eyebrow {
  margin: 0 0 .6rem;
  color: #a34d25;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

body .ratgeber-page .ratgeber-library-heading h2 {
  margin: 0;
  color: #263b32;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  line-height: 1.18;
}

.ratgeber-page .ratgeber-library-heading > div > p:not(.ratgeber-library-heading__eyebrow) {
  margin: .7rem 0 0;
  color: #626b61;
  line-height: 1.6;
}

.ratgeber-page .ratgeber-search label {
  display: block;
  margin-bottom: .5rem;
  color: #263b32;
  font-size: .875rem;
  font-weight: 600;
}

.ratgeber-page .ratgeber-search__field {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 3.4rem;
  padding: 0 .9rem;
  color: #52665b;
  background: #fff;
  border: 1px solid #bac9b9;
  border-radius: 10px;
}

.ratgeber-page .ratgeber-search__field:focus-within {
  border-color: #536b4a;
  box-shadow: 0 0 0 3px rgb(83 107 74 / 16%);
}

.ratgeber-page .ratgeber-search__field .icon { flex: none; }
.ratgeber-page .ratgeber-search__field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: .75rem 0;
  color: #263b32;
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
}
.ratgeber-page .ratgeber-search__field input::-webkit-search-cancel-button { display: none; }
.ratgeber-page .ratgeber-search__field button {
  padding: .35rem;
  color: #9b4622;
  background: none;
  border: 0;
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.ratgeber-page :is(.ratgeber-search__hint, .ratgeber-search__status) {
  margin: .4rem 0 0;
  color: #657268;
  font-size: .75rem;
  line-height: 1.4;
}
.ratgeber-page .ratgeber-search__status:empty { display: none; }
.ratgeber-page .ratgeber-search__empty {
  margin-top: 2rem;
  padding: 1.5rem;
  color: #43564c;
  background: #f1f2e9;
  border-radius: 12px;
}
.ratgeber-page .ratgeber-search__empty h2 { margin: 0 0 .4rem; font-size: 1.15rem; }
.ratgeber-page .ratgeber-search__empty p { margin: 0; }

.ratgeber-page .ratgeber-topics-heading {
  margin: 1.8rem 0 .75rem;
  color: #52665b;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ratgeber-page .ratgeber-topics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}
.ratgeber-page .ratgeber-topics__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: .15rem .5rem;
  min-height: 4.4rem;
  padding: .8rem 1rem;
  color: #263b32;
  background: #fcfbf7;
  border: 1px solid #dce1d3;
  border-radius: 10px;
  transition: border-color .16s ease, background .16s ease;
}
body .ratgeber-page .ratgeber-topics__link > span {
  grid-column: 1;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
}
body .ratgeber-page .ratgeber-topics__link > small { grid-column: 1; color: #626b61; font-size: .75rem; }
.ratgeber-page .ratgeber-topics__link > .icon { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #a34d25; }
.ratgeber-page .ratgeber-topics__link:hover { background: #f1f2e9; border-color: #bfcbb3; text-decoration: none; }

.ratgeber-page .ratgeber-group { margin-top: clamp(3rem, 5vw, 4rem); }
.ratgeber-page .guide-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #cfd9cb;
}
.ratgeber-page .guide-heading__category {
  margin: 0 0 .35rem;
  padding: 0;
  color: #a34d25;
  background: transparent;
  border: 0;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body .ratgeber-page .guide-group-heading .section__title {
  margin: 0;
  color: #263b32;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.2;
}
.ratgeber-page .ratgeber-group__count {
  display: inline-block;
  margin-left: .45rem;
  color: #637168;
  font-size: .8rem;
  font-weight: 400;
  vertical-align: middle;
}
body .ratgeber-page .guide-group-heading .section__lead {
  max-width: 32rem;
  margin: 0;
  color: #626b61;
  font-size: .875rem;
  line-height: 1.5;
}
.ratgeber-page .guide-index--funnel,
.ratgeber-page .ratgeber-group--single .guide-index--funnel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.ratgeber-page .guide-teaser--funnel,
.ratgeber-page .ratgeber-group--single .guide-teaser--funnel {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  min-width: 0;
  min-height: 120px;
  padding: 0;
  overflow: hidden;
  background: #fcfbf7;
  border: 1px solid #dce1d3;
  border-radius: 12px;
  box-shadow: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.ratgeber-page .guide-teaser--funnel:hover {
  transform: none;
  border-color: #aebfa9;
  box-shadow: 0 4px 14px rgb(38 59 50 / 6%);
}
.ratgeber-page .guide-teaser--funnel .guide-teaser__media,
.ratgeber-page .ratgeber-group--single .guide-teaser__media {
  display: block;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 120px;
  aspect-ratio: auto;
  border-radius: 0;
  background: #eeeee5;
}
.ratgeber-page .guide-teaser__media .guide-image { width: 100%; height: 100%; object-fit: cover; }
.ratgeber-page .guide-teaser--funnel .guide-teaser__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  min-width: 0;
  padding: .95rem 1rem;
}
body .ratgeber-page .guide-teaser__body h3 {
  max-width: 100%;
  margin: 0;
  color: #263b32;
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
body .ratgeber-page .guide-teaser__body h3 a { color: inherit; }
body .ratgeber-page .guide-teaser__body h3 a:hover { color: #a34d25; }
body .ratgeber-page .guide-teaser__lead {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0;
  color: #626b61;
  font-size: .8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.ratgeber-page .guide-teaser__foot { width: 100%; margin-top: auto; padding: .15rem 0 0; }
body .ratgeber-page .guide-teaser__meta { color: #778277; font-size: .75rem; line-height: 1.4; }
.ratgeber-page .guide-teaser__meta .icon { flex: none; width: 13px; height: 13px; }
.ratgeber-page .ratgeber-group__toggle {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: .9rem;
  padding: .55rem 1rem;
  color: #43564c;
  background: transparent;
  border: 1px solid #cbd6c7;
  border-radius: 9px;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}
.ratgeber-page .ratgeber-group__toggle:hover { background: #edf0e6; border-color: #aebfa9; }

body .ratgeber-page .prose-page__note {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: 1.15rem 1.25rem;
  color: #626b61;
  background: #f1f2e9;
  border-left-color: #aebca3;
  font-size: var(--text-small, .875rem);
  line-height: var(--leading-body, 1.65);
}

.ratgeber-page .ratgeber-usage {
  padding-block: clamp(3rem, 5vw, 4.5rem);
  background: #fcfbf7;
  border-top: 1px solid #e0e3d8;
}

body .ratgeber-page .ratgeber-usage .section__title {
  margin: 0;
  color: #263b32;
  font-size: var(--fs-h2);
  line-height: var(--leading-heading, 1.25);
}

.ratgeber-page .ratgeber-usage .flow-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.ratgeber-page .ratgeber-usage .flow-card {
  min-width: 0;
  padding: 1.5rem;
  background: var(--ratgeber-cream);
  border-color: #dce1d3;
  border-radius: 18px;
  box-shadow: none;
}

.ratgeber-page .ratgeber-usage .flow-card:hover {
  transform: none;
  border-color: #bfcbb3;
  box-shadow: none;
}

.ratgeber-page .ratgeber-usage .flow-card__no {
  top: 1.45rem;
  right: 1.35rem;
  color: #536b4a;
  font-size: 1.25rem;
  font-weight: var(--weight-medium, 500);
  letter-spacing: 0;
  -webkit-text-stroke: 0;
}

.ratgeber-page .ratgeber-usage .flow-card__icon {
  color: #536b4a;
  background: #edf0e4;
  box-shadow: none;
}

body .ratgeber-page .ratgeber-usage .flow-card h3 {
  margin: 1rem 0 .65rem;
  color: #263b32;
  font-size: var(--fs-h3);
  line-height: var(--leading-heading, 1.25);
}

body .ratgeber-page .ratgeber-usage .flow-card p {
  color: #626b61;
  font-size: var(--text-card-copy, .875rem);
  line-height: var(--leading-body, 1.65);
}

.ratgeber-page .ratgeber-planning {
  padding-block: clamp(3rem, 5vw, 4.5rem);
  color: #263b32;
  background: var(--ratgeber-sage);
  border-top: 1px solid #e0e3d8;
}

.ratgeber-page .ratgeber-planning__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
}

.ratgeber-page .ratgeber-planning :is(.kicker-pill, .kicker) {
  color: #a34d25;
}

.ratgeber-page .ratgeber-planning .kicker-pill {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body[data-page="guides"] .ratgeber-page .ratgeber-planning__copy h2 {
  margin: 0;
  color: #263b32;
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

.ratgeber-page .ratgeber-planning__copy h2 span {
  color: inherit;
}

body .ratgeber-page .ratgeber-planning__lead {
  margin-top: 1rem;
  color: #626b61;
  font-size: var(--fs-lead);
  line-height: var(--leading-body, 1.65);
}

.ratgeber-page .ratgeber-planning__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.8rem;
}

.ratgeber-page .ratgeber-planning__actions .link-arrow {
  min-height: 2.75rem;
  align-items: center;
  color: #a34d25;
}

.ratgeber-page .ratgeber-planning__ticks {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.25rem;
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
}

body .ratgeber-page .ratgeber-planning__ticks li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #626b61;
  font-size: var(--text-small, .875rem);
  line-height: var(--leading-ui, 1.5);
}

.ratgeber-page .ratgeber-planning__ticks .icon {
  flex: none;
  color: var(--ratgeber-orange);
}

.ratgeber-page .ratgeber-planning__visual {
  width: 100%;
  max-width: 650px;
  margin: 0;
  justify-self: center;
}

.ratgeber-page .ratgeber-planning__visual .guide-planner-visual {
  margin: 0;
}

.ratgeber-page .ratgeber-planning__visual .guide-planner-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

body .ratgeber-page .ratgeber-planning__visual figcaption {
  margin-top: .75rem;
  color: #747d70;
  font-size: var(--text-meta, .8125rem);
  line-height: var(--leading-ui, 1.5);
  text-align: center;
}

.ratgeber-page :is(a, button):focus-visible {
  outline: 2px solid var(--accent-700);
  outline-offset: 4px;
}

.ratgeber-page :is(.ratgeber-hero, .ratgeber-planning) :is(a, button):focus-visible {
  outline-color: var(--ratgeber-orange);
}

@media (max-width: 900px) {
  .ratgeber-page .ratgeber-planning__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .ratgeber-page :is(.ratgeber-hero__copy, .ratgeber-planning__copy) {
    max-width: 38rem;
  }

  body[data-page="guides"] .ratgeber-page .ratgeber-hero__title {
    font-size: clamp(2.5rem, 6.5vw, 3.5rem);
  }

  .ratgeber-page .ratgeber-topics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ratgeber-page .ratgeber-library-heading { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }

  .ratgeber-page .ratgeber-planning__visual {
    max-width: 560px;
  }
}

@media (max-width: 760px) {
  .ratgeber-page .guide-index--funnel,
  .ratgeber-page .ratgeber-group--single .guide-index--funnel,
  .ratgeber-page .ratgeber-usage .flow-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .ratgeber-page .guide-group-heading { flex-direction: column; align-items: flex-start; gap: .6rem; }
}

@media (max-width: 600px) {
  .ratgeber-page .ratgeber-hero__visual {
    position: relative;
    inset: auto;
    height: clamp(14rem, 62vw, 20rem);
  }

  .ratgeber-page .ratgeber-hero__visual::after {
    background: linear-gradient(0deg, #1c3129 0%, rgba(28, 49, 41, .04) 55%);
  }

  .ratgeber-page .ratgeber-hero__visual img {
    object-position: 75% center;
  }

  .ratgeber-page .ratgeber-hero__inner {
    min-height: 0;
    padding-block: .5rem 2.5rem;
  }

  .ratgeber-page .ratgeber-hero__eyebrow {
    margin-bottom: 1.4rem;
  }

  .ratgeber-page .ratgeber-hero__meta {
    margin-top: 2.25rem;
  }

  body[data-page="guides"] .ratgeber-page .ratgeber-hero__lead {
    margin-top: 1.15rem;
  }

  body[data-page="guides"] .ratgeber-page .ratgeber-hero__title {
    font-size: clamp(2rem, 8.5vw, 2.75rem);
  }

  body[data-page="guides"] .ratgeber-page .ratgeber-planning__copy h2 {
    font-size: clamp(1.875rem, 7.5vw, 2.5rem);
  }

  .ratgeber-page .ratgeber-hero__actions {
    gap: .65rem;
    margin-top: 1.4rem;
  }

  .ratgeber-page #beitraege,
  .ratgeber-page :is(.ratgeber-usage, .ratgeber-planning) {
    padding-block: 2.75rem;
  }

  .ratgeber-page .ratgeber-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .ratgeber-page .ratgeber-topics__link { min-height: 4.5rem; padding: .7rem .8rem; }
  .ratgeber-page .guide-teaser--funnel,
  .ratgeber-page .ratgeber-group--single .guide-teaser--funnel { grid-template-columns: 94px minmax(0, 1fr); }
  .ratgeber-page .guide-teaser--funnel .guide-teaser__body { padding: .8rem; }

  .ratgeber-page .ratgeber-group {
    margin-top: 2.5rem;
  }

  .ratgeber-page .guide-teaser__foot {
    gap: .25rem 1rem;
  }

  .ratgeber-page .ratgeber-planning__actions {
    align-items: flex-start;
    flex-direction: column;
    gap: .7rem;
  }
}

@media (max-width: 440px) {
  .ratgeber-page .ratgeber-hero__actions .btn {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ratgeber-page .guide-teaser--funnel,
  .ratgeber-page .ratgeber-topics__link {
    transition: none;
  }

  .ratgeber-page .guide-teaser--funnel:hover {
    transform: none;
  }
}

@media (forced-colors: active) {
  .ratgeber-page .ratgeber-hero__title span,
  .ratgeber-page .ratgeber-planning__copy h2 span {
    color: CanvasText;
  }
}
