/* ATLAS · components/code-block.css
 * Provenance: AuditHunt v3 · Phase 1.4 · amended Phase 8 2026-04-28
 * Spec: §C.10 — Solidity preview, no syntax-color slop, line numbers, hit-line
 *
 * Amendment Phase 8 — replay line states (promoted from findings.html inline):
 *   .line[data-state="active"] — current execution line, ember left-bar + tint
 *   .line[data-state="fired"]  — previously executed (trail), dim background
 *   .line[data-state="hit"]    — static vulnerability hit, crit left-bar
 *   .line.active / .line.fired  — class aliases for JS convenience
 */

.code-block {
  background: var(--ink); border: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 12px; line-height: 1.6;
  color: var(--bone); overflow: auto;
}
.code-block-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: 10px; letter-spacing: 1.6px; color: var(--mute); text-transform: uppercase;
}
.code-block-body {
  display: grid; grid-template-columns: 48px 1fr; padding: 8px 0;
}
.code-block-nums {
  text-align: right; padding-right: 12px; color: var(--faint);
  user-select: none; border-right: 1px solid var(--line);
}
.code-block-nums span { display: block; }
.code-block-lines { padding: 0 14px; white-space: pre; }
.code-block-lines .line { display: block; }
.code-block-lines .line.hit,
.code-block-lines .line[data-state="hit"] {
  background: color-mix(in oklab, var(--sev-crit) 12%, transparent);
  color: var(--bone);
  position: relative;
}
.code-block-lines .line.hit::before,
.code-block-lines .line[data-state="hit"]::before {
  content: ""; position: absolute; left: -14px; top: 0; bottom: 0;
  width: 2px; background: var(--sev-crit);
}

/* Active — current replay line */
.code-block-lines .line.active,
.code-block-lines .line[data-state="active"] {
  background: color-mix(in oklab, var(--ember) 14%, transparent);
  color: var(--bone);
  position: relative;
}
.code-block-lines .line.active::before,
.code-block-lines .line[data-state="active"]::before {
  content: ""; position: absolute; left: -14px; top: 0; bottom: 0;
  width: 2px; background: var(--ember-hi);
}

/* Fired — previously executed trail lines */
.code-block-lines .line.fired,
.code-block-lines .line[data-state="fired"] {
  background: color-mix(in oklab, var(--ember) 5%, transparent);
  color: var(--ash);
}

.code-block-lines .kw  { color: var(--shield-hi); }
.code-block-lines .com { color: var(--mute); font-style: italic; }
.code-block-lines .str { color: var(--verify); }
.code-block-lines .num { color: var(--bronze-hi); }
.code-block-lines .fn  { color: var(--bone); font-style: italic; }
