/* ============================================================
   Widget · References
   ============================================================
   Numbered sources card. Mirrors `.refs` from the mockup.
   Markers are accent-orange via `::marker` (CSS3-native, no
   counter shenanigans) and link colour is sage to stay
   on-brand inside an otherwise muted card.
   ============================================================ */

.bdc-references {
  background: var(--bdc-surface);
  border-radius: var(--bdc-r-md);
  padding: 18px 20px;
  border: 1px solid var(--bdc-line);
  margin: 16px 0 24px;
  font-family: var(--bdc-sans);
  font-size: 13px;
  line-height: 1.6;
}

.bdc-references__list {
  padding-left: 22px;
  margin: 0;
  color: var(--bdc-ink-2);
}

.bdc-references__item {
  margin-bottom: 8px;
  padding-left: 4px;
}
.bdc-references__item:last-child {
  margin-bottom: 0;
}
.bdc-references__item::marker {
  color: var(--bdc-accent-2);
  font-weight: 700;
}

.bdc-references__source {
  /* nothing special — flows inline with the rest */
}

.bdc-references__title {
  font-style: italic;
  margin-left: 4px;
}

.bdc-references__link {
  color: var(--bdc-sage);
  word-break: break-word;
  margin-left: 4px;
  text-decoration: underline;
  text-decoration-color: var(--bdc-sage-tint);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
.bdc-references__link:hover {
  text-decoration-color: var(--bdc-sage);
}

/* ───── Desktop scaling ───── */

@media (min-width: 768px) {
  .bdc-references {
    padding: 22px 26px;
    margin: 20px 0 32px;
    font-size: 14px;
  }
  .bdc-references__item {
    margin-bottom: 10px;
  }
}

@media (min-width: 1200px) {
  .bdc-references {
    font-size: 14.5px;
  }
}

/* ───── Specificity safety ───── */

.bdc-v3 .bdc-references__list { color: var(--bdc-ink-2); }
.bdc-v3 .bdc-references__item { color: var(--bdc-ink-2); }
.bdc-v3 .bdc-references__item::marker { color: var(--bdc-accent-2); }
.bdc-v3 .bdc-references__title { font-style: italic; }
.bdc-v3 .bdc-references__link {
  color: var(--bdc-sage);
  text-decoration-color: var(--bdc-sage-tint);
}
.bdc-v3 .bdc-references__link:hover {
  text-decoration-color: var(--bdc-sage);
}

/* Inline citation marks: <sup class="bdc-citation"><a href="#ref-N">[N]</a></sup>
   Rendered inline in body prose to point at the matching reference
   in the card below. Tight visual treatment so they don't disrupt
   reading flow. Anchor target uses the smooth-scroll behaviour
   browsers apply to in-document fragment links. */
.bdc-citation {
  font-size: 0.7em;
  line-height: 1;
  vertical-align: super;
  margin: 0 0.1em;
  white-space: nowrap;
}
.bdc-citation a {
  color: var(--bdc-accent-2, #c4622d);
  text-decoration: none;
  font-weight: 600;
  padding: 0 0.15em;
}
.bdc-citation a:hover {
  text-decoration: underline;
}
.bdc-citation a + a {
  margin-left: 0.15em;
}
/* Smooth-scroll target highlight when the user clicks into a ref. */
.bdc-references__item:target {
  background: rgba(196, 98, 45, 0.08);
  border-radius: 4px;
  padding: 6px 8px;
  margin-left: -8px;
  margin-bottom: 16px;
  transition: background 0.3s ease;
}
