/* xrefs: styles of this study feature only (see docs/STUDY_FEATURES_PLAN.md §7). */

/* ── verse dialog: the Refs tab ── */
.xrefs { padding-top: 2px; }
.xr-list { display: grid; grid-template-columns: max-content minmax(0, 1fr) auto; column-gap: 10px; }
/* one column of references across the rows (subgrid), as wide as the longest */
.xr { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
.xr > .sn-peek { grid-column: 1 / -1; }
.xr + .xr { border-top: 1px solid var(--rule2); }
.xr-h {
  grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline; width: calc(100% + 8px);
  border: 0; background: none; padding: 8px 4px; margin: 0 -4px; text-align: start; cursor: pointer; border-radius: 8px;
  color: var(--fg2); min-height: 40px;
}
.xr-h:hover { background: var(--bg2); }
.xr-h:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.xr-rf { white-space: nowrap; font: 700 .72rem/1.35 var(--sans); letter-spacing: .02em; color: var(--accent); font-variant-numeric: tabular-nums lining-nums; }
.xr-pv {
  font: .92rem/1.45 var(--serif); color: var(--fg2); overflow-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.xr-h .sn-chev { align-self: center; }
.xr.open .sn-chev { transform: rotate(90deg); }
.xr.open .xr-pv { visibility: hidden; height: 0; }
.xr .sn-peek { margin-top: 0; }
.xr-more {
  border: 0; background: none; padding: 8px 0 2px; margin: 2px 0 0; cursor: pointer;
  font: 600 .76rem/1.2 var(--sans); color: var(--muted);
}
.xr-more:hover { color: var(--accent); }

/* ── the margin's refs (pages/margin.rs): a quiet column of short references ── */
.sm-x { display: flex; flex-wrap: wrap; column-gap: .7em; cursor: default; }
.smg-x .sm-x { flex-direction: column; align-items: flex-start; }
.sm-xb {
  border: 0; background: none; padding: 0; margin: 0; cursor: pointer; white-space: nowrap; text-align: start;
  font: 600 .66rem/1.6 var(--sans); letter-spacing: .02em; color: var(--faint); font-variant-numeric: tabular-nums lining-nums;
  transition: color .15s ease;
}
.sm-x:hover .sm-xb { color: var(--muted); }
.sm-x .sm-xb:hover, .sm-xb:focus-visible { color: var(--accent); }

/* ── narrow screens: a faint line under each paragraph (pages/xrefs.rs::XrefLines) ── */
.xr-line {
  margin: -.75em 0 1em; font: 600 .62em/1.5 var(--sans); letter-spacing: .02em; color: var(--faint);
  user-select: none; -webkit-user-select: none; font-variant-numeric: tabular-nums lining-nums;
}
.xr-ar { margin-inline-end: .35em; }
.xr-dot { margin: 0 .3em; }
.xr-b {
  border: 0; background: none; margin: 0; padding: 3px 1px; font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer;
  border-radius: 4px; white-space: nowrap;
}
.xr-b:hover, .xr-b:focus-visible { color: var(--accent); }
/* the line sits between a block and the next section: keep the section's spacing */
.xr-line + .ol { margin-top: 1.5em; }
html.outline-simple .xr-line + .ol.d3, html.outline-simple .xr-line + .ol.d4 { margin-top: 0; }
@media print { .xr-line { display: none !important; } }
.xr-set .xr-hint { margin: -4px 2px 2px; }
