/*
 * The Leads tab and the calmer lead card (lane t22-leadtab, 12 Oct 2026; js/v21_leadtab.js 1.0.0). Only the desk's own
 * tokens, so every theme follows (light, dark, Eucalypt, Harbour, High contrast). No inline styles. Nothing here draws
 * while features.leadTab is off: every rule hangs off #lt-tabs, #lt-empty or .lt-job, which only that file adds.
 */

/* ---------- the two tabs over the board ---------- */
.lt-tabs {
  display: flex; gap: 4px; margin: 4px 0 12px; padding: 4px; border-radius: 14px; width: fit-content; max-width: 100%;
  background: var(--glass-1); border: 1px solid var(--glass-rim); box-shadow: var(--shadow-1);
}
.lt-tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 18px;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: inherit; font-size: 1rem;
  font-weight: 600; cursor: pointer;
}
.lt-tab:hover { background: var(--glass-hover); color: var(--ink); }
.lt-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.lt-tab.is-on { background: var(--brand); color: var(--brand-ink); box-shadow: var(--btn-shadow); }
.lt-tab-n {
  min-width: 1.75rem; padding: 0 8px; border-radius: 999px; font-size: .8125rem; line-height: 1.375rem; text-align: center;
  background: var(--brand-soft); color: var(--brand-text);
}
.lt-tab.is-on .lt-tab-n { background: rgba(255,255,255,.22); color: var(--brand-ink); }
.lt-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--ember); }
.lt-empty { margin: 8px 2px 16px; color: var(--ink-2); font-size: .9375rem; }
@media (max-width: 560px) {
  .lt-tabs { width: 100%; }
  .lt-tab { flex: 1 1 0; justify-content: center; }
  .lt-steps-l { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .lt-step-b { min-height: 52px; padding: 8px 10px; }
}

/* ---------- the lead card: About this lead ---------- */
.lt-job .lt-head {
  max-width: 1160px; margin: 0 auto 14px; padding: 16px 18px; border-radius: var(--r-card); display: grid; gap: 10px;
}
.lt-head-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.lt-name { margin: 0; font-size: 1.5rem; line-height: 1.9rem; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.lt-status {
  padding: 3px 12px; border-radius: 999px; font-size: .875rem; font-weight: 700; color: var(--brand-text);
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand-text) 35%, transparent);
}
.lt-status-to { font-weight: 600; }
.lt-asked { margin: 0; display: grid; gap: 2px; }
.lt-asked-k { color: var(--ink-3); font-size: .8125rem; font-weight: 600; }
.lt-asked-v { color: var(--ink); font-size: 1.0625rem; line-height: 1.55rem; }
.lt-facts { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.lt-fact { display: grid; gap: 0; min-width: 0; }
.lt-fact dt { color: var(--ink-3); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.lt-fact dd { margin: 0; color: var(--ink); font-size: .9375rem; overflow-wrap: anywhere; }
.lt-link { color: var(--brand-text); font-weight: 600; }
.lt-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* the LEAD sticker, the next step and the form answers sit inside the card, quieter */
.lt-job .lt-head > .ldj-topwrap { max-width: none; margin: 0; padding-top: 10px; border-top: 1px solid var(--glass-rim); }
.lt-job .lt-head .ldj-top { max-width: none; margin: 0; }
.lt-job .lt-head .ldj-status { display: none; }
.lt-job .lt-head .lux-next { margin-top: 0; }
.lt-job .lt-head > .ldj-form {
  margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--solid-2); border: 1px solid var(--glass-rim);
  max-height: none; overflow: visible;
}

/* ---------- the duplicated and empty things go quiet ---------- */
.lt-job #ask-top { display: none; }
.lt-job .stack > .sec-h.lt-quiet { display: none; }

/* ---------- the four steps in one row ---------- */
.lt-steps { position: relative; }
.lt-steps-l { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.lt-step-b {
  width: 100%; height: 100%; min-height: 64px; display: grid; grid-template-columns: 32px minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--glass-rim); background: var(--solid); color: var(--ink); font: inherit;
}
.lt-step-b:hover { border-color: color-mix(in srgb, var(--brand-text) 50%, transparent); }
.lt-step-b:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.lt-step-n {
  grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  border: 2px solid var(--edge-strong); color: var(--ink-2);
}
.lt-step-t { font-weight: 700; font-size: .9375rem; }
.lt-step-s { color: var(--ink-2); font-size: .8125rem; line-height: 1.2rem; overflow-wrap: anywhere; }
.lt-step.is-done .lt-step-b { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 7%, var(--solid)); }
.lt-step.is-done .lt-step-n { border-color: var(--ok); background: var(--ok); color: var(--solid); }
.lt-step.is-done .lt-step-s { color: var(--ok); font-weight: 600; }

/* ---------- the step boxes, one column, in the order they are done ---------- */
.lt-job .ldj-418.lt-lay { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.lt-job .ldj-418.lt-lay > * { grid-column: 1; grid-row: auto; order: 0; }
.lt-job .ldj-418.lt-lay .l418 { grid-template-columns: minmax(0, 1fr); }
.lt-job .lt-box { scroll-margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: var(--solid); border: 1px solid var(--glass-rim); box-shadow: none; }
.lt-job .ldj-choice.lt-box { box-shadow: none; }
.lt-job .lux-rem.lt-box.is-due, .lt-job .lux-rem.lt-box.is-overdue { border-color: var(--glass-rim); box-shadow: none; }
.lt-numbered { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.0625rem; color: var(--ink); }
.lt-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8125rem;
  font-weight: 700; background: var(--brand); color: var(--brand-ink);
}
.lt-job .lux-rem-h { gap: 6px; }
.lt-job .lux-rem-h > svg { display: none; }
/* bigger targets inside the boxes */
.lt-job .lt-box .btn { min-height: 40px; }
.lt-job .lt-box .l418-ta { min-height: 5rem; font-size: .9375rem; padding: 8px 10px; }
.lt-job .ldj-opts-4 .ldj-opt { min-height: 72px; }

/* ---------- the press says what it does ---------- */
.lt-will { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--ink-2); font-size: .875rem; line-height: 1.35rem; }
.lt-will b { color: var(--ink); }
/* the counts line says less than the line above: it only stays while it says why the press waits */
.lt-job .job-bar.lt-bar .sum:not(:has(.why-blocked)) { display: none; }
.lt-job .job-bar.lt-bar #send-btn { min-height: 52px; font-size: 1.0625rem; }
@media (max-width: 1100px) {
  .lt-job .job-bar.lt-bar { flex-wrap: wrap; }
  .lt-will { flex-basis: 100%; }
}

@media (min-width: 561px) and (max-width: 1279px) {
  .lt-steps-l { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lt-job .ldj-opts.ldj-opts-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .lt-job .lt-head { padding: 14px; }
  .lt-name { font-size: 1.25rem; line-height: 1.6rem; }
  .lt-job .ldj-opts-4 { grid-template-columns: minmax(0, 1fr); }
  .lt-job .job-bar.lt-bar { gap: 8px; }
  .lt-job .job-bar.lt-bar #send-btn { flex: 1 1 100%; min-width: 0; }
}

:root[data-theme="high_contrast"] .lt-tab.is-on { background: #000; color: #fff; }
:root[data-theme="high_contrast"] .lt-step-b, :root[data-theme="high_contrast"] .lt-job .lt-box { border: 2px solid #000; }
@media (forced-colors: active) {
  .lt-tab.is-on { outline: 2px solid CanvasText; }
  .lt-step-b, .lt-job .lt-box, .lt-status { border: 2px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  .lt-tab, .lt-step-b { transition: none; }
}
