/* AbhiLeads — live extraction stage (built by stage.js).
   Raw page text is set narrow and grey; the clean list is wide and ink —
   Archivo's width axis carries "messy → clean". Yellow = "found". */

.al-stage-band { padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 8vw, 104px); background: var(--al-band); }
.al-stage {
  position: relative; overflow: hidden; width: min(var(--al-wrap), 100% - 40px); margin-inline: auto;
  background: var(--al-white); border: 1px solid var(--al-rule); border-radius: 24px;
  font-family: var(--al-font); color: var(--al-ink);
}
.al-stage-note { width: min(var(--al-wrap), 100% - 40px); margin: 14px auto 0; font: 400 13px/1.4 var(--al-font); color: var(--al-ink-3); }

/* ── query bar ── */
.al-stage-top { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--al-rule); }
.al-q { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 20px; border-radius: 999px; background: var(--al-band); font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.al-q svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--al-ink-3); stroke-width: 2; stroke-linecap: round; }
.al-caret { width: 2px; height: 22px; margin-left: -8px; background: var(--al-ink); animation: al-caret 1s steps(1) infinite; }
.al-busy .al-caret, .al-done .al-caret { opacity: 0; animation: none; }
.al-go { flex: none; padding: 15px 22px; border-radius: 999px; background: var(--al-ink); color: var(--al-white); font-size: 15px; font-weight: 600; }
.al-go.press, .al-export.press { animation: al-press .3s var(--al-ease); }
.al-toggle { flex: none; padding: 8px 12px; border: 0; border-radius: 999px; background: none; color: var(--al-ink-3); font: 500 13px/1 var(--al-font); cursor: pointer; }
.al-toggle:hover { color: var(--al-ink); background: var(--al-band); }
.al-still .al-toggle { display: none; }

/* ── three columns ── */
.al-stage-body { display: grid; grid-template-columns: 240px minmax(0, 1fr) minmax(0, 400px); min-height: 452px; transition: opacity .4s ease; }
.al-fade .al-stage-body { opacity: 0; }
.al-col { padding: 18px 20px 22px; min-width: 0; }
.al-col + .al-col { border-left: 1px solid var(--al-rule); }
.al-col h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--al-ink-3); }
.al-col ul { list-style: none; margin: 0; padding: 0; }

/* sources: a yellow wash fills each chip while it is being read */
.al-srcs ul { display: grid; gap: 4px; }
.al-src { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--al-ink-3); isolation: isolate; overflow: hidden; transition: color .3s ease; }
.al-src::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--al-yellow-wash); transform: scaleX(0); transform-origin: left; }
.al-src.scan { color: var(--al-ink); }
.al-src.scan::before { transform: scaleX(1); transition: transform 1.15s linear; }
.al-src.done { color: var(--al-ink); }
.al-src.done::before { opacity: 0; transform: scaleX(1); transition: opacity .5s ease; }
.al-src i { flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--al-rule-2); transition: background-color .3s, border-color .3s; }
.al-src.scan i { border-color: var(--al-yellow-2); background: var(--al-yellow); animation: al-blink .7s ease-in-out infinite; }
.al-src.done i { border-color: var(--al-ink); background: var(--al-ink); }
.al-src span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-src b { font-variant-numeric: tabular-nums; font-weight: 700; opacity: 0; translate: 0 6px; }
.al-src.done b { opacity: 1; translate: 0 0; transition: opacity .3s ease, translate .4s var(--al-ease); }

/* raw page text, newest on top */
.al-feed h4 { color: var(--al-ink-3); }
.al-done .al-feed h4 .al-dots { opacity: 0; }
.al-feed-list { position: relative; height: 380px; overflow: hidden; display: grid; align-content: start; }
.al-raw { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s var(--al-ease), opacity .45s ease; }
.al-raw.in { grid-template-rows: 1fr; opacity: 1; }
.al-raw.gone { opacity: 0; }
.al-raw > div { overflow: hidden; }
.al-raw > div > * { margin: 0; }
.al-raw > div { padding: 0 0 8px; }
.al-raw small { display: block; padding: 10px 14px 0; border: 1px solid var(--al-rule); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--al-band); font-size: 11.5px; font-weight: 600; color: var(--al-ink-3); }
.al-raw p { padding: 4px 14px 11px; border: 1px solid var(--al-rule); border-top: 0; border-radius: 0 0 12px 12px; background: var(--al-band); font-size: 14px; line-height: 1.5; font-stretch: 84%; color: var(--al-ink-3); }
.al-raw mark {
  color: var(--al-ink-2); font-weight: 600; background: linear-gradient(var(--al-yellow), var(--al-yellow)) 0 0 / 0% 100% no-repeat;
  padding: 1px 3px; margin: 0 -3px; border-radius: 4px; transition: background-size .45s var(--al-ease-io), color .3s;
}
.al-raw mark.hit { background-size: 100% 100%; color: var(--al-ink); }

