/* Research ads — the paper → ad screen. Follows the same spacing/radius
   tokens as the other view stylesheets; nothing here restyles the shell. */

.ra-new,
.ra-list,
.ra-next,
.ra-gate,
.ra-findings {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.ra-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.ra-entry-input,
.ra-video-note {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-sunken);
  color: var(--text);
  margin-bottom: 12px;
}

.ra-list-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ra-list-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.ra-list-item:hover {
  border-color: var(--primary);
}

.ra-list-status {
  font-size: 0.9em;
  color: var(--text-muted);
}

.ra-run-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.ra-run-status {
  margin: 0;
  font-weight: 600;
}

.ra-notice {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  color: var(--text);
}

.ra-idea {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

/* The candidate papers. One tick per paper, nothing pre-ticked. */
.ra-paper-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.ra-paper {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}

.ra-paper-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.ra-paper-tick {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--primary);
  cursor: pointer;
}

.ra-paper-body {
  display: block;
  min-width: 0;
}

.ra-paper-title {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.ra-paper-meta {
  display: block;
  font-size: 0.85em;
  color: var(--text-muted);
  margin-top: 2px;
}

.ra-paper-abstract {
  margin: 6px 0 0;
  color: var(--text);
  line-height: 1.5;
}

.ra-paper-more {
  margin-top: 6px;
}

/* The research summary: editable at its gate, read-only once approved. */
.ra-review-read {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  color: var(--text);
  font: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* Download is a link, so it needs the button shape spelled out. */
.ra-gate-actions a.btn,
.ra-findings a.btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.ra-idea-text,
.ra-review-text,
.ra-script-text {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-sunken);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  margin-bottom: 8px;
  resize: vertical;
}

.ra-cites {
  font-size: 0.85em;
  color: var(--text-muted);
}

.ra-player {
  width: 100%;
  max-width: 480px;
  border-radius: 10px;
  background: #000;
  margin-bottom: 12px;
}

.ra-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Saves are visible: green when the server confirmed it, loud red when it
   did not. Human-typed words never disappear quietly. */
.ra-save-ok {
  color: var(--success-ink);
  margin: 8px 0 0;
}

.ra-save-bad {
  color: var(--danger-ink);
  font-weight: 600;
  margin: 8px 0 0;
}
