/* css/pulse-rolodex.css — Confluence & Alignment rolodex (TAN-2617, Style C).
 *
 * Moved out of js/pulse-rolodex.js:428 (which injected the whole stylesheet as
 * a JS string). Kept as its own file so the surface can be diffed against the
 * mockup, inherits the app's tokens, and can be seen by CSS-level checks.
 *
 * Colour authority (Matt 2026-11-19): the PNG mockups predate the ruling and
 * show alignment purple / confluence green. Build is the reverse:
 *   ALIGNMENT  -> cyan   #22D3EE
 *   CONFLUENCE -> purple #C084FC
 * The ring keys off the card KIND, never off its score.
 *
 * Layout: >=641px is a full-width row (pill | body | metric column | ring).
 * <=640px is a stacked card with the ring top-right beside the pill (option D).
 */

#pulse-rolodex {
  --prx-cyan: #22D3EE;
  --prx-purple: #C084FC;
  --prx-metric: #4ADE80;
  display: block;
  margin: 2px 0 14px;
}

/* ------------------------------------------------------------- header ---- */

.prx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 8px;
}
.prx-head-title {
  margin: 0;
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -.015em;
  color: var(--text-primary, #E2E8F0);
}
.prx-head-sub {
  font-size: 11.5px;
  color: var(--text-muted, #8A99B0);
}
.prx-note {
  font-size: 11.5px;
  color: #F59E0B;
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 8px;
  padding: 6px 10px;
  margin: 0 0 8px;
}
.prx-empty {
  padding: 18px 14px;
  color: var(--text-muted, #8A99B0);
  font-size: 13px;
}

/* --------------------------------------------------------- filters -------- */

.prx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 2px 10px;
}
.prx-filter {
  font: inherit;
  font-size: 12px;
  line-height: 1;
  color: var(--text-secondary, #94A3B8);
  background: transparent;
  border: 1px solid var(--border, #1E293B);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.prx-filter[aria-selected="true"] {
  color: var(--text-primary, #E2E8F0);
  border-color: rgba(192, 132, 252, .55);
}
.prx-filter[disabled] {
  opacity: .45;
  cursor: default;
}
/* Filtering is CSS-only: the list carries the selected filter. */
.prx-list[data-filter="confluence"] .prx-row:not(.prx-confluence),
.prx-list[data-filter="alignment"] .prx-row:not(.prx-alignment) {
  display: none;
}

/* ----------------------------------------------------------- the list ---- */

.prx-list { display: block; }

.prx-row {
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto 44px;
  grid-template-areas: "tag main side ring";
  align-items: center;
  gap: 4px 14px;
  background: var(--surface, #111827);
  border: 1px solid var(--border, #1E293B);
  border-radius: 14px;
  padding: 13px 16px;
  margin: 0 0 10px;
  min-width: 0;
}
.prx-alignment { --prx-accent: var(--prx-cyan, #22D3EE); border-color: rgba(34, 211, 238, .30); }
.prx-confluence { --prx-accent: var(--prx-purple, #C084FC); border-color: rgba(192, 132, 252, .30); }

.prx-tag {
  grid-area: tag;
  justify-self: start;
  align-self: start;
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  border-radius: 999px;
  padding: 5px 10px;
  margin-top: 2px;
}
.prx-alignment .prx-tag { color: #22D3EE; background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .32); }
.prx-confluence .prx-tag { color: #C084FC; background: rgba(192, 132, 252, .12); border: 1px solid rgba(192, 132, 252, .32); }

.prx-main { grid-area: main; min-width: 0; }

.prx-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.3;
  color: var(--text-primary, #E2E8F0);
}
.prx-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--prx-accent, #22D3EE);
  margin-right: 7px;
  vertical-align: middle;
}
.prx-why {
  margin: 5px 0 8px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-secondary, #94A3B8);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.prx-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #94A3B8);
  background: var(--surface-2, #1A2332);
  border: 1px solid var(--border, #1E293B);
  border-radius: 7px;
  padding: 3px 8px;
}

/* Right column: metric over `time · horizon`, right-aligned. */
.prx-side {
  grid-area: side;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
  white-space: nowrap;
}
.prx-metric { font-size: 13px; font-weight: 700; color: var(--prx-metric, #4ADE80); }
.prx-when { font-size: 11.5px; color: var(--text-faint, #64748B); }

/* --------------------------------------------------------------- ring ---- */
/* Ring at the row's end on desktop; option D (top-right, beside the pill) at
 * 390. Never vertically centred — a centred ring is the earlier wrong pass
 * that tests/test_pulse_rolodex.js used to pin. */

.prx-ring {
  grid-area: ring;
  justify-self: end;
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
}
.prx-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The arc's colour lives here, not in the SVG: the renderer emits no stroke at
 * all, so a score can never colour the ring. */
.prx-ring-track { stroke: #1E293B; }
/* One source of truth: the accent the kind sets above. A hard-coded cyan here
 * would be a second place to forget. */
.prx-ring-arc { stroke: var(--prx-accent); }
.prx-ring b {
  position: relative;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--prx-accent, #22D3EE);
}
/* new = glowing ring; older = dimmed ring. `forming` is a label, not a ring
 * treatment — one channel must not mean two things. */
.prx-alignment .prx-ring.new svg { filter: drop-shadow(0 0 6px rgba(34, 211, 238, .65)); }
.prx-confluence .prx-ring.new svg { filter: drop-shadow(0 0 6px rgba(192, 132, 252, .65)); }
.prx-ring.dim { opacity: .45; }

/* --------------------------------------------------------------- cue ----- */

.prx-cue {
  display: block;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-faint, #64748B);
  padding: 4px 0 2px;
}
/* The 4th row fades: the affordance that earlier cards sit below it. */
.prx-list > .prx-row:nth-child(4) { opacity: .4; }

/* -------------------------------------------------------------- phone ---- */
/* 390: stacked full-width cards, pill top-left, ring top-right (option D),
 * metric line bottom-left. Full width, not a horizontal swipe strip. */

@media (max-width: 640px) {
  .prx-head { flex-direction: column; align-items: flex-start; gap: 2px; padding-bottom: 8px; }
  .prx-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    grid-template-areas:
      "tag  ring"
      "main main"
      "side side";
    align-items: start;
    gap: 8px 10px;
    padding: 13px 14px;
  }
  .prx-ring { width: 48px; height: 48px; }
  .prx-why { -webkit-line-clamp: 3; }
  .prx-side { flex-direction: row; align-items: baseline; gap: 8px; text-align: left; }
}