/* the clean list */
.al-out { display: flex; flex-direction: column; }
.al-out h4 { justify-content: space-between; align-items: baseline; }
.al-count { font-size: 34px; line-height: 1; font-weight: 850; font-stretch: 112%; letter-spacing: -0.03em; color: var(--al-ink); font-variant-numeric: tabular-nums; }
.al-rows { flex: 1; min-height: 286px; }
.al-row { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .4s var(--al-ease), opacity .35s ease; }
.al-row.in { grid-template-rows: 1fr; opacity: 1; }
.al-row > div { overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--al-rule); }
.al-row b { font-size: 15px; font-weight: 700; font-stretch: 104%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-row em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: 12px; font-weight: 600; color: var(--al-ink-3); padding: 3px 8px; border: 1px solid var(--al-rule); border-radius: 999px; }
.al-c { display: block; justify-self: start; min-width: 6ch; max-width: 100%; min-height: 21px; padding-top: 2px; font-size: 14px; color: var(--al-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; }
.al-c.flash { animation: al-flash 1.1s ease-out; }
.al-out-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; margin-top: 12px; }
.al-more-n { font-size: 13px; color: var(--al-ink-3); transition: opacity .25s ease; }
.al-out-foot:has(.al-file.in) .al-more-n { opacity: 0; }
.al-export { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--al-rule-2); font-size: 13px; font-weight: 600; color: var(--al-ink-3); transition: color .3s, border-color .3s, background-color .3s; }
.al-done .al-export { color: var(--al-ink); border-color: var(--al-ink); }
.al-file { position: absolute; left: 0; top: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; background: var(--al-yellow-wash); font-size: 14px; font-weight: 600; opacity: 0; translate: 0 8px; pointer-events: none; }
.al-file.in { opacity: 1; translate: 0 0; transition: opacity .35s ease, translate .5s var(--al-ease); }
.al-file svg { width: 20px; height: 20px; fill: none; stroke: var(--al-ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.al-file b { margin-left: 4px; font-weight: 500; color: var(--al-ink-2); }

/* the travelling contact */
.al-fly {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; will-change: transform;
  padding: 1px 3px; border-radius: 4px; background: var(--al-yellow); color: var(--al-ink);
  font-size: 14px; line-height: 1.5; font-weight: 600; font-stretch: 84%; white-space: nowrap;
}
.al-fly.go { transition: transform .72s var(--al-ease-io), font-stretch .72s var(--al-ease-io); font-stretch: 100%; }

.al-paused .al-src.scan i, .al-paused .al-dots i, .al-paused .al-caret { animation-play-state: paused; }

@keyframes al-caret { 50% { opacity: 0; } }
@keyframes al-flash { 0% { background: var(--al-yellow); color: var(--al-ink); } 100% { background: transparent; } }

@media (max-width: 1060px) {
  .al-stage-body { grid-template-columns: 210px minmax(0, 1fr); }
  .al-out { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--al-rule); }
}
@media (max-width: 680px) {
  .al-stage { border-radius: 20px; }
  .al-stage-top { padding: 12px; gap: 8px; }
  .al-q { height: 46px; font-size: 15px; padding: 0 14px; gap: 8px; }
  .al-q svg { width: 18px; height: 18px; }
  .al-go { padding: 14px 16px; font-size: 14px; }
  .al-toggle { position: absolute; top: 80px; right: 8px; z-index: 2; }
  .al-stage-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .al-col { padding: 14px 14px 16px; }
  .al-col + .al-col { border-left: 0; border-top: 1px solid var(--al-rule); }
  .al-srcs ul { grid-template-columns: 1fr 1fr; }
  .al-src { padding: 8px 10px; font-size: 13px; gap: 8px; }
  .al-feed-list { height: 196px; }
  .al-count { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .al-stage *, .al-stage *::before { transition: none !important; animation: none !important; }
}
