/* Edge CRM — app-timeline.css
   The lead record: the shared contact drawer's header, its one glance, the
   four blocks every record answers (came from · what's happened · who's
   responsible · what comes next), the activity timeline and the dark call
   panel. Paper, ink and one volt signal (the Rose UI design contract).

   Tokens come from styles.css. Each is read through a private --ld-* name
   with a fallback, so the record also reads well on the older token set.
   Motion animates transform and opacity only (plus the volt highlight
   wipes), and stands still under prefers-reduced-motion. */

.lead-record, .ct-glance, .ct-filters, .ct-timeline, .ct-recent, .ct-call-panel, .ct-calls, .lead-person, .ct-wave {
  --ld-paper: var(--paper, var(--bg));
  --ld-paper-2: var(--paper-2, var(--surface-3));
  --ld-card: var(--card, var(--surface));
  --ld-card-2: var(--card-2, var(--surface-2));
  --ld-ink: var(--ink, var(--text));
  --ld-ink-2: var(--text-2, var(--ink));
  --ld-ink-panel: var(--ink-panel, #0B0D12);
  --ld-on-ink: var(--ink-panel-text, #F1EEE7);
  --ld-on-ink-2: var(--ink-panel-muted, rgba(241, 238, 231, .72));
  --ld-muted: var(--muted, var(--text-3));
  --ld-line: var(--line, var(--border-faint));
  --ld-line-strong: var(--line-strong, var(--border));
  --ld-volt: var(--volt, #CFF465);
  --ld-volt-ink: var(--volt-ink, #1F2A00);
  --ld-volt-soft: var(--volt-soft, rgba(207, 244, 101, .28));
  --ld-coral: var(--coral, var(--danger));
  --ld-coral-soft: var(--coral-soft, var(--danger-bg));
  --ld-coral-text: var(--coral-text, var(--danger-fg));
  --ld-r-card: var(--r-card, 16px);
  --ld-r-ctl: var(--r-ctl, 10px);
  --ld-shadow-card: var(--shadow-card, 0 1px 2px rgba(11, 13, 18, .04), 0 10px 30px -12px rgba(11, 13, 18, .14));
  --ld-shadow-pop: var(--shadow-pop, 0 2px 4px rgba(11, 13, 18, .06), 0 24px 48px -16px rgba(11, 13, 18, .22));
  --ld-shadow-ink: var(--shadow-ink, 0 30px 60px -20px rgba(0, 0, 0, .45));
  --ld-ease: var(--ease-out, cubic-bezier(.16, 1, .3, 1));
  --ld-pop: var(--ease-pop, cubic-bezier(.34, 1.56, .64, 1));
  --ld-dur-2: var(--dur-2, 220ms);
  --ld-dur-3: var(--dur-3, 420ms);
  --ld-dur-4: var(--dur-4, 700ms);
}

/* ------------------------------------------------ the drawer around it -- */
/* The record draws its own header (avatar, name, chips), so the shell's
   title stays for screen readers only and the close button floats. Scoped to
   the record variant (openDrawer({ variant: 'record' }) → #drawer.is-record);
   every other drawer is untouched. */
#drawer.is-record .drawer-head {
  position: absolute; top: 0; right: 0; z-index: 4;
  padding: 14px 14px 0 0; border: 0; background: none; pointer-events: none;
}
#drawer.is-record .drawer-head > div:first-child {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
#drawer.is-record .drawer-close {
  pointer-events: auto; position: static; width: 36px; height: 36px; border-radius: 999px;
  background: var(--card, var(--surface)); color: var(--ink, var(--text));
  box-shadow: 0 0 0 1px var(--line, var(--border-faint)), 0 6px 16px -8px rgba(11, 13, 18, .3);
  transition: transform var(--dur-2, 220ms) var(--ease-out, ease-out);
}
#drawer.is-record .drawer-close:hover { transform: rotate(90deg); }
#drawer.is-record .drawer-body { padding: 0; background: var(--paper, var(--bg)); overflow-x: hidden; }
.lead-record:not(.is-new) { padding: 22px 22px 32px; min-height: 100%; }

.lead-record .kicker { margin: 0; }
.ct-call-kicker { display: flex; margin: 0; } /* the shell's .kicker draws it */

/* ----------------------------------------------------------- the header -- */
/* Who (avatar, name, facts, ⋯), where they are (the journey and Change
   stage), how to reach them (Call · Text · Email) and the one next action. */
.lead-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "av id more" "journey journey journey" "reach reach act";
  gap: 14px 16px;
  align-items: center;
  padding: 2px 0 20px;
  animation: lead-rise var(--ld-dur-3) var(--ld-ease) both;
}
.lead-hero > .avatar { grid-area: av; }
.lead-hero-id { grid-area: id; min-width: 0; padding-right: 8px; }
.lead-hero:not(:has(.lead-more)) .lead-hero-id { padding-right: 46px; }
.lead-hero-name {
  margin: 0; font-size: var(--fs-2xl, 28px); font-weight: 700; letter-spacing: -.03em; line-height: 1.08;
  color: var(--ld-ink); overflow-wrap: anywhere; text-wrap: balance;
}
.lead-hero-meta { margin: 6px 0 0; font-size: var(--fs-sm, 13px); color: var(--ld-muted); font-variant-numeric: tabular-nums; }
.lead-hero-action { grid-area: act; justify-self: end; }
.lead-hero:not(:has(.lead-reach)) .lead-hero-action { grid-column: 1 / -1; justify-self: start; }

/* Where it's at: the journey strip, with Change stage at its end. */
.lead-hero-journey {
  grid-area: journey; min-width: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 14px 16px; border: 1px solid var(--ld-line); border-radius: 14px;
  background: var(--ld-card); box-shadow: var(--ld-shadow-card);
}
.lead-hero-journey > :first-child { flex: 1 1 280px; min-width: 0; }
/* The journey bar drawn here until the shell's own (core.journeyHtml) loads. */
.lead-journey-track {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  margin: 0; padding: 0; list-style: none; height: 18px;
}
.lead-journey-track::before {
  content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; margin-top: -1px;
  border-radius: 2px; background: var(--ld-line-strong);
}
.lead-journey-step {
  position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 999px;
  background: var(--ld-card); box-shadow: inset 0 0 0 2px var(--ld-line-strong);
}
.lead-journey-step.is-done { background: var(--stage-c); box-shadow: 0 0 0 3px var(--ld-card); }
.lead-journey-step.is-current {
  width: 18px; height: 18px; background: var(--stage-c);
  box-shadow: 0 0 0 3px var(--ld-card), 0 0 0 5px color-mix(in srgb, var(--stage-c) 35%, transparent);
  animation: lead-pop var(--ld-dur-3) var(--ld-pop) both; animation-delay: .2s;
}
.lead-journey.is-lost .lead-journey-step { background: var(--ld-paper-2); box-shadow: inset 0 0 0 2px var(--ld-line-strong); }
.lead-journey-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 10px 0 0; font-size: var(--fs-sm, 13px); }
.lead-journey-now { font-weight: 650; color: var(--stage-t, var(--ld-ink)); }
.lead-journey-place { font-size: var(--fs-xs, 12px); color: var(--ld-muted); font-variant-numeric: tabular-nums; }
/* Change stage: a small control over the real select (kept for keyboard,
   screen readers and tests); the native picker opens on click. */
