@layer components {
  .jb-det {
    container-type: inline-size;
    container-name: jb-det;
  }

  .jb-det__grid {
    display: grid;
    grid-template-columns: 1fr 36rem;
    gap: var(--space-3xl);
    align-items: start;
  }

  /* ---- Main column: markdown body styled via .jb-det__prose ------------ */

  .jb-det__main {
    min-width: 0;
  }

  /* h2 = top-level section heading ("Über die Stelle"). Sits flush left
     with a small gold accent bar above it for editorial weight. */
  .jb-det__prose h2 {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--text-title);
    line-height: 1.2;
    letter-spacing: -0.01em;
    position: relative;
    padding-top: var(--space-s);
  }

  .jb-det__prose h2::before {
    content: '';
    display: block;
    width: 3.2rem;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-s);
  }

  /* h3 = subheading ("Ihre Aufgaben"). Inline gold bullet, smaller. */
  .jb-det__prose h3 {
    font-size: var(--text-l);
    font-weight: var(--weight-semibold);
    color: var(--text-title);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: var(--space-s);
  }

  .jb-det__prose h3::before {
    content: '';
    width: 0.8rem;
    height: 0.8rem;
    background: var(--primary);
    border-radius: var(--radius-full);
    flex-shrink: 0;
  }

  .jb-det__prose p {
    font-size: var(--text-m);
    color: var(--text-body);
    line-height: 1.7;
  }

  /* Replace default list bullets with custom gold check marks. We use a
     mask-image of an inline SVG so the colour follows currentColor — keeps
     it themable and consistent with the rest of the sprite-driven UI. */
  .jb-det__prose ul {
    list-style: none;
    padding-left: 0;
  }

  .jb-det__prose ul li {
    position: relative;
    padding-left: 2.8rem;
    font-size: var(--text-m);
    color: var(--text-body);
    line-height: 1.6;
  }

  .jb-det__prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 1.8rem;
    height: 1.8rem;
    background-color: var(--primary);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
  }

  /* ---- Sidebar -------------------------------------------------------- */

  .jb-det__sidebar {
    position: sticky;
    top: 10rem;
  }

  .jb-det__sidebar-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-l);
    padding: var(--space-xl);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-l);
    background: var(--bg-surface);
  }

  .jb-det__apply-btn {
    width: 100%;
    justify-content: center;
  }

  .jb-det__apply-btn .icon {
    width: 1.6rem;
    height: 1.6rem;
  }

  .jb-det__sidebar-divider {
    height: 1px;
    background: var(--border-primary);
  }

  .jb-det__info-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
  }

  .jb-det__info-item {
    display: flex;
    align-items: center;
    gap: var(--space-m);
  }

  .jb-det__info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: var(--radius-s);
    background: var(--primary);
    flex-shrink: 0;
  }

  .jb-det__info-icon .icon {
    width: 1.8rem;
    height: 1.8rem;
    color: var(--text-body);
  }

  .jb-det__info-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-4xs);
  }

  .jb-det__info-label {
    font-size: var(--text-2xs);
    font-weight: var(--weight-medium);
    color: var(--text-body);
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .jb-det__info-value {
    font-size: var(--text-s);
    font-weight: var(--weight-semibold);
    color: var(--text-title);
  }

  .jb-det__contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .jb-det__contact-label {
    font-size: var(--text-2xs);
    font-weight: var(--weight-medium);
    color: var(--text-body);
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .jb-det__contact-name {
    font-size: var(--text-s);
    font-weight: var(--weight-semibold);
    color: var(--text-title);
  }

  .jb-det__contact-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    font-size: var(--text-s);
    color: var(--text-body);
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .jb-det__contact-link:hover {
    color: var(--primary-d-1);
  }

  .jb-det__contact-link .icon {
    width: 1.4rem;
    height: 1.4rem;
    color: var(--primary);
    flex-shrink: 0;
  }

  @container jb-det (max-width: 968px) {
    .jb-det__grid {
      grid-template-columns: 1fr 30rem;
      gap: var(--space-2xl);
    }
  }

  @container jb-det (max-width: 768px) {
    .jb-det__grid {
      grid-template-columns: 1fr;
      gap: var(--space-2xl);
    }

    .jb-det__sidebar {
      position: static;
    }

    .jb-det__prose h2 {
      font-size: var(--text-l);
    }
  }

  @container jb-det (max-width: 480px) {
    .jb-det__sidebar-card {
      padding: var(--space-l);
    }

    .jb-det__prose h3 {
      font-size: var(--text-ml);
    }
  }
}
