/* AI 投研页面样式 */

.rs-page-wrap,
.rs-detail-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.rs-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.rs-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand, #7C3AED);
  margin-bottom: 6px;
}

.rs-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-1);
}

.rs-sub {
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 560px;
}

.rs-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.rs-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  background: var(--brand, #7C3AED);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand, #7C3AED) 35%, transparent);
}

.rs-fab-upgrade {
  opacity: .85;
}

.rs-quota {
  font-size: 12px;
  color: var(--text-3);
}

.rs-quota.muted { color: var(--text-3); }

.rs-table-section { margin-top: 8px; }

.rs-table-head {
  margin-bottom: 12px;
}

.rs-table-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}

.rs-table-hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}

.rs-table-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-1, #fff);
}

.rs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rs-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--bg-2, #f9fafb);
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.rs-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  vertical-align: top;
}

.rs-table tr:last-child td { border-bottom: none; }

.rs-col-time { width: 130px; white-space: nowrap; color: var(--text-3); font-size: 13px; vertical-align: top; padding-top: 16px; }

.rs-excerpt-error { color: #dc2626; }

.rs-title-link {
  color: var(--text-1);
  font-weight: 600;
  text-decoration: none;
}

.rs-title-link:hover { color: var(--brand, #7C3AED); }

.rs-excerpt {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.5;
}

.rs-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.rs-badge-done { background: #ecfdf5; color: #059669; }
.rs-badge-pending { background: #fffbeb; color: #d97706; }
.rs-badge-running { background: #eff6ff; color: #2563eb; }
.rs-badge-failed { background: #fef2f2; color: #dc2626; }

.rs-row-pending,
.rs-row-running { background: color-mix(in srgb, var(--brand, #7C3AED) 4%, transparent); }

.rs-progress {
  margin-top: 8px;
  height: 6px;
  background: var(--bg-2, #f3f4f6);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.rs-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand, #7C3AED), #a78bfa);
  border-radius: 999px;
  transition: width .3s ease;
}

.rs-progress-text {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
}

.rs-empty-inner {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-3);
}

.rs-empty-title { font-weight: 600; color: var(--text-2); margin-bottom: 6px; }

.rs-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  font-size: 13px;
}

.rs-page-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-1);
}

.rs-page-info { color: var(--text-3); }

/* Modal */
.rs-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.rs-modal-backdrop[hidden] { display: none; }

.rs-modal {
  width: 100%;
  max-width: 520px;
  background: var(--bg-1, #fff);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.rs-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.rs-modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.rs-modal-lead {
  margin: -8px 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}

.rs-modal-close {
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-3);
}

.rs-field { display: flex; flex-direction: column; gap: 6px; }

.rs-label {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rs-required { color: #e74c3c; }
.rs-counter { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--text-3); }

.rs-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.55;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  min-height: 140px;
  font-family: inherit;
}

.rs-form-hint {
  font-size: 12.5px;
  color: #e74c3c;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fef2f2;
}

.rs-form-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.rs-form-tip { font-size: 12px; color: var(--text-3); }

.rs-btn-primary {
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  background: var(--brand, #7C3AED);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}

.rs-btn-ghost {
  display: inline-block;
  margin-left: 10px;
  padding: 9px 18px;
  color: var(--text-2);
  text-decoration: none;
}

.rs-upgrade-box {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}

/* Detail page */
.rs-detail-actions { margin-bottom: 16px; }

.rs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
}

.rs-article {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  background: var(--bg-1, #fff);
}

.rs-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 12px;
}

.rs-article-head {
  margin-bottom: 28px;
}

.rs-article-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--text-1);
}

.rs-article-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-1);
}

.rs-article-body h2 {
  font-size: 18px;
  margin: 28px 0 12px;
}

.rs-article-body h3 {
  font-size: 16px;
  margin: 20px 0 10px;
}

.rs-article-body p { margin: 0 0 14px; }
.rs-article-body ul, .rs-article-body ol { margin: 0 0 14px; padding-left: 1.4em; }
.rs-article-body li { margin-bottom: 6px; }

.rs-article-foot {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.rs-question-source summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-3);
}

.rs-question-source p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

.rs-disclaimer {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .rs-hero { flex-direction: column; }
  .rs-hero-actions { align-items: flex-start; }
  .rs-col-time { width: 88px; font-size: 12px; padding-top: 14px; }
  .rs-article { padding: 20px 16px; }
  .rs-article-title { font-size: 22px; }
}
