/* Warm leads: the week's target and the people to message share one card.
   Sent and skipped leads sit below as a quiet history. */

/* ---------- This week ---------- */
/* Every number on this tab uses tabular figures: counts, dates, times. */
.ld-week, .ld-history, .ld-deck { font-variant-numeric: tabular-nums lining-nums; }
.ld-week { padding-bottom: 0; }
.ld-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "gauge sum side"; align-items: center; gap: 16px 24px; padding: 4px 0 22px; }
.ld-gauge { grid-area: gauge; display: flex; align-items: flex-end; gap: 6px; height: 76px; padding: 0 2px; cursor: default; }
.ld-gauge i { width: 16px; border-radius: 8px; background: var(--line-strong); transform-origin: bottom; }
.ld-gauge i.extra { background: var(--line); box-shadow: inset 0 0 0 var(--hair) var(--line-strong); }
.ld-gauge i.on { background: var(--primary); box-shadow: none; }
/* No leads this week: outline only, so empty bars never read as behind. */
.ld-gauge.idle i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.ld-sum { grid-area: sum; display: grid; gap: 6px; min-width: 0; }
.ld-sum h2 { font: 600 52px/1 var(--font); letter-spacing: -0.035em; font-variant-numeric: tabular-nums lining-nums; }
.ld-sum .ld-of { display: inline-block; font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -0.012em; color: var(--ink-2); }
.ld-sum .sub { font-size: 15px; }
.ld-sum h2.ld-idle { font-size: 32px; line-height: 1.15; letter-spacing: -0.025em; }
.ld-side { grid-area: side; display: grid; justify-items: end; gap: 10px; align-self: start; padding-top: 6px; text-align: right; }
.ld-sent-to { display: grid; justify-items: end; gap: 6px; max-width: 320px; }
.ld-faces { display: flex; gap: 6px; }
.ld-faces .av { width: 32px; height: 32px; }
@media (max-width: 760px) {
  .ld-top { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "gauge sum" "side side"; align-items: end; }
  .ld-side { justify-items: start; text-align: left; padding-top: 0; }
  .ld-sent-to { justify-items: start; }
  .ld-sum h2 { font-size: 44px; }
  .ld-sum h2.ld-idle { font-size: 28px; }
  .ld-sum .ld-of { display: block; margin-top: 6px; font-size: 17px; }
}

/* Arrival: the bars rise one after another. A fresh send lands with a pop. */
main.enter .ld-gauge i { animation: ld-rise var(--duration-slow) var(--ease-smooth-out) both; animation-delay: calc(var(--duration-fast) + var(--i, 0) * var(--duration-stagger)); }
.ld-gauge i.pop { animation: ld-pop var(--duration-very-slow) var(--ease-bounce) both; }
main.enter .ld-gauge i.pop { animation: ld-pop var(--duration-very-slow) var(--ease-bounce) var(--duration-medium) both; }
@keyframes ld-rise { from { transform: scaleY(0.15); opacity: 0; } }
@keyframes ld-pop { 0% { transform: scaleY(0.1); background: var(--line-strong); } 55% { background: var(--primary); } 70% { transform: scaleY(1.12); } }

/* ---------- Leads to send ---------- */
.ld-list { margin: 0 -24px; border-top: var(--hair) solid var(--line-strong); container: ld / inline-size; }
.ld-list-h { padding: 20px 24px 0; font: 600 17px/1.3 var(--font); letter-spacing: -0.012em; font-variant-numeric: tabular-nums lining-nums; }
.ld-list-h .count { margin-left: 8px; color: var(--ink-3); font-weight: 500; }
.ld-empty { padding: 16px 24px 24px; }

.ld-lead { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "who" "story" "work"; gap: 20px 44px; padding: 20px 24px 26px; }
.ld-lead + .ld-lead { border-top: var(--hair) solid var(--line-strong); padding-top: 24px; }
@container ld (min-width: 880px) {
  .ld-lead { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "who who" "story work"; }
}

.ld-who { grid-area: who; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; }
.ld-name { display: grid; gap: 1px; min-width: 0; }
.ld-name h4 { font: 600 19px/1.3 var(--font); letter-spacing: -0.015em; font-variant-numeric: tabular-nums lining-nums; }
.ld-heat { justify-self: end; }
.ld-nolink { margin-top: 2px; font-size: 14px; color: var(--ink-3); }
@media (max-width: 640px) { .ld-who { grid-template-columns: 48px minmax(0, 1fr); } .ld-heat { grid-column: 2; justify-self: start; } }