.lead-stage-change {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  min-height: 34px; padding: 0 12px; border: 1px solid var(--ld-line-strong); border-radius: 999px;
  background: var(--ld-card); color: var(--ld-ink); font-size: var(--fs-sm, 13px); font-weight: 600; cursor: pointer;
  transition: background var(--ld-dur-2) var(--ld-ease);
}
.lead-stage-change:hover { background: var(--ld-card-2); }
.lead-stage-change .select {
  position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; margin: 0; padding: 0;
  opacity: 0; cursor: pointer; font-size: 16px;
}
.lead-stage-change:focus-within { outline: 2px solid var(--ld-volt); outline-offset: 2px; box-shadow: 0 0 0 4px var(--ld-ink); }

/* How to reach them: the lead's own tel/sms/mailto links, quiet. */
.lead-reach { grid-area: reach; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.lead-record .lead-reach-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--ld-line-strong); border-radius: var(--ld-r-ctl);
  background: var(--ld-card); color: var(--ld-ink); font-weight: 600; text-decoration: none;
  transition: transform var(--ld-dur-2) var(--ld-ease), background var(--ld-dur-2) var(--ld-ease);
}
.lead-record .lead-reach-btn:hover { background: var(--ld-card-2); transform: translateY(-1px); text-decoration: none; }
.lead-record .lead-reach-btn:active { transform: scale(.98); }

/* The ⋯ menu (the shell's .menu-anchor / core.wireMenu): Delete lives here,
   away from Close. */
.lead-more { grid-area: more; align-self: start; margin-right: 46px; }
.lead-record .lead-more-btn { width: 36px; height: 36px; color: var(--ld-ink); }
.lead-more .lead-menu { min-width: 180px; }
.lead-more .menu-item { min-height: 40px; font-weight: 500; }
.lead-more .menu-item.is-danger:hover { background: var(--ld-coral-soft); color: var(--ld-coral-text); }

.lead-record .btn--volt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; height: auto; padding: 0 16px; border: 0; border-radius: var(--ld-r-ctl);
  background: var(--ld-volt); color: var(--ld-volt-ink); font-size: var(--fs-md, 14px); font-weight: 600;
  box-shadow: 0 1px 0 rgba(31, 42, 0, .12), 0 10px 22px -12px rgba(92, 128, 0, .75);
  transition: transform var(--ld-dur-2) var(--ld-ease), box-shadow var(--ld-dur-2) var(--ld-ease), filter var(--ld-dur-2) var(--ld-ease);
}
.lead-record .btn--volt:hover { background: var(--ld-volt); color: var(--ld-volt-ink); transform: translateY(-1px); filter: saturate(1.1) brightness(.98); }
.lead-record .btn--volt:active { transform: scale(.98); }
.lead-record .btn--volt .ico { transition: transform var(--ld-dur-2) var(--ld-ease); }
.lead-record .btn--volt:hover .ico { transform: translateX(2px); }

.lead-record :is(.btn, .tab, .ct-chip, select, a, summary):focus-visible,
#drawer.is-record .drawer-close:focus-visible {
  outline: 2px solid var(--ld-volt, #CFF465);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--ld-ink, #0B0D12);
}

