/* Verification Component Styles: Trace Timeline, Evidence & Verification */

.trace-content {
  padding: 18px 22px 24px;
}
.trace-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.trace-intro strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-heading);
  display: block;
}
.step-count {
  font-size: 12px;
  color: var(--muted);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 13px;
  width: 2px;
  background: var(--line);
}

.step {
  position: relative;
  padding-left: 36px;
  margin-bottom: 16px;
}
.step:last-child {
  margin-bottom: 0;
}

.step-icon {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  z-index: 2;
}
.step-icon svg {
  width: 12px;
  height: 12px;
}
.step.completed .step-icon {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}
.step.verified .step-icon {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}
.step.warning .step-icon {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
}
.step.active .step-icon {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.step.failed .step-icon {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

.step-head {
  display: flex;
  align-items: center;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 2px 0;
  text-align: left;
  cursor: pointer;
  gap: 8px;
}
.step-head:disabled {
  cursor: default;
}
.step-name {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-heading);
  font-family: var(--font-display);
}
.step.waiting .step-name {
  color: var(--muted);
}
.step-time {
  margin-left: auto;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--muted);
}
.step-chevron {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 180ms ease;
}
.step-head[aria-expanded="true"] .step-chevron {
  transform: rotate(180deg);
}

.step-brief {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.step-body {
  margin-top: 8px;
  padding: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
  animation: detail-enter 180ms var(--ease);
}
.step-body .tool-code {
  display: inline-block;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--accent);
  margin-bottom: 6px;
}
[data-theme="dark"] .step-body .tool-code {
  background: rgba(255, 255, 255, 0.08);
}

/* Evidence Cards */
.evidence-content {
  padding: 18px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.evidence-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.evidence-card h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.evidence-card h4 svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.evidence-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* Verification State Card */
.verification-card {
  padding: 18px 22px 24px;
}
.verification-status-banner {
  padding: 16px;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.verification-status-banner.verified {
  background: var(--green-soft);
  border: 1px solid #86efac;
  color: #166534;
}
[data-theme="dark"] .verification-status-banner.verified {
  background: #062817;
  border-color: #14532d;
  color: #86efac;
}
.verification-status-banner svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
.verification-status-banner strong {
  font-size: 14px;
  display: block;
  font-family: var(--font-display);
}
.verification-status-banner p {
  margin: 4px 0 0;
  font-size: 12.5px;
  opacity: 0.9;
}

/* Step Tool Header & Telemetry Pre Blocks */
.step-tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.tool-status-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.tool-status-tag.completed, .tool-status-tag.verified { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.tool-status-tag.warning { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.tool-status-tag.failed { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.tool-status-tag.active { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }

.telemetry-code-block {
  margin: 6px 0 0;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Evidence Card Enhancements */
.evidence-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.evidence-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.evidence-pill {
  font-size: 11px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--muted);
}
.evidence-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.evidence-meta-grid div span {
  font-size: 10.5px;
  color: var(--muted);
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.evidence-meta-grid div strong {
  font-size: 12px;
  color: var(--ink-heading);
}

/* Zero-Trust Parity Matrix */
.parity-matrix-section {
  margin-top: 16px;
}
.parity-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.parity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}
.parity-table th {
  background: var(--surface-subtle);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}
.parity-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.parity-table tr:last-child td {
  border-bottom: none;
}
.parity-table td code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}

.live-pulse {
  animation: pulse-ring 1.8s infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
