/**
 * page-writer/index.html — Page-specific styles
 * Extracted from inline <style> blocks.
 * Generic components use shared/styles/components.css.
 */

/* ── Wizard Bar ──────────────────────────────────────── */
.wizard-bar {
  display: flex;
  align-items: center;
  max-width: 880px;
  margin: 0 auto 28px;
  padding: 0;
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  cursor: default;
  transition: color 0.2s;
}
.ws-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-secondary);
  border: 2px solid var(--border-input);
  color: var(--text-dim);
  flex-shrink: 0;
  transition: all 0.25s;
}
.wizard-step.active .ws-num {
  background: var(--accent-info);
  border-color: var(--accent-info);
  color: #fff;
}
.wizard-step.active {
  color: var(--text-primary);
}
.wizard-step.done .ws-num {
  background: var(--accent-success);
  border-color: var(--accent-success);
  color: #fff;
}
.wizard-step.done {
  color: var(--accent-success);
  cursor: pointer;
}
.ws-connector {
  flex: 1;
  height: 2px;
  background: var(--border-secondary);
  margin: 0 10px;
  transition: background 0.3s;
}
.ws-connector.done {
  background: var(--accent-success);
}
@media (max-width: 700px) {
  .wizard-step span:not(.ws-num) {
    display: none;
  }
  .ws-connector {
    margin: 0 4px;
  }
}

/* ── Panels ──────────────────────────────────────────── */
.wizard-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}
.wizard-panel.active {
  display: block;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Input Layout (two-column) ───────────────────────── */
.input-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}
@media (max-width: 860px) {
  .input-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Stage Card ──────────────────────────────────────── */
.stage-card {
  max-width: 880px;
  margin: 0 auto;
  border-top: 3px solid var(--accent-info);
}
.stage-card.seo {
  border-top-color: #3b82f6;
}
.stage-card.humanize {
  border-top-color: #a855f7;
}
.stage-card.eeat {
  border-top-color: #f59e0b;
}
.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-primary);
}
.stage-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}
.stage-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  max-width: 560px;
}
.stage-badge {
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 9999px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.stage-badge.seo {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}
.stage-badge.humanize {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
}
.stage-badge.eeat {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}
.stage-input-info {
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stage-input-info strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Stage States ────────────────────────────────────── */
.stage-pending {
  text-align: center;
  padding: 32px 0;
}
.stage-pending p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.stage-running {
  text-align: center;
  padding: 40px 0;
}
.stage-running p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 16px;
}
.stage-error {
  padding: 16px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--border-radius);
  margin-top: 12px;
}
.stage-error .err-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-danger);
  margin-bottom: 6px;
}
.stage-error .err-detail {
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--text-dim);
  background: var(--bg-primary);
  padding: 10px;
  border-radius: 4px;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 8px;
}

/* ── Spinner ──────────────────────────────────────────── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-secondary);
  border-top-color: var(--accent-info);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ── Result Tabs ─────────────────────────────────────── */
.result-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-secondary);
  margin-bottom: 0;
}
.result-tab {
  padding: 8px 18px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.result-tab:hover {
  color: var(--text-secondary);
}
.result-tab.active {
  color: var(--accent-info);
  border-bottom-color: var(--accent-info);
}
.result-view {
  display: none;
}
.result-view.active {
  display: block;
}

/* ── Block Renderer ──────────────────────────────────── */
.blocks-preview {
  padding: 16px 0;
  max-height: 480px;
  overflow-y: auto;
}
.block-item {
  padding: 10px 14px;
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  margin-bottom: 8px;
  position: relative;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.block-type-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent-info);
  margin-bottom: 6px;
}
.block-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.block-heading {
  margin: 0;
  color: var(--text-primary);
}
h1.block-heading {
  font-size: 1.1rem;
}
h2.block-heading {
  font-size: 0.95rem;
}
h3.block-heading {
  font-size: 0.88rem;
}
.block-paragraph {
  margin: 0;
}
.block-list {
  margin: 4px 0 0 18px;
  padding: 0;
}
.block-list li {
  margin-bottom: 3px;
}
.block-faq-q {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.82rem;
  margin-bottom: 2px;
}
.block-faq-a {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Block Editing ──────────────────────────────────────── */
.block-item-editable:hover {
  border-color: var(--border-hover);
}
.block-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.block-item-editable:hover .block-actions,
.block-source-box.block-item-editable:hover .block-actions {
  opacity: 1;
}
.block-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  padding: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-input);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-size: 0.7rem;
}
.block-action-btn:hover {
  color: var(--accent-info);
  border-color: var(--accent-info);
  background: rgba(59, 130, 246, 0.08);
}
.block-action-btn.active {
  color: var(--accent-info);
  border-color: var(--accent-info);
}
.block-item.editing {
  border-color: var(--accent-info);
  background: rgba(59, 130, 246, 0.03);
}
.block-source-box.editing {
  border: 1px solid var(--accent-info);
  background: rgba(59, 130, 246, 0.03);
}
.block-item [contenteditable='true'],
.block-source-box [contenteditable='true'] {
  outline: none;
  min-height: 1.2em;
  border-bottom: 1px dashed rgba(59, 130, 246, 0.3);
  padding-bottom: 1px;
}
.block-item [contenteditable='true']:focus,
.block-source-box [contenteditable='true']:focus {
  border-bottom-color: var(--accent-info);
}