/* Tabs. */
.lead-record .lead-tabs {
  display: inline-flex; gap: 2px; margin: 0 0 18px; padding: 4px; max-width: 100%;
  border: 1px solid var(--ld-line); border-radius: 999px; background: var(--ld-paper-2);
}
.lead-record .lead-tabs .tab {
  min-height: 34px; padding: 0 18px; margin: 0; border: 0; border-radius: 999px;
  font-size: var(--fs-sm, 13px); font-weight: 500; color: var(--ld-muted);
  transition: background var(--ld-dur-2) var(--ld-ease), color var(--ld-dur-2) var(--ld-ease), box-shadow var(--ld-dur-2) var(--ld-ease);
}
.lead-record .lead-tabs .tab:hover { color: var(--ld-ink); }
.lead-record .lead-tabs .tab.is-active {
  background: var(--ld-card); color: var(--ld-ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(11, 13, 18, .08), 0 4px 12px -6px rgba(11, 13, 18, .18);
}
.lead-panel-in { animation: lead-rise var(--ld-dur-3) var(--ld-ease) both; }

/* ------------------------------------------------------------- avatars -- */
.lead-av {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--av, #C8DDF7); color: var(--av-ink, #1C4A7E);
  font-family: inherit; font-size: 12px; font-weight: 650; letter-spacing: -.01em; text-transform: none;
}
.lead-av.avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.lead-av.avatar--lg { width: 44px; height: 44px; font-size: 15px; }
.lead-av.avatar--xl {
  width: 64px; height: 64px; font-size: 22px;
  box-shadow: 0 0 0 4px var(--ld-card), 0 10px 24px -12px rgba(11, 13, 18, .35);
  animation: lead-pop var(--ld-dur-3) var(--ld-pop) both;
}
.lead-av.is-empty { background: transparent; border: 1.5px dashed var(--ld-line-strong); color: var(--ld-muted); }

/* --------------------------------------------------------------- chips -- */
.lead-record .chip, .ct-call-panel .chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: auto; min-height: 26px; max-width: 100%; padding: 3px 10px;
  border: 1px solid var(--ld-line); border-radius: 999px;
  background: var(--ld-card-2); color: var(--ld-ink);
  font-family: inherit; font-size: var(--fs-xs, 12px); font-weight: 500; line-height: 1.3;
  letter-spacing: 0; text-transform: none; white-space: nowrap;
}
.lead-record .chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lead-record .chip .ico { flex: 0 0 auto; color: var(--ld-muted); }
.lead-record .chip--ghost { background: transparent; border-color: var(--ld-line-strong); }
.lead-record .chip--source { background: var(--ld-card); border-color: var(--ld-line-strong); }
.lead-record .chip--source .ico { color: var(--ld-ink); }
.lead-record .chip--source.is-unknown {
  border-style: dashed; color: var(--unknown-fg, var(--ld-muted));
  background-color: var(--unknown-bg, var(--ld-card-2)); background-image: var(--hatch, none);
}
.lead-record .chip--stage { background: var(--stage-b); color: var(--stage-t); border-color: transparent; font-weight: 600; }
.lead-record .chip--volt { background: var(--ld-volt); color: var(--ld-volt-ink); border-color: transparent; }
.lead-record .chip--volt .ico { color: var(--ld-volt-ink); }
.lead-record .chip--coral { background: var(--ld-coral-soft); color: var(--ld-coral-text); border-color: transparent; font-weight: 600; }
.lead-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------- the four answers, 2 × 2 -- */
/* One summary of the four questions. Each tile's title opens its block;
   the glance's own rows (pinned words) sit inside the tiles. */
.lead-summary:empty { display: none; }
.lead-record .ct-glance {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  margin: 0 0 16px; padding: 0; border: 0; background: none; box-shadow: none;
}
.ct-tile {
  position: relative; isolation: isolate; min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px 14px; border: 1px solid var(--ld-line); border-radius: var(--ld-r-card);
  background: var(--ld-card); box-shadow: var(--ld-shadow-card);
  transition: transform var(--ld-dur-2) var(--ld-ease), box-shadow var(--ld-dur-2) var(--ld-ease);
  animation: lead-rise var(--ld-dur-3) var(--ld-ease) both;
  animation-delay: calc(var(--i, 0) * 70ms + 80ms);
}
.ct-tile:hover { transform: translateY(-2px); box-shadow: var(--ld-shadow-pop); }
/* Each answer lights up in turn, once, as the reel's record does. */
.ct-tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--ld-volt-soft); transform-origin: left center; opacity: 0; pointer-events: none;
  animation: ct-row-light 1.2s var(--ld-ease) both; animation-delay: calc(var(--i, 0) * 150ms + 300ms);
}
.ct-glance.is-settled .ct-tile, .ct-glance.is-settled .ct-tile::after { animation: none; }
.ct-tile[data-q="next"] {
  background: color-mix(in srgb, var(--ld-volt) 20%, var(--ld-card));
  border-color: color-mix(in srgb, var(--ld-volt-ink) 16%, transparent);
}
.ct-tile.is-overdue { background: var(--ld-coral-soft); border-color: color-mix(in srgb, var(--ld-coral) 40%, transparent); }
/* On the tinted next-step tile the quiet text steps up to ink-2, so it stays
   at 4.5:1 or better in both themes. */
.ct-tile[data-q="next"] { --ld-muted: var(--ld-ink-2); --muted: var(--ld-ink-2); }
.ct-tile-q {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-xs, 12px); font-weight: 600; letter-spacing: 0; color: var(--ld-muted);
}
.ct-tile-q .ico { opacity: 0; transform: translateX(-4px); transition: opacity var(--ld-dur-2) var(--ld-ease), transform var(--ld-dur-2) var(--ld-ease); }
.ct-tile:hover .ct-tile-q, .ct-tile-q:focus-visible { color: var(--ld-ink); }
.ct-tile:hover .ct-tile-q .ico, .ct-tile-q:focus-visible .ico { opacity: 1; transform: none; }
.ct-tile-empty { margin: 0; font-size: var(--fs-sm, 13px); color: var(--ld-muted); }
p.ct-tile-q { cursor: default; }
.ct-tile:hover p.ct-tile-q { color: var(--ld-muted); }
.ct-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--ld-line); }
.ct-fact { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs, 12px); color: var(--ld-ink-2); font-variant-numeric: tabular-nums; }
.ct-fact .ico { color: var(--ld-muted); }
/* More about this booking: the host and the reminders, one tap away. */
.ct-glance-more { flex-basis: 100%; margin-top: 2px; font-size: var(--fs-xs, 12px); color: var(--ld-muted); }
.ct-glance-more > summary { display: inline-flex; min-height: 30px; margin-left: -4px; font-size: var(--fs-xs, 12px); color: var(--ld-ink-2); }
.ct-glance-more .disclosure-body { padding: 2px 0 0 22px; }
.ct-glance-more .ct-glance-sub { display: block; }
.ct-tile .lead-people { gap: 10px 20px; margin: 0; }
.ct-tile .lead-av.avatar--lg { width: 36px; height: 36px; font-size: 13px; }