.ld-story { grid-area: story; display: grid; gap: 22px; align-content: start; min-width: 0; }
.ld-why { display: grid; gap: 4px; max-width: 62ch; }
.ld-why p:last-child { font-size: 16px; line-height: 1.5; }
.ld-acts { display: grid; gap: 10px; }

/* Activity timeline: oldest first, so it reads into your message. */
.ld-tl { display: grid; }
.ld-tl li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.ld-tl li:last-child { padding-bottom: 0; }
.ld-tl li:not(:last-child)::before { content: ""; position: absolute; left: 15.5px; top: 36px; bottom: 4px; width: 1px; background: var(--line-strong); }
.ld-tl-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--ink-2); box-shadow: inset 0 0 0 var(--hair) var(--line); }
.ld-tl-body { display: grid; gap: 2px; padding-top: 5px; min-width: 0; }
.ld-tl-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ld-tl-kind { font-weight: 600; }
.ld-tl-top time { font-size: 14px; color: var(--ink-3); }
.ld-tl-sum { color: var(--ink-2); max-width: 62ch; }

/* The message: the thing you came here to send. */
.ld-work { grid-area: work; display: grid; gap: 10px; align-content: start; min-width: 0; }
.ld-msg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ld-msg-head label { font-size: 15px; font-weight: 600; color: var(--ink); }
.ld-chars { font-size: 14px; color: var(--ink-3); }
.ld-work textarea { font-size: 16px; line-height: 1.55; padding: 12px 14px; border-radius: var(--r-md); background: var(--sunken); min-height: 132px; field-sizing: content; }
.ld-work textarea:hover { background: var(--surface); }
.ld-work textarea:focus-visible { background: var(--surface); border-radius: var(--r-md); }
.ld-steps { padding-top: 6px; }

/* Placeholder warning: amber, an icon and words, never colour alone. */
.ld-need { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 8px 8px 14px; border-radius: var(--r-lg); background: var(--amber-wash); }
.ld-need[hidden] { display: none; }
.ld-need > svg { align-self: start; margin-top: 3px; color: var(--amber-ink); }
.ld-need-t { font-weight: 600; color: var(--ink); }
.ld-need-list { font-size: 14px; color: var(--ink-2); }
.ld-need .btn { border-radius: var(--r-sm); }
@media (max-width: 560px) { .ld-need { grid-template-columns: 18px minmax(0, 1fr); } .ld-need .btn { grid-column: 2; justify-self: start; margin-top: 6px; } }

/* Same person waiting on Today: reply there first, so he is not messaged twice. */
.ld-dup { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 8px 8px 14px; border-radius: var(--r-lg); background: var(--amber-wash); color: var(--ink); }
.ld-dup > svg { color: var(--amber-ink); }
.ld-dup strong { font-weight: 600; }
.ld-dup .btn { border-radius: var(--r-sm); }
@media (max-width: 560px) { .ld-dup { grid-template-columns: 18px minmax(0, 1fr); } .ld-dup > svg { align-self: start; margin-top: 3px; } .ld-dup .btn { grid-column: 2; justify-self: start; margin-top: 6px; } }

@media (max-width: 720px) {
  .ld-list { margin: 0 -18px; }
  .ld-list-h, .ld-lead { padding-left: 18px; padding-right: 18px; }
  .ld-empty { padding: 16px 18px 20px; }
  .ld-steps .push { display: none; }
  .ld-steps .btn { flex: 1 1 calc(50% - 4px); }
}

/* ---------- History: quieter by design ---------- */
.ld-past-list { display: grid; }
.ld-past { display: grid; gap: 12px; padding: 14px 0; border-bottom: var(--hair) solid var(--line-strong); }
.ld-past:first-child { padding-top: 0; }
.ld-past:last-child { border-bottom: 0; padding-bottom: 0; }
.ld-past-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 8px 14px; }
.ld-past-who { display: grid; min-width: 0; }
.ld-past-who h3 { font: 600 15px/1.35 var(--font); letter-spacing: -0.005em; font-variant-numeric: tabular-nums lining-nums; }
.ld-past-who .sub { color: var(--ink-3); }
.ld-past-steps { gap: 4px; justify-content: flex-end; }
.ld-past-msg { margin-left: 54px; }
.ld-past-msg .draft-text { color: var(--ink-2); }
@media (max-width: 760px) {
  .ld-past-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .ld-past-steps { grid-column: 2 / -1; justify-content: flex-start; margin-left: -10px; }
  .ld-past-msg { margin-left: 0; }
}
