/* ActBook Studio — Core UI Primitives (RTL/LTR Logical Properties) */
.ab-step-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  list-style: none;
  margin: 0;
}

.ab-step-item {
  flex: 1 1 135px;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: var(--touch-min);
  padding-inline: 0.75rem;
  padding-block: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-align: start;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
}

.ab-step-item:hover:not(:disabled) {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
}

.ab-step-item[data-state="active"] {
  background: var(--accent-primary-subtle);
  border-color: var(--accent-primary-border);
  color: var(--accent-primary);
  font-weight: 700;
}

.ab-step-item[data-state="done"] {
  color: var(--text-primary);
}

.ab-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ab-step-item[data-state="active"] .ab-step-index {
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.ab-step-item[data-state="done"] .ab-step-index {
  background: var(--status-verified-bg);
  color: var(--status-verified);
  border: 1px solid var(--status-verified-border);
}

.ab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-min);
  padding-inline: 1.125rem;
  padding-block: 0.625rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.ab-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ab-btn-primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.ab-btn-primary:hover:not(:disabled) {
  background: var(--accent-primary-hover);
}

.ab-btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.ab-btn-secondary:hover:not(:disabled) {
  background: var(--bg-surface-subtle);
}

.ab-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding-inline: 0.625rem;
  padding-block: 0.25rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
}

.ab-badge[data-tone="verified"] {
  background: var(--status-verified-bg);
  border-color: var(--status-verified-border);
  color: var(--status-verified);
}

.ab-badge[data-tone="gate"] {
  background: var(--status-gate-bg);
  border-color: var(--status-gate-border);
  color: var(--status-gate);
}

.ab-metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 1rem 1.125rem;
  box-shadow: var(--shadow-card);
}

.ab-metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ab-metric-value {
  margin-block-start: 0.25rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