.ct-glance-row {
  position: relative; min-width: 0;
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 10px; align-items: start;
}
.ct-glance-row + .ct-glance-row { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--ld-line); }
.ct-glance-ico {
  grid-row: span 2; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--ld-paper-2); color: var(--ld-ink);
}
.ct-glance-row[data-row~="next"] .ct-glance-ico { background: var(--ld-volt); color: var(--ld-volt-ink); animation: lead-ring 1.6s ease-in-out infinite; }
.ct-glance-row[data-row~="is-overdue"] .ct-glance-ico { background: var(--ld-coral); color: #fff; animation: none; }
.ct-glance-k {
  padding-top: 1px; font-family: inherit; font-size: var(--fs-xs, 12px); font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--ld-muted);
}
/* One row per tile says its question already; its key is for screen readers. */
.ct-tile[data-q="from"] .ct-glance-k, .ct-tile[data-q="happened"] .ct-glance-k {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.ct-tile[data-q="from"] .ct-glance-ico, .ct-tile[data-q="happened"] .ct-glance-ico { grid-row: auto; }
.ct-glance-v {
  min-width: 0; padding-top: 2px;
  font-size: var(--fs-md, 14px); line-height: 1.45; color: var(--ld-ink); overflow-wrap: anywhere;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px;
}
.ct-glance-v .ct-entry-note { flex-basis: 100%; }
.ct-glance-when { font-size: var(--fs-xs, 12px); color: var(--ld-muted); font-variant-numeric: tabular-nums; }
.ct-glance-text.is-warn { color: var(--warn-fg); }
.ct-glance-text.is-ok { color: var(--ok-fg); }
.ct-glance-text.is-danger { color: var(--ld-coral-text); font-weight: 600; }
.ct-glance-owner { font-size: var(--fs-xs, 12px); color: var(--ld-ink-2); }
.ct-glance-owner.is-unowned { color: var(--warn-fg); font-weight: 500; }
.ct-glance-note {
  grid-column: 1 / -1; justify-self: start;
  display: flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%;
  margin: 0; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--ld-volt); color: var(--ld-volt-ink); font-size: var(--fs-xs, 12px); font-weight: 600;
}
.ct-glance-note .ico { flex: 0 0 auto; }
.ct-glance-note.is-fresh { animation: lead-pop var(--ld-dur-3) var(--ld-pop) both; }
.ct-glance-sub { flex-basis: 100%; font-size: var(--fs-xs, 12px); color: var(--ld-muted); }
.ct-glance-sub.is-ok { color: var(--ok-fg); }
.ct-glance-sub.is-warn { color: var(--warn-fg); }
.ct-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.ct-confirm .select { width: auto; min-width: 0; height: 30px; font-size: var(--fs-xs, 12px); border-radius: 8px; }
/* Take it / Hand back: the one-click claim reads as a real action. */
.ct-glance [data-ct-claim], .ct-glance [data-ct-release], .ct-glance [data-ct-confirm] {
  min-height: 30px; padding: 0 12px; border-radius: 999px; font-weight: 600;
  transition: transform var(--ld-dur-2) var(--ld-ease), background var(--ld-dur-2) var(--ld-ease);
}
.ct-glance [data-ct-claim] { background: var(--ld-ink); border-color: var(--ld-ink); color: var(--ld-card); }
.ct-glance [data-ct-claim]:hover { background: var(--ld-ink); color: var(--ld-card); transform: translateY(-1px); }
.ct-glance [data-ct-claim]:active, .ct-glance [data-ct-release]:active, .ct-glance [data-ct-confirm]:active { transform: scale(.96); }
.ct-glance .is-pressed, .ct-timeline .is-pressed { animation: ct-press var(--ld-dur-3) var(--ld-pop); opacity: .7; }

/* The booking journey: join the meeting, who it is with, what changed. */
.ct-join { flex: 0 0 auto; }
.ct-join:focus-visible { outline: 2px solid var(--volt, var(--accent)); outline-offset: 2px; }
.ct-join-pending { flex-basis: 100%; font-size: var(--fs-xs, 12px); color: var(--warn-fg); }
.lead-record .ct-join { min-height: 30px; border-radius: 999px; padding: 0 12px; }

.ct-entry { color: var(--ld-ink, var(--text)); }
.ct-entry.is-unknown { color: var(--muted, var(--text-4)); font-style: normal; }
.ct-entry-detail { color: var(--ld-ink-2, var(--text-2)); }
.ct-entry-note { display: block; margin-top: 2px; font-size: var(--fs-xs, 12px); color: var(--ld-muted, var(--text-3)); line-height: var(--lh-snug, 1.35); }

/* ------------------------------------------------------ the four blocks -- */
.lead-blocks { display: grid; gap: 16px; min-width: 0; }
.lead-record .lead-block, .lead-record .lead-log, .lead-record .lead-activity {
  min-width: 0; margin: 0; padding: 20px;
  border: 1px solid var(--ld-line); border-radius: var(--ld-r-card);
  background: var(--ld-card); box-shadow: var(--ld-shadow-card);
}
.lead-record .lead-block {
  animation: lead-rise var(--ld-dur-3) var(--ld-ease) both;
  animation-delay: calc(min(var(--i, 0), 12) * 60ms + 160ms);
}
.lead-record .lead-log { margin-bottom: 16px; }
.lead-record .lead-block-head { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; min-height: 0; margin: 0 0 16px; padding: 0; border: 0; }
.lead-record .lead-block-head > .kicker { flex-basis: auto; margin: 0; }
.lead-record .lead-block-head > .kicker::before { display: none; } /* the icon node is the marker here */
.lead-block-ico {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 999px; background: var(--ld-paper-2); color: var(--ld-ink);
}
.lead-block[data-block="next"] .lead-block-ico { background: var(--ld-volt); color: var(--ld-volt-ink); }
.lead-block-title { flex: 1 1 auto; }
.lead-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ld-line); min-width: 0; }
.lead-group-label { margin: 0 0 12px; font-size: var(--fs-sm, 13px); font-weight: 600; letter-spacing: -.005em; color: var(--ld-ink); }
.lead-record .calendly-form-note { margin: -4px 0 12px; }
.lead-record .lead-disclosure .lead-group { margin-top: 12px; padding-top: 12px; }