/* ── Block Rewrite Panel ────────────────────────────────── */
.block-rewrite-panel {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  display: none;
}
.block-rewrite-panel.open {
  display: block;
  animation: fadeIn 0.2s ease;
}
.block-rewrite-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.block-rewrite-input {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.78rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-input);
  border-radius: 6px;
  resize: none;
  min-height: 36px;
  max-height: 80px;
  line-height: 1.4;
  font-family: inherit;
}
.block-rewrite-input:focus {
  outline: none;
  border-color: var(--accent-info);
}
.block-rewrite-submit {
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--accent-info);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.block-rewrite-submit:hover {
  opacity: 0.9;
}
.block-rewrite-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.block-rewrite-hint {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 6px;
}
.block-saving {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}
.block-saving::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--border-secondary);
  border-top-color: var(--accent-info);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Variation Cards ────────────────────────────────────── */
.block-variations {
  margin-top: 10px;
}
.block-variations:empty {
  display: none;
}
.vars-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vars-title::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--border-secondary);
}
.var-card {
  padding: 10px 12px;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.var-card:hover {
  border-color: var(--accent-info);
  background: rgba(59, 130, 246, 0.04);
}
.var-card-body {
  flex: 1;
  min-width: 0;
}
.var-approach {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-info);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.var-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.var-use-btn {
  padding: 5px 14px;
  font-size: 0.7rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--accent-info);
  color: var(--accent-info);
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
  align-self: center;
}
.var-use-btn:hover {
  background: var(--accent-info);
  color: #fff;
}

.block-source-box {
  padding: 12px 14px;
  background: var(--bg-secondary);
  border-radius: 6px;
  margin-bottom: 12px;
}
.block-source-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}
.block-source-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
  font-style: italic;
}

/* ── JSON Editor ─────────────────────────────────────── */
.json-editor {
  width: 100%;
  min-height: 360px;
  max-height: 480px;
  padding: 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-input);
  border-radius: var(--border-radius-sm);
  resize: vertical;
  line-height: 1.5;
  tab-size: 2;
}
.json-editor:focus {
  outline: none;
  border-color: var(--accent-info);
}

/* ── Stage Footer ────────────────────────────────────── */
.stage-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  margin-top: 20px;
  border-top: 1px solid var(--border-primary);
}
.btn-outline {
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-input);
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

/* ── Result Status ───────────────────────────────────── */
.result-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 16px;
  font-size: 0.8rem;
  font-weight: 500;
}
.result-status.success {
  background: rgba(34, 197, 94, 0.06);
  color: var(--accent-success);
  border: 1px solid rgba(34, 197, 94, 0.15);
}
.result-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.green {
  background: #22c55e;
}

/* ── Done Panel ──────────────────────────────────────── */
.done-card {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 24px;
}
.done-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.done-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.done-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.done-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.done-actions button {
  padding: 10px 24px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  border: none;
}
.btn-dl {
  background: var(--accent-success);
  color: #fff;
}
.btn-dl:hover {
  opacity: 0.9;
}
.btn-pv {
  background: transparent;
  border: 1px solid var(--border-input) !important;
  color: var(--text-muted);
}
.btn-pv:hover {
  border-color: var(--border-hover) !important;
  color: var(--text-secondary);
}
.btn-restart {
  background: transparent;
  border: 1px solid var(--border-input) !important;
  color: var(--text-muted);
}
.stage-summary {
  max-width: 500px;
  margin: 0 auto 24px;
  text-align: left;
}
.stage-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border-primary);
}
.stage-summary-row .ss-label {
  color: var(--text-muted);
}
.stage-summary-row .ss-value {
  color: var(--accent-success);
  font-weight: 500;
}

