/* ============ Case progress bar ============ */
.case-progress {
  background: #fbf6ec;
  border-bottom: 1px solid #e0d4ba;
  padding: 0.55rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.82rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 60;
}

.cp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #4c4239;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.cp-back:hover { color: #1f5b66; }
.cp-back svg { transition: transform 0.15s ease; flex-shrink: 0; }
.cp-back:hover svg { transform: translateX(-2px); }

.cp-track {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
  gap: 0;
}

.cp-track li {
  display: flex;
  align-items: center;
}
.cp-track li:not(:last-child)::after {
  content: '';
  width: 18px;
  height: 1px;
  background: #cdc3ad;
  display: inline-block;
  margin: 0 0.18rem;
}

.cp-step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: #7a7062;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.cp-step:hover {
  background: rgba(31, 91, 102, 0.08);
  color: #1f5b66;
}
.cp-num {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 0.78rem;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7dcc2;
  color: #5a4d38;
  border-radius: 50%;
  line-height: 1;
}
.cp-name { font-weight: 500; }
.cp-step.cp-current {
  background: rgba(31, 91, 102, 0.14);
  color: #154248;
  font-weight: 600;
  cursor: default;
}
.cp-step.cp-current:hover { background: rgba(31, 91, 102, 0.14); }
.cp-step.cp-current .cp-num {
  background: #1f5b66;
  color: #fbf6ec;
}
.cp-synth .cp-num {
  background: #e7e2d2;
  font-size: 0.9rem;
}
.cp-step.cp-synth.cp-current .cp-num {
  background: #154248;
}

@media (max-width: 760px) {
  .cp-name { display: none; }
  .case-progress { gap: 0.8rem; padding: 0.55rem 0.8rem; }
  .cp-track li:not(:last-child)::after { width: 10px; }
}

/* Tools cluster on the right side of the progress bar */
.cp-tools {
  display: flex;
  gap: 0.45rem;
  margin-left: auto;
  flex-shrink: 0;
}
.cp-tool-btn {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: #4c4239;
  background: transparent;
  border: 1px solid #d8cdb8;
  border-radius: 4px;
  padding: 0.32rem 0.7rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.cp-tool-btn:hover {
  background: rgba(31, 91, 102, 0.06);
  border-color: #c4b394;
}
.cp-tool-btn:focus-visible {
  outline: 2px solid #1f5b66;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .cp-tool-btn span:not([aria-hidden]) {
    /* Hide the text label, keep just the icon, on small screens */
    display: none;
  }
  .cp-tool-btn { padding: 0.32rem 0.55rem; }
}

/* ============ Embedded media (anchor sections) ============ */
.media-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  margin: 1.5rem 0 0.5rem;
  border-radius: 6px;
  overflow: hidden;
  background: #2a2a2a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}
.media-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.media-credit {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.82rem;
  color: #7a7062;
  margin: 0 0 1.6rem;
  font-style: italic;
}
.media-credit strong {
  font-style: normal;
  font-weight: 600;
  color: #4c4239;
}

/* ============ External resource callout (replacement for failed embeds) ============ */
.resource-callout {
  background: #fffaf0;
  border: 1px solid #d8cdb8;
  border-left: 4px solid #1f5b66;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.4rem 0 0.6rem;
  font-family: 'Manrope', system-ui, sans-serif;
}
.resource-callout-eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1f5b66;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.resource-callout-eyebrow::before {
  content: '';
  width: 18px;
  height: 1.5px;
  background: #1f5b66;
}
.resource-callout ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.resource-callout li {
  margin: 0.4rem 0;
  font-size: 0.92rem;
  color: #28201a;
  line-height: 1.45;
}
.resource-callout a {
  color: #1f5b66;
  text-decoration: underline;
  text-decoration-color: rgba(31, 91, 102, 0.45);
  text-underline-offset: 2px;
  font-weight: 500;
}
.resource-callout a:hover {
  text-decoration-color: #1f5b66;
}
.resource-callout .resource-source {
  display: inline-block;
  font-size: 0.78rem;
  color: #7a7062;
  margin-left: 0.4rem;
  font-style: italic;
}
