/* A subject's page and a collection's page: the head's own lines, the links in levels, the neighbours as chips and
   the mentions at the foot. The cards, marks, field and circles come from topic.css. Site tokens only. */

/* the head: its own words, who keeps it, where its members come from */
.page-head .grp-gone, .page-head .grp-desc, .page-head .grp-src { margin-top: var(--s3); }
.grp-gone { display: inline-block; padding: 2px var(--s3); border-radius: 999px; background: var(--warn-wash); font-size: var(--t-label); font-weight: 600; }
.grp-desc { max-width: 76ch; color: var(--quiet); overflow-wrap: anywhere; }
.grp-src { font-size: var(--t-label); }
.page-head .grp-who { margin-top: var(--s3); }
.page-head .tp-out { margin-top: var(--s4); }
.page-head .title-row .ab-how { align-self: center; margin-left: 0; }

/* the card's last slot: a reason or how many members need it, cut short where the card is narrow */
.tp-card .grp-slot { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* the links in levels */
.grp-key { margin-bottom: var(--s2); }
.grp-kl { display: inline-block; width: 22px; height: 0; border-top: 1.5px solid var(--data-soft); }
.grp-kc { display: inline-block; width: 22px; height: 14px; border-radius: 7px; background: var(--tint); }
.grp-kc.is-wide { background: var(--paper); box-shadow: inset 0 0 0 1px var(--field); }
.grp-layers { position: relative; margin: var(--s4) 0 0; }
.grp-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.grp-lines path { fill: none; stroke: var(--data-soft); stroke-width: 1.2px; opacity: 0.85; }
.grp-lines path.is-wide { opacity: 0.12; }
.grp-layers.is-on .grp-lines path { opacity: 0.08; }
.grp-layers.is-on .grp-lines path.is-wide { opacity: 0; }
.grp-layers.is-on .grp-lines path.is-lit { opacity: 1; stroke: var(--data); stroke-width: 1.75px; }
.grp-row { position: relative; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--s3); align-items: center; padding: var(--s5) 0; }
.grp-row + .grp-row { border-top: 1px dashed var(--line-soft); }
.grp-row.is-none { margin-top: var(--s3); border-top: 1px solid var(--line); }
.grp-rl { margin: 0; font-size: var(--t-label); line-height: 1.25; color: var(--quiet); }
.grp-rc { position: relative; z-index: 1; display: grid; gap: var(--s2); min-width: 0; }
.grp-rn { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s2); }
.grp-rsq { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; --q: 10px; }
.grp-rsq a.tp-m { background: var(--paper); }
.grp-node { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 10px 2px 8px; border-radius: 999px; background: var(--tint); color: var(--ink); font-size: var(--t-label); line-height: 22px; text-decoration: none; white-space: nowrap; }
.grp-node > span { overflow: hidden; text-overflow: ellipsis; }
.grp-node.is-wide { background: var(--paper); box-shadow: inset 0 0 0 1px var(--field); }
.grp-node .tp-m { --q: 10px; }
.grp-node:hover span, .grp-node:focus-visible span { text-decoration: underline; }
.grp-node:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.grp-layers.is-on [data-i] { opacity: 0.3; }
.grp-layers.is-on [data-i].is-lit, .grp-layers.is-on [data-i].is-me { opacity: 1; }
.grp-layers .grp-node.is-me { box-shadow: 0 0 0 2px var(--data); }
@media (max-width: 600px) {
  .grp-row { grid-template-columns: minmax(0, 1fr); gap: var(--s1); padding: var(--s3) 0; }
  .grp-rl { position: relative; z-index: 1; justify-self: start; padding-right: var(--s2); background: var(--paper); }
  .grp-rl:empty { display: none; }
  .grp-rn, .grp-rsq { justify-content: flex-start; }
  .grp-rn { gap: 6px; }
  .grp-node { padding: 1px 8px 1px 6px; font-size: var(--t-note); line-height: 20px; }
}