/* Once the summary is in, a block does not repeat what a tile already says:
   how they entered, the owner, the next follow-up and the consult time. If
   the summary cannot load, the blocks show all of it as before. */
.lead-record:has(.ct-glance) :is(.lead-glance-dup, .lead-kv-entry) { display: none; }
.lead-record:has(.ct-glance) .lead-block[data-block="next"]:not(:has(.lead-group)) { display: none; }

/* The depth, one tap away: the shell's .disclosure (chevron, count, rise). */
.lead-disclosure { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--ld-line); }
.lead-disclosure > summary { min-height: 40px; margin: 0 -4px; color: var(--ld-ink); }
.lead-record .lead-disclosure-body { padding: 6px 0 4px; }
.lead-block.lead-ask { padding-top: 4px; padding-bottom: 4px; }
.lead-ask > .lead-disclosure { margin-top: 0; border-top: 0; }
.lead-ask .lead-disclosure-body { padding-bottom: 16px; }
.lead-note { margin: 12px 0 0; font-size: var(--fs-sm, 13px); color: var(--ld-muted); }
.lead-kv-entry { margin-top: 14px; }
.lead-add { gap: 6px; margin: 10px 0 0 -4px; min-height: 32px; color: var(--ld-ink); font-weight: 600; }
.lead-next-empty { margin: 0; font-size: var(--fs-sm, 13px); color: var(--ld-ink-2); }

