/* ==========================================================================
   COMPONENTS · REFERENCE LIST — CERTIFICATE OF PROVENANCE. The
   "[Title - Publisher - Year - URL]" format set as a real hanging-indent
   bibliography: title italic, publisher small-caps, year mono, URL muted, the
   index in the hang. A running SOURCES tally telegraphs rigor before you scroll.
   ========================================================================== */

.op-references {
  padding-top: var(--space-md);
  border-top: 2px solid var(--rule-strong);
}

.op-references__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.op-references__tally {
  font-family: var(--font-data);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text);
}
.op-references__tally b {
  font-family: var(--font-furniture);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-right: 0.5em;
}

.op-references__list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: ref;
}

/* Each entry: index in the hang (col 1), the citation in col 2 */
.op-references__item {
  display: grid;
  grid-template-columns: 2.4em 1fr;
  gap: var(--space-2xs);
  padding-block: var(--space-xs);
  border-bottom: 1px solid var(--rule-faint);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  counter-increment: ref;
}
.op-references__item:last-child { border-bottom: 0; }

/* The hanging index (col 1), drawn from the list counter */
.op-references__index,
.op-references__item::before {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-secondary);
  padding-top: 0.15em;
}
.op-references__item::before {
  content: counter(ref) ".";
}

/* The citation and its "Cited in …" backlink stack vertically in col 2 */
.op-references__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  min-width: 0;
}

.op-references__title {
  font-family: var(--font-reading);
  font-style: italic;
  color: var(--text);
}
.op-references__publisher {
  font-family: var(--font-furniture);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}
.op-references__year {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-secondary);
}
.op-references__url {
  display: inline-block;
  font-family: var(--font-data);
  font-size: var(--text-xs);
  color: var(--text-muted);
  word-break: break-all;
}

/* Separator dots between citation parts */
.op-references__cite > * + *::before {
  content: " · ";
  color: var(--rule-strong);
}

/* Target highlight when a sidenote jumps to its reference */
.op-references__item:target {
  background: var(--accent-wash);
  border-radius: var(--radius-xs);
}