/* a list of cards after another */
.sec-body [data-mr] + h3.pl-g { margin-top: var(--s5); }

/* the neighbours, as links with their figures */
.grp-chips { display: flex; flex-wrap: wrap; gap: 6px var(--s2); margin: 0; padding: 0; list-style: none; font-size: var(--t-label); }
.grp-chips li { max-width: 100%; padding: 2px 12px; border-radius: 999px; background: var(--wash); line-height: 24px; overflow-wrap: anywhere; }
.grp-chips a { font-weight: 600; text-decoration: none; }
.grp-chips a:hover { text-decoration: underline; }
.grp-chips li > span { color: var(--quiet); font-variant-numeric: tabular-nums; }
#related .sec-body > h3.pl-g ~ h3.pl-g { margin-top: var(--s5); }
#related .tp-petals { max-width: 860px; }

/* mentions: names alone, at the foot */
.grp-mlist { display: flex; flex-wrap: wrap; gap: 4px var(--s4); margin: var(--s2) 0 0; padding: 0; list-style: none; font-size: var(--t-label); }
.grp-mlist a { text-decoration: none; }
.grp-mlist a:hover { text-decoration: underline; }
.grp-men > .sec-hd > h2 .count { font-size: var(--t-label); font-weight: 400; color: var(--quiet); white-space: nowrap; }

/* The collections directory: one row a collection, its own words left, its packages as marks right */
.grp-by { display: inline-block; flex: none; padding: 0 7px; border-radius: 6px; background: var(--tint); color: var(--ink); font-size: var(--t-note); font-weight: 600; line-height: 18px; white-space: nowrap; }
.grp-dkey { margin-bottom: var(--s4); }
.grp-index ul { display: flex; flex-wrap: wrap; gap: 2px var(--s3); list-style: none; margin: 0 0 var(--s4); padding: 0; font-size: var(--t-label); }
.grp-index a { text-decoration: none; }
.grp-index a:hover { text-decoration: underline; }
.grp-drows { display: grid; gap: 0; }
.grp-drow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s5); padding: var(--s4) 0; border-top: 1px solid var(--line); }
.grp-drow:first-child { border-top: 0; padding-top: 0; }
.grp-drow-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); margin: 0; font-size: var(--t-sub); line-height: 1.25; }
.grp-drow-h a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.grp-drow-h a:hover { text-decoration: underline; }
.grp-drow-t { margin: 4px 0 0; font-weight: 600; font-size: var(--t-label); color: var(--ink); }
.grp-drow-d { margin: 4px 0 0; font-size: var(--t-label); color: var(--quiet); line-height: 1.4; overflow-wrap: anywhere; }
.grp-drow-w { display: flex; flex-wrap: wrap; gap: 2px var(--s4); margin: var(--s2) 0 0; font-size: var(--t-label); }
.grp-drow-m { min-width: 0; }
.grp-drow-n { margin: 0 0 var(--s2); font-size: var(--t-label); color: var(--quiet); }
.grp-drow-n b { margin-right: 4px; font-size: var(--t-sub); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.grp-drow-l { margin: 0 0 2px; font-size: var(--t-label); color: var(--quiet); }
.grp-drow-l b { margin-right: 4px; font-size: var(--t-text); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.grp-drow-m .tp-sq { --q: 11px; margin-bottom: var(--s2); }
.grp-tally { display: flex; flex-wrap: wrap; gap: 2px var(--s4); margin: 0; font-size: var(--t-label); }
.grp-tally span { display: inline-flex; align-items: center; gap: 6px; }
.grp-tally .tp-m { --q: 11px; }
.grp-tally .grp-dmen { color: var(--quiet); border-bottom: 1px dotted var(--field); cursor: help; }
.grp-there { margin: 0; }
@media (max-width: 860px) {
  .grp-drow { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
}
