/* Analysis progress, failure and summary (js/analysis-progress.js, pages/analysis-run.js).
   Monochrome like the rail it extends: a finished stage is the text colour, the
   stage in hand moves, an upcoming one is muted. Only failure keeps a colour. */

.lp-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0; }

/* ── The wait, on the workspace ─────────────────────────────────────────── */
.lp { max-width:720px; padding:28px; border:1px solid var(--border-subtle); border-radius:24px;
  background:linear-gradient(135deg,var(--bg-elev-1),var(--bg-base)); box-shadow:0 18px 50px rgba(0,0,0,.09); }
.lp-eyebrow { margin-bottom:12px; }
.lp-now { font-size:clamp(22px,2.4vw,30px); font-weight:650; letter-spacing:-.035em; line-height:1.15; margin:0; }
.lp-meta { margin:8px 0 16px; font-size:13px; color:var(--text-secondary); font-variant-numeric:tabular-nums; }
.lp-rail { margin-bottom:24px; }
.lp-stages { list-style:none; margin:0; padding:0; display:grid; gap:2px; }
.lp-stage { display:flex; align-items:center; gap:12px; padding:7px 0; font-size:14px; color:var(--text-muted); }
.lp-mark { flex:none; display:grid; place-items:center; width:20px; height:20px; border-radius:50%;
  border:1px solid var(--border-default, var(--border-subtle)); color:var(--text-primary); }
.lp-stage--done { color:var(--text-secondary); }
.lp-stage--done .lp-mark { border-color:transparent; background:var(--tint-3); }
.lp-stage--current { color:var(--text-primary); font-weight:600; }
/* Motion without a number: the server reports no fraction of a step. */
.lp-stage--current .lp-mark { border-color:var(--text-primary); border-top-color:transparent;
  animation:lp-turn 1s linear infinite; }
@keyframes lp-turn { to { transform:rotate(360deg); } }
.lp-note { margin:18px 0 0; padding:10px 14px; border-radius:var(--r-sm); background:var(--tint-2);
  font-size:13px; line-height:1.55; color:var(--text-secondary); }
.lp-note--trouble { color:var(--text-primary); }
.lp-leave { margin:18px 0 0; font-size:12px; line-height:1.6; color:var(--text-muted); }
.lp-actions { max-width:720px; margin-top:12px; display:flex; justify-content:flex-end; }

/* ── The short form, in a list row ──────────────────────────────────────── */
.analysis-row--running { flex-wrap:wrap; }
.an-row-progress { flex:1 0 100%; padding-left:20px; min-width:0; }
.an-row-note { font-size:12px; color:var(--text-secondary); margin-top:4px; }
.an-row-actions { margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; }
.an-row-detail { margin-top:8px; padding:8px 10px; border-radius:6px; background:var(--tint-2);
  font-size:11px; line-height:1.5; color:var(--text-secondary); overflow-wrap:anywhere; }

/* ── A run that did not finish ──────────────────────────────────────────── */
.aw-failed h3 { font-size:20px; }
.aw-failed .workspace-eyebrow { color:var(--red); margin-bottom:12px; }
.aw-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.aw-tech { margin-top:20px; font-size:12px; color:var(--text-muted); }
.aw-tech summary { cursor:pointer; width:fit-content; }
.aw-tech summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:3px; }
.aw-tech p { margin:8px 0 0; max-width:60ch; font-size:12px; overflow-wrap:anywhere; }

/* ── What LURK found ────────────────────────────────────────────────────── */
.ar-summary { display:grid; grid-template-columns:minmax(0,1fr) 260px; grid-template-areas:"main next" "more next";
  column-gap:28px; row-gap:0; margin:0 0 28px;
  padding:26px 28px; border:1px solid var(--border-subtle); border-radius:22px;
  background:linear-gradient(125deg,var(--bg-elev-1),var(--bg-base)); }
.ar-main { grid-area:main; }
.ar-more { grid-area:more; }
.ar-main .workspace-eyebrow, .ar-next .workspace-eyebrow { margin-bottom:12px; }
.ar-h { font-size:clamp(20px,2vw,26px); font-weight:650; letter-spacing:-.03em; line-height:1.2; margin:0; }
.ar-found { margin:10px 0 0; font-size:14px; line-height:1.6; color:var(--text-secondary); max-width:62ch; }
.ar-facts { list-style:none; display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 0; padding:0; }
.ar-facts li { padding:5px 11px; border-radius:100px; background:var(--tint-2); font-size:12px;
  color:var(--text-primary); font-variant-numeric:tabular-nums; }
.ar-why { margin:16px 0 0; font-size:13px; line-height:1.65; color:var(--text-secondary); max-width:68ch; }
.ar-why b { color:var(--text-primary); font-weight:600; }
.ar-next { grid-area:next; align-self:start; display:flex; flex-direction:column; align-items:stretch; gap:10px;
  padding-left:28px; border-left:1px solid var(--border-subtle); }
.ar-next .link-btn { align-self:flex-start; margin-top:2px; }

/* The score chip names itself. */
.wr-score-l { font-weight:500; opacity:.72; font-size:11px; }
.wd-score-note { margin-top:10px; }

/* First run on Winners: the three steps to a first result. */
.wn-first { margin:0 0 22px; padding-left:20px; color:var(--text-secondary); font-size:14px; line-height:1.9; }

@media (max-width:900px) {
  .ar-summary { grid-template-columns:minmax(0,1fr); grid-template-areas:"main" "next" "more"; padding:22px; }
  .ar-next { margin-top:20px; padding:20px 0; border-left:0; border-top:1px solid var(--border-subtle);
    border-bottom:1px solid var(--border-subtle); }
}
@media (max-width:600px) {
  .lp { padding:20px; border-radius:18px; }
  .lp-actions { justify-content:flex-start; }
  .ar-summary { padding:18px; border-radius:18px; }
  .aw-actions > .btn { flex:1 1 100%; justify-content:center; }
}
@media (prefers-reduced-motion:reduce) {
  .lp-stage--current .lp-mark { animation:none; border-top-color:var(--text-primary); }
}