.lead-record .kv { grid-template-columns: minmax(104px, 144px) minmax(0, 1fr); gap: 10px 16px; }
.lead-record .kv-k {
  font-family: inherit; font-size: var(--fs-xs, 12px); font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--ld-muted); padding-top: 2px;
}
.lead-record .kv-v { font-size: var(--fs-md, 14px); line-height: 1.45; }
/* The consult's date and time, and its notes, on the record's surfaces. */
.lead-record .consult-time-grid { border: 0; border-radius: 12px; background: var(--ld-line); overflow: hidden; }
.lead-record .consult-time-grid > div { background: var(--ld-paper); }
.lead-record .consult-time-label { font-family: inherit; font-size: var(--fs-xs, 12px); letter-spacing: 0; text-transform: none; color: var(--ld-muted); }
.lead-record .consult-time-grid strong { font-size: var(--fs-lg, 16px); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.lead-record .consult-empty-note { border: 0; padding: 12px 0 0; }
.lead-record .kv-v.is-empty { color: var(--ld-muted); font-style: normal; } /* upright, per the owner's rule */
.lead-record .kv-v a { color: var(--link, var(--accent)); }

/* Came from: the first touch, kept in view. */
.lead-first-touch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  margin: 12px 0 0; padding: 10px 12px; border-radius: 10px;
  background: var(--ld-paper); font-size: var(--fs-sm, 13px);
}
.lead-first-touch .ico { color: var(--ld-muted); }
.lead-first-touch-k { color: var(--ld-muted); font-weight: 500; }
.lead-first-touch-v { color: var(--ld-ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* What's happened: the newest few, then a way into the full story. */
.lead-recent:empty { display: none; }
.ct-recent { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.ct-recent-item {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 10px;
  animation: lead-rise var(--ld-dur-3) var(--ld-ease) both; animation-delay: calc(var(--i, 0) * 70ms + 200ms);
}
.ct-recent-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--ld-paper-2); color: var(--ld-ink); }
.ct-recent-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-md, 14px); color: var(--ld-ink); }
.ct-recent-when { font-size: var(--fs-xs, 12px); color: var(--ld-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lead-see-all { gap: 6px; margin: 2px 0 0 -4px; min-height: 32px; color: var(--ld-ink); font-weight: 600; }
.lead-see-all .ico { transition: transform var(--ld-dur-2) var(--ld-ease); }
.lead-see-all:hover .ico { transform: translateX(3px); }

/* Who's responsible: the people, then the office and the touches. */
.lead-people { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0 0 18px; }
.lead-people-slot { display: contents; }
.lead-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lead-person-id { display: flex; flex-direction: column; min-width: 0; }
.lead-person-name { font-size: var(--fs-md, 14px); font-weight: 600; color: var(--ld-ink); overflow-wrap: anywhere; }
.lead-person-role { font-size: var(--fs-xs, 12px); color: var(--ld-muted); }

/* What comes next: the one live marker on the record. */
.lead-next {
  position: relative; padding: 14px 16px 14px 34px; border-radius: 12px;
  background: var(--ld-volt-soft);
}
.lead-next.is-overdue { background: var(--ld-coral-soft); }
.lead-next-dot {
  position: absolute; left: 14px; top: 20px; width: 9px; height: 9px; border-radius: 999px;
  background: var(--ld-volt); box-shadow: 0 0 0 1.5px var(--ld-volt-ink);
  animation: lead-dot 1.6s ease-in-out infinite;
}
.lead-next.is-overdue .lead-next-dot { background: var(--ld-coral); box-shadow: none; animation: none; }
.lead-due { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.lead-due .overdue { color: var(--ld-coral-text); }

/* Ask about this lead: the assistant, on the same card language. */
.lead-block[data-block="ask"] .lead-chat { margin: 0; }

/* ---------------------------------------------------- activity: log it -- */
.lead-log .fieldset { margin: 0; }
.lead-record .lead-log .legend.kicker {
  display: flex; float: left; width: 100%; margin: 0 0 16px; padding: 0; border: 0;
  font-size: 11px; font-weight: 500; color: var(--ld-muted);
}
.lead-log .legend + * { clear: both; }
.lead-log .textarea { border-radius: var(--ld-r-ctl); }
.lead-log .btn-primary { min-height: 36px; padding: 0 16px; border-radius: var(--ld-r-ctl); }

/* The Edit tab: each section on its own card. */
.lead-record #contact-panel-edit .fieldset {
  margin: 0 0 16px; padding: 20px;
  border: 1px solid var(--ld-line); border-radius: var(--ld-r-card);
  background: var(--ld-card); box-shadow: var(--ld-shadow-card);
}
.lead-record #contact-panel-edit .legend { float: left; width: 100%; margin: 0 0 14px; padding: 0 0 10px; }
.lead-record #contact-panel-edit .legend + * { clear: both; }

/* ------------------------------------------------------ the timeline -- */
.ct-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.ct-chip {
  min-height: 32px; padding: 0 14px;
  border: 1px solid var(--ld-line-strong, var(--border)); border-radius: 999px;
  background: var(--ld-card, transparent); color: var(--ld-ink, var(--text-2));
  font: inherit; font-size: var(--fs-sm, 13px); font-weight: 500; cursor: pointer;
  transition: background var(--ld-dur-2, 150ms) var(--ld-ease, ease), color var(--ld-dur-2, 150ms), border-color var(--ld-dur-2, 150ms), transform var(--ld-dur-2, 150ms) var(--ld-ease, ease);
}
.ct-chip:hover { background: var(--ld-card-2, var(--surface-2)); }
.ct-chip:active { transform: scale(.97); }
.ct-chip.is-active { background: var(--ld-volt, var(--surface-3)); border-color: transparent; color: var(--ld-volt-ink, var(--text)); font-weight: 600; }
.ct-chip:focus-visible, .ct-item-link:focus-visible, .ct-more:focus-visible { outline: 2px solid var(--volt, var(--accent)); outline-offset: 2px; }

.lead-record .timeline { padding-left: 46px; }
.lead-record .timeline::before { left: 15px; top: 10px; bottom: 12px; width: 1px; background: var(--ld-line-strong); }
.lead-record .tl-item { position: relative; isolation: isolate; padding: 0 0 22px; }
.lead-record .tl-item:last-child { padding-bottom: 4px; }
.lead-record .tl-node {
  position: absolute; left: -46px; top: -5px;
  display: grid; place-items: center; width: 31px; height: 31px; border-radius: 999px;
  background: var(--ld-card); color: var(--ld-ink);
  box-shadow: inset 0 0 0 1px var(--ld-line-strong), 0 0 0 4px var(--ld-card);
}
.lead-record .tl-node.is-stage {
  color: var(--stage-t, var(--ld-ink));
  background: color-mix(in srgb, var(--stage-c, var(--ld-muted)) 16%, var(--ld-card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stage-c, var(--ld-muted)) 40%, transparent), 0 0 0 4px var(--ld-card);
}
.lead-record .tl-node.is-ok { background: var(--ld-volt); color: var(--ld-volt-ink); box-shadow: 0 0 0 4px var(--ld-card); }
.lead-record .tl-node.is-warn { background: var(--ld-coral-soft); color: var(--ld-coral-text); box-shadow: inset 0 0 0 1px var(--ld-coral), 0 0 0 4px var(--ld-card); }
.lead-record .tl-item[data-automatic="true"] .tl-node { background: var(--ld-card); color: var(--ld-ink); box-shadow: inset 0 0 0 1.5px var(--ld-volt-ink), 0 0 0 4px var(--ld-card); }
.lead-record .tl-item[data-source="calls"] .tl-node { background: var(--ld-ink-panel); color: var(--ld-volt); box-shadow: 0 0 0 4px var(--ld-card); }
.lead-record .ct-timeline > .ct-item:first-child .tl-node { box-shadow: inset 0 0 0 1.5px var(--ld-ink), 0 0 0 4px var(--ld-card), 0 0 0 6px var(--ld-volt); }
.lead-record .tl-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-size: var(--fs-md, 14px); color: var(--ld-ink); }
.lead-record .tl-type {
  font-family: inherit; font-size: var(--fs-xs, 12px); font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--ld-muted);
}
.lead-record .tl-time { margin-left: auto; font-family: inherit; font-size: var(--fs-xs, 12px); color: var(--ld-muted); font-variant-numeric: tabular-nums; }
.lead-record .tl-body { margin-top: 4px; font-size: var(--fs-md, 14px); line-height: 1.5; color: var(--ld-ink-2); overflow-wrap: anywhere; }
.lead-record .tl-head .stage-pill { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: var(--fs-xs, 12px); border-radius: 999px; }
.ct-item-title { min-width: 0; font-size: var(--fs-md, 14px); font-weight: 600; color: var(--ld-ink, var(--text)); overflow-wrap: anywhere; }
.ct-item-body { white-space: pre-wrap; }
.tl-dot.is-warn { background: var(--warn-fg); }
.tl-dot.is-ok { background: var(--ok-fg); }
.ct-item-link { margin-top: var(--sp-2, 8px); }
.ct-more { margin: var(--sp-2, 8px) 0 0; }
.lead-record .ct-item-link, .lead-record .ct-more, .lead-record .ct-undo { min-height: 32px; padding: 0 12px; border-radius: 999px; font-weight: 600; }

/* What just changed: one volt wipe behind the item (core.motion.flash when
   the shell has it; this is the same wipe for older shells). */
.ct-wipe::after {
  content: ""; position: absolute; inset: -6px -10px 8px -52px; z-index: -1; border-radius: 14px;
  background: var(--ld-volt-soft, rgba(207, 244, 101, .28));
  transform-origin: left center; pointer-events: none;
  animation: ct-wipe 1.4s var(--ld-ease, ease-out) both;
}
/* The shell's own wipe (core.motion.flash adds .m-wipe) reaches round the
   node too, so both read as one highlight. */
.lead-record .tl-item.m-wipe::after { inset: -6px -10px 8px -52px; border-radius: 14px; }
.ct-glance .ct-glance-row:is(.m-wipe, .ct-wipe)::after { inset: -6px -8px; border-radius: 10px; }
.ct-glance .ct-tile:is(.m-wipe, .ct-wipe)::after { inset: 0; opacity: 1; animation: ct-wipe 1.4s var(--ld-ease, ease-out) both; animation-delay: 0s; }