/* ── Source card (reused from original) ───────────────── */
.source-card {
  border: 1px solid var(--border-secondary);
  border-radius: var(--border-radius);
  background: var(--bg-secondary);
  margin-bottom: 12px;
  overflow: hidden;
}
.source-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: default;
}
.source-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
}
.source-card-icon.sot {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.source-card-info {
  flex: 1;
  min-width: 0;
}
.source-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.source-card-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.source-card-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.red {
  background: #ef4444;
}
.dot.yellow {
  background: #eab308;
}
.source-card-body {
  padding: 0 16px 14px;
}

/* ── Source tabs ──────────────────────────────────────── */
.source-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
}
.source-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-input);
  cursor: pointer;
  color: var(--text-muted);
  background: var(--bg-secondary);
  transition: all 0.2s;
}
.source-tab:first-child {
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}
.source-tab:last-child {
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}
.source-tab.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* ── Browse / Refresh ────────────────────────────────── */
.refresh-btn {
  background: none;
  border: 1px solid var(--border-input);
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.refresh-btn:hover {
  color: var(--accent-info);
  border-color: var(--accent-info);
}
.refresh-btn.spinning svg {
  animation: spin 0.8s linear infinite;
}
.report-detail-panel {
  display: none;
  margin-top: 12px;
  padding: 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--border-radius);
  max-height: 360px;
  overflow-y: auto;
}
.report-detail-panel.open {
  display: block;
}
.report-detail-panel .panel-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.report-table th {
  text-align: left;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-secondary);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.report-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-primary);
  color: var(--text-secondary);
  vertical-align: middle;
}
.report-table tr:last-child td {
  border-bottom: none;
}
.report-name {
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
}
.report-name a {
  color: var(--accent-info);
  text-decoration: none;
}
.report-name a:hover {
  text-decoration: underline;
}
.report-stat {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.report-run-group {
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 8px 10px 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.report-run-group .run-date {
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
}
.report-run-group .run-file-count {
  margin-left: auto;
  font-weight: 400;
  text-transform: none;
}
.report-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-dim);
  font-size: 0.82rem;
}
.btn-use-file {
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid var(--accent-info);
  border-radius: var(--border-radius-sm);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-info);
  cursor: pointer;
  white-space: nowrap;
}
.btn-use-file:hover {
  background: rgba(59, 130, 246, 0.2);
}
.btn-use-file.selected {
  background: var(--accent-info);
  color: #fff;
  border-color: var(--accent-info);
}

/* ── Upload zone ─────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-input);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-secondary);
}
.upload-zone:hover {
  border-color: var(--accent-info);
  background: rgba(59, 130, 246, 0.05);
}
.upload-zone.dragover {
  border-color: var(--accent-info);
  background: rgba(59, 130, 246, 0.08);
}
.upload-zone input[type='file'] {
  display: none;
}
.upload-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  color: var(--text-dim);
  opacity: 0.5;
}
.upload-zone p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.upload-zone .upload-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── File preview ────────────────────────────────────── */
.file-preview {
  display: none;
  margin-top: 12px;
}
.file-preview.active {
  display: block;
}
.file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--border-radius-sm);
}
.file-info .file-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
  word-break: break-all;
}
.file-info .file-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.file-info .btn-remove {
  padding: 4px 12px;
  font-size: 0.75rem;
  border: 1px solid var(--border-input);
  border-radius: var(--border-radius-sm);
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.file-info .btn-remove:hover {
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--border-radius-lg);
  padding: 20px;
}
.sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.sidebar-divider {
  height: 1px;
  background: var(--border-primary);
  margin: 16px 0;
}
.pipeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pipeline li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.pipe-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
}
.pipe-label strong {
  color: var(--text-secondary);
  font-weight: 500;
}
.pipe-label small {
  display: block;
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Preview modal ───────────────────────────────────── */
.preview-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.preview-overlay.active {
  display: flex;
}
.preview-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  width: 90%;
  max-width: 720px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.preview-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-dim);
  background: none;
  border: none;
}
.preview-modal-close:hover {
  color: var(--text-primary);
}
.preview-content {
  font-family: monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-secondary);
  margin-top: 12px;
}

.form-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 4px;
}
