/* Step 2 — Mühendisliğin izi: one visual language for existing chapters. */
.catalogue-chapter {
  --chapter-ink: #173d50;
  --chapter-accent: #3d7058;
  --chapter-muted: #4b626c;
  --chapter-rule: #b8ccc2;
}
.catalogue-chapter.chapter-dark {
  --chapter-ink: #fff;
  --chapter-accent: #a5d0b5;
  --chapter-muted: #d1e2dc;
  --chapter-rule: #527468;
}

/* A numbered starting point and a fine connecting line guide each chapter. */
.catalogue-chapter .chapter-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: none;
  margin: 0 0 1.5rem;
  color: var(--chapter-accent);
  font-size: .875rem;
  line-height: 1.45;
  letter-spacing: .025em;
}
.chapter-label .chapter-number {
  flex: 0 0 auto;
  font-size: 2rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.chapter-label .chapter-name { flex: 0 1 auto; min-width: 0; }
.chapter-label::after {
  content: "";
  flex: 1 0 2rem;
  height: .625rem;
  border-top: 1px solid var(--chapter-rule);
  border-right: 1px solid var(--chapter-rule);
  transform: translateY(.3125rem);
}
.catalogue-chapter h2[id^="chapter-"] {
  color: var(--chapter-ink);
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
}
.catalogue-chapter h2[id^="chapter-"] em {
  color: var(--chapter-accent);
  font-style: normal;
}
.catalogue-chapter .section-heading { align-items: end; }
#uygulamalar > .section-heading {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .65fr);
  gap: 3rem;
}
.catalogue-chapter .section-heading > p {
  border-left: 1px solid var(--chapter-rule);
  padding-left: 1.125rem;
}

/* Captions remain complete and readable, including drawing/revision caveats. */
.catalogue-chapter figcaption.media-caption {
  position: relative;
  margin: .875rem 0 0;
  padding: .75rem 0 0 1rem;
  border-top: 1px solid var(--chapter-rule);
  color: var(--chapter-muted);
  font-size: .875rem;
  line-height: 1.6;
  font-weight: 400;
  white-space: normal;
  overflow-wrap: anywhere;
}
.catalogue-chapter figcaption.media-caption::before {
  content: "";
  position: absolute;
  left: 0;
  top: .875rem;
  width: 2px;
  height: 1rem;
  background: var(--chapter-accent);
}

/* Solution numbers belong to chapter 02, independent of process step numbers. */
.catalogue-chapter .solution-group > .group-title {
  grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1fr);
}
.catalogue-chapter .group-title .number {
  color: var(--chapter-accent);
  font-size: 1.5rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  border-bottom: 1px solid var(--chapter-rule);
  padding-bottom: .5rem;
}
.catalogue-chapter .feature-actions,
.catalogue-chapter .solution-actions {
  border-top-color: var(--chapter-rule);
}
.catalogue-chapter a.text-link {
  text-decoration-thickness: 1px;
  text-decoration-color: var(--chapter-accent);
  text-underline-offset: .3em;
}
.catalogue-chapter a.text-link:hover { color: var(--chapter-accent); }
.energy-band.catalogue-chapter::after { content: none; }

/* Basic reflow for this addition; the dedicated mobile review remains later. */
@media (max-width: 900px) {
  #uygulamalar > .section-heading { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 799px) {
  .catalogue-chapter .chapter-label { gap: .75rem; margin-bottom: 1.25rem; }
  .chapter-label .chapter-number { font-size: 1.75rem; }
  .chapter-label::after { flex-basis: 1.25rem; }
  .catalogue-chapter .solution-group > .group-title {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: .5rem 1rem;
  }
  .catalogue-chapter .group-title .number { font-size: 1.25rem; }
}