/* Automatic pipeline actions (HQ-21): what the call said, and Undo. */
.ct-evidence { margin-top: var(--sp-2, 8px); font-size: var(--fs-sm, 13px); }
.ct-evidence summary { cursor: pointer; color: var(--ld-ink-2, var(--text-2)); font-weight: 500; }
.ct-evidence blockquote {
  margin: 6px 0 0; padding: 8px 12px; border-radius: 10px;
  background: var(--ld-paper, var(--surface-2)); color: var(--ld-ink-2, var(--text-2)); overflow-wrap: anywhere;
}
.ct-undo { margin-top: var(--sp-2, 8px); }
.ct-evidence-hidden { margin: var(--sp-2, 8px) 0 0; font-size: var(--fs-xs, 12px); color: var(--ld-muted, var(--text-3)); }

/* ------------------------------------------------ the dark call panel -- */
.ct-call-panel {
  position: relative; overflow: hidden;
  margin-top: 10px; padding: 18px 18px 16px;
  border: 0; border-radius: var(--ld-r-card);
  background: var(--ld-ink-panel);
  background-image: radial-gradient(120% 80% at 0% 0%, rgba(207, 244, 101, .10), transparent 55%);
  color: var(--ld-on-ink); box-shadow: inset 0 0 0 1px rgba(241, 238, 231, .06), var(--ld-shadow-ink);
}
.ct-call-kicker { color: var(--ld-on-ink-2); }
/* The waveform fills its panel at any width: each bar takes a share of the
   row (--n bars) and the rest is air between them. */
.ct-wave {
  display: flex; align-items: center; justify-content: space-between; height: 64px; margin: 12px 0 14px;
}
.ct-wave i {
  flex: none; width: max(1.5px, calc(100% / var(--n, 72) * .52)); height: calc(var(--h, .5) * 100%);
  border-radius: 99px; background: rgba(241, 238, 231, .2);
  transform-origin: 50% 50%;
  animation: ct-bar var(--ld-dur-4) var(--ld-pop) both;
  animation-delay: calc(var(--i, 0) * 9ms);
}
.ct-wave i.is-lit { background: var(--ld-volt); opacity: calc(.5 + var(--h, .5) * .5); }
.ct-call-lines { display: grid; gap: 6px; }
.ct-call-line { margin: 0; font-size: var(--fs-sm, 13px); line-height: 1.5; color: var(--ld-on-ink-2); overflow-wrap: anywhere; }
.ct-call-line.is-summary { font-size: var(--fs-lg, 16px); line-height: 1.5; color: var(--ld-on-ink); margin: 4px 0; letter-spacing: -.005em; }
.ct-call-line.is-outcome, .ct-call-line.is-next { color: var(--ld-on-ink); }
.ct-call-line.is-review { color: var(--ld-on-ink-2); font-size: var(--fs-xs, 12px); }
.ct-call-coach { margin: 4px 0; }
.ct-call-panel .ct-coach-chip {
  align-items: flex-start; gap: 8px; padding: 9px 12px; border: 0; border-radius: 12px;
  background: var(--ld-volt); color: var(--ld-volt-ink);
  font-size: var(--fs-sm, 13px); font-weight: 600; line-height: 1.4; white-space: normal;
  box-shadow: 0 12px 28px -14px rgba(207, 244, 101, .55);
}
.ct-call-panel .ct-coach-chip .ico { flex: 0 0 auto; margin-top: 1px; color: var(--ld-volt-ink); }
.ct-call-score { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ct-call-score .ct-call-line { color: var(--ld-on-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ct-meter { flex: 1 1 120px; max-width: 180px; height: 4px; border-radius: 999px; background: rgba(241, 238, 231, .14); overflow: hidden; }
.ct-meter i {
  display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--ld-volt);
  transform-origin: left center; transform: scaleX(var(--v, 0));
  animation: ct-meter 1s var(--ld-ease) both; animation-delay: .35s;
}
.ct-call-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(241, 238, 231, .12);
}
.ct-call-actions .ct-transcript { display: contents; }
.ct-call-actions :is(.ct-transcript-note, .ct-transcript-lines) { flex-basis: 100%; order: 2; }
.ct-call-panel .btn {
  min-height: 32px; height: auto; margin: 0; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(241, 238, 231, .18); background: rgba(241, 238, 231, .06); color: var(--ld-on-ink);
  font-weight: 600;
}
.ct-call-panel .btn:hover { background: rgba(241, 238, 231, .14); border-color: rgba(241, 238, 231, .3); color: var(--ld-on-ink); }
.ct-call-panel .ct-transcript-note { color: var(--ld-on-ink-2); }
.ct-call-panel .ct-transcript-lines { border-left-color: rgba(207, 244, 101, .5); }
.ct-call-panel .ct-transcript-who { color: var(--ld-volt); }
.ct-call-panel .ct-transcript-at { color: var(--ld-on-ink-2); }
.ct-call-panel .ct-transcript-text { color: var(--ld-on-ink); }

/* One call's transcript, opened on request. */
.ct-transcript { margin-top: var(--sp-2, 8px); font-size: var(--fs-sm, 13px); }
.ct-transcript-note { margin: var(--sp-1, 4px) 0 0; font-size: var(--fs-xs, 12px); color: var(--ld-muted, var(--text-3)); }
.ct-transcript-lines { margin: var(--sp-2, 8px) 0 0; padding: 0; list-style: none; max-height: 24rem; overflow-y: auto; border-left: 2px solid var(--ld-line-strong, var(--border)); }
.ct-transcript-lines li { padding: 3px 0 3px var(--sp-3, 12px); overflow-wrap: anywhere; }
.ct-transcript-who { font-weight: 600; margin-right: var(--sp-1, 4px); }
.ct-transcript-at { font-size: var(--fs-2xs, 11px); color: var(--ld-muted, var(--text-3)); margin-right: var(--sp-1, 4px); font-variant-numeric: tabular-nums; }
.ct-transcript-text { color: var(--ld-ink, var(--text)); }

/* Phone calls answered by the AI receptionist: only while it is on. */
.ct-calls {
  margin: 0 0 16px; padding: 18px 20px;
  border: 1px solid var(--ld-line); border-radius: var(--ld-r-card); background: var(--ld-card); box-shadow: var(--ld-shadow-card);
}
.lead-record .ct-calls .legend { border: 0; padding: 0; margin: 0 0 8px; font-family: inherit; text-transform: none; letter-spacing: 0; font-size: var(--fs-sm, 13px); font-weight: 600; color: var(--ld-ink); }
.ct-call-list { list-style: none; margin: 0; padding: 0; }
.ct-call { padding: var(--sp-3, 12px) 0; border-top: 1px solid var(--ld-line, var(--border-faint)); }
.ct-call-head { font-size: var(--fs-sm, 13px); color: var(--ld-ink, var(--text)); }
.ct-calls .ct-call-line { margin: 2px 0 0; font-size: var(--fs-sm, 13px); color: var(--ld-ink-2, var(--text-2)); }
.ct-call-answers { margin: var(--sp-1, 4px) 0 0; padding-left: var(--sp-4, 16px); font-size: var(--fs-sm, 13px); color: var(--ld-ink-2, var(--text-2)); }
.ct-call-summary { margin: var(--sp-2, 8px) 0 0; font-size: var(--fs-sm, 13px); color: var(--ld-ink, var(--text)); overflow-wrap: anywhere; }
.ct-call-k { font-size: var(--fs-xs, 12px); font-weight: 600; color: var(--ld-muted, var(--text-3)); }
.ct-call-kept { margin: 2px 0 0; font-size: var(--fs-xs, 12px); color: var(--ld-muted, var(--text-3)); }

/* ------------------------------------------------------------- motion -- */
@keyframes lead-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lead-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes lead-dot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 1.5px var(--ld-volt-ink), 0 0 0 0 rgba(207, 244, 101, .7); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 1.5px var(--ld-volt-ink), 0 0 0 7px rgba(207, 244, 101, 0); }
}
@keyframes ct-row-light {
  0% { opacity: 1; transform: scaleX(0); }
  40% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}
