/* Subscribers (/:slug/subscribers): this page group's own rules, loaded after app.css.
 *
 * The shared components (the header, the title line ov-head, the list chooser ov-lists and service
 * chip ov-esp, figures ov-figs / ov-f-*, ov-lead, ov-plot, keys, marks, meters, ov-vs, ov-div, tones
 * ov-s-*) live in app.css with one name each: use them, never redefine them here. Every colour is a
 * token from the top of app.css. Every class of this page starts with grp- (the old grp-bar, grp-seg,
 * grp-rows, grp-key, grp-stack, grp-trend, grp-sources... names are not reused). */

/* Nothing read yet. */
.empty.grp-empty { margin-top: 10vh; }
.grp-empty h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }

/* ─── The lead: the daily list, and everyone still subscribed under it; beside them its last 30 days ─── */

.grp-lead { align-items: start; }
.grp-daily .ov-f-s { margin-top: 4px; }

/* Everyone still subscribed: one bar of three parts (on the daily list, stopped in the last 6 months,
   quiet for longer), so a list of 600,000 and one of 3 million read the same. */
.grp-reach { display: block; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.grp-reach-h { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); }
.grp-reach-h b { font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.grp-whole { display: flex; gap: 2px; height: 10px; margin-top: 10px; }
.grp-whole > i { min-width: 3px; }
.grp-whole > i:first-child { border-radius: 3px 0 0 3px; }
.grp-whole > i:last-child { border-radius: 0 3px 3px 0; }
.grp-parts { display: block; margin-top: 8px; }
.grp-parts > span { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; min-height: 26px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--line); }
.grp-parts > span:first-child { border-top: 0; }
.grp-parts .ov-sw8 { width: 10px; height: 10px; }
.grp-parts b { font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.grp-on { background: var(--mark); }
.grp-off { background: var(--g-2); }
.grp-gone { background: var(--track); }
.grp-tried { background: var(--line-2); }

/* The line of the last 30 days, on the list's own level. */
.grp-line { min-width: 0; margin: 0; }
.grp-line > .ov-cap { margin-bottom: 14px; }
.grp-line .ov-key { margin-left: auto; }
.grp-line .ov-k b { margin-right: -2px; }
.ov-k .grp-kb { opacity: 0.45; }
.grp-plot { height: 186px; margin: 0 0 26px 52px; }
/* Every day can be pointed at: a hairline marks it, its tip gives the day's figures. */
.grp-hits { position: absolute; top: 0; bottom: 0; z-index: 3; display: flex; }
.grp-hits > span { flex: 1 1 0; outline: none; }
.grp-hits > span:hover, .grp-hits > span:focus-visible { background: linear-gradient(var(--line-2), var(--line-2)) center / 1px 100% no-repeat; }

/* ─── Who is on the daily list: small figures between hairlines ─── */

.grp-figs .ov-f-v .ov-chg { margin-left: 6px; vertical-align: 3px; letter-spacing: 0; }
.grp-figs .ov-f-s:empty { display: none; }
.grp-figs .ov-cols > i.grp-nil { min-height: 0; height: 0; }

/* ─── Two columns: those off the list by when they stopped; how subscribers were added ─── */

.grp-two { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 48px; row-gap: 36px; align-items: start; margin-top: 30px; }
.grp-two.is-one { grid-template-columns: minmax(0, 1fr); }
.grp-pool { min-width: 0; }
.ov-k .grp-kpart { opacity: 0.4; }

/* Off the daily list: a column per week since the last open or click, from zero. Grey at the foot:
   mailed by bringing back and not back. Lighter: older than the history read so far. */
.grp-weeks { margin: 0 0 26px 44px; }
.grp-cols { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; gap: 3px; }
.grp-cols > span { position: relative; display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 1px; outline: none; }
.grp-cols > span > i { flex-basis: 0; min-height: 0; }
.grp-cols > span > i:first-child { border-radius: 2px 2px 0 0; }
.grp-cols > span.grp-part { opacity: 0.4; }
.grp-cols > span:hover > i, .grp-cols > span:focus-visible > i { filter: brightness(0.92); }

/* How they were added: a row per batch code, the share who clicked on one scale, a line at the list's own share. */
.grp-src { align-self: start; }
.grp-src th { vertical-align: bottom; }
.grp-src th h2 { font-size: 14px; font-weight: 600; }
.grp-u { display: block; font-size: 11.5px; color: var(--ink-3); }
.grp-src .grp-c-h { padding-left: 16px; }
.grp-src .grp-c { width: 36%; padding-left: 16px; }
.grp-c > span { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; column-gap: 10px; }
.grp-c em { font-style: normal; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.grp-meter { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--line); }
.grp-meter > i { position: absolute; left: 0; top: 0; bottom: 0; min-width: 2px; border-radius: 3px; background: var(--mark); }
.grp-meter > b { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--ink-3); }
.grp-src tr.minor .grp-meter > i { background: var(--mark-2); }
.grp-src tr.minor .grp-c em { color: var(--ink-3); }

/* Day by day, folded away. */
.raw.grp-raw { margin-top: 36px; }

@media (max-width: 960px) {
  /* The figure and everyone still subscribed side by side; the line under them, full width. */
  .ov-lead.grp-lead { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .grp-lead .ov-lead-l { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: start; }
  .grp-lead .grp-reach { margin-top: 0; padding-top: 0; border-top: 0; }
  .grp-plot { height: 140px; }
  /* The figures stay in one row. */
  .ov-figs.grp-figs { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
  .ov-figs.grp-figs > .ov-f:nth-child(3) { padding-left: 20px; border-left: 1px solid var(--line); }
  .grp-two { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .grp-lead .ov-lead-l { grid-template-columns: minmax(0, 1fr); }
  .grp-lead .grp-reach { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
  .ov-figs.grp-figs { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .ov-figs.grp-figs > .ov-f, .ov-figs.grp-figs > .ov-f:nth-child(3) { padding-left: 0; border-left: 0; }
  .ov-figs.grp-figs > .ov-f + .ov-f { padding-top: 18px; border-top: 1px solid var(--line); }
  .grp-plot { margin-left: 44px; }
  .grp-src .grp-c { width: 34%; }
  .grp-c > span { grid-template-columns: minmax(0, 1fr); }
  .grp-c .grp-meter { display: none; }
}