@keyframes ct-row-stay { from { opacity: 1; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes lead-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(207, 244, 101, .75); }
  50% { box-shadow: 0 0 0 7px rgba(207, 244, 101, 0); }
}
@keyframes ct-wipe {
  0% { opacity: 1; transform: scaleX(0); }
  35% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}
@keyframes ct-bar { from { transform: scaleY(.06); } to { transform: scaleY(1); } }
@keyframes ct-meter { from { transform: scaleX(0); } }
@keyframes ct-press { 0% { transform: scale(1); } 40% { transform: scale(.94); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .lead-hero, .lead-av.avatar--xl, .lead-record .ct-glance, .lead-record .lead-block, .ct-recent-item,
  .lead-panel-in, .ct-glance-note.is-fresh, .ct-wave i, .ct-meter i, .lead-next-dot, .is-pressed,
  .ct-glance-row::after, .ct-wipe::after, .ct-tile, .ct-tile::after, .lead-journey-step.is-current,
  .ct-glance-row[data-row~="next"] .ct-glance-ico, .lead-disclosure[open] > .lead-disclosure-body { animation: none !important; }
  .ct-tile:hover { transform: none; }
  .ct-wipe::after { opacity: 0; }
  .ct-glance-row[data-row~="next"].ct-wipe::after { opacity: 1; }
  .lead-record *, #drawer.is-record .drawer-close { transition-duration: 0s !important; }
}

/* --------------------------------------------------------- small screens -- */
@media (max-width: 560px) {
  .lead-record:not(.is-new) { padding: 16px 16px 28px; }
  .lead-hero {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "av id more" "journey journey journey" "reach reach reach" "act act act";
    gap: 12px;
    padding: 0 0 16px;
  }
  .lead-more { margin-right: 50px; }
  .lead-hero:not(:has(.lead-more)) .lead-hero-id { padding-right: 50px; }
  .lead-hero-action { width: 100%; min-height: 44px; justify-self: stretch; }
  .lead-hero-journey { padding: 12px 14px; }
  .lead-stage-change { width: 100%; justify-content: center; min-height: 44px; }
  .lead-reach { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  .lead-record .lead-reach-btn { justify-content: center; min-height: 44px; padding: 0 8px; }
  .lead-record .ct-glance { grid-template-columns: minmax(0, 1fr); }
  .lead-av.avatar--xl { width: 52px; height: 52px; font-size: 18px; }
  .lead-hero-name { font-size: var(--fs-xl, 22px); }
  .lead-record .lead-block, .lead-record .lead-log, .lead-record .lead-activity { padding: 16px; }
  .lead-record .lead-tabs { display: flex; width: 100%; }
  .lead-record .lead-tabs .tab { flex: 1 1 0; min-height: 40px; padding: 0 8px; }
  .lead-record .timeline { padding-left: 40px; }
  .lead-record .timeline::before { left: 13px; }
  .lead-record .tl-node { left: -40px; width: 27px; height: 27px; }
}
@media (max-width: 560px) {
  /* On a phone the filters are one row that scrolls inside the card. */
  .lead-record .ct-filters {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    margin: 0 -16px 18px; padding: 0 16px 2px; scroll-padding-inline: 16px;
  }
  .lead-record .ct-filters::-webkit-scrollbar { display: none; }
  .lead-record .ct-chip { flex: 0 0 auto; }
}
@media (max-width: 560px), (pointer: coarse) {
  .ct-chip, .lead-record .ct-item-link, .lead-record .ct-more, .lead-record .ct-undo,
  .ct-glance [data-ct-claim], .ct-glance [data-ct-release], .ct-glance [data-ct-confirm], .ct-call-panel .btn,
  .lead-see-all, .lead-record .ct-join { min-height: 44px; }
  .lead-record .lead-tabs .tab { min-height: 44px; }
  .lead-record .ct-confirm .select, .lead-log .btn-primary, .lead-add { min-height: 44px; }
  .lead-record .lead-more-btn { width: 44px; height: 44px; }
  #drawer.is-record .drawer-close { width: 44px; height: 44px; }
}
