/* Hypothesis Detail Page - Dark Industrial */

.hypothesis-detail {
  max-width: 900px;
  margin: 0 auto;
}

/* Success message (after submission) */
.success-message {
  background: var(--surface-2);
  border-left: 3px solid var(--accent-primary);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.success-message p {
  margin: 0;
  color: var(--text-primary);
}

/* ========================================
   Header Section
   ======================================== */

.hypothesis-header {
  margin-bottom: 2rem;
}

.hypothesis-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  margin-bottom: 1rem;
  word-wrap: break-word;
}

.hypothesis-title .variant {
  color: var(--accent-primary);
}

.hypothesis-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hypothesis-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ========================================
   Status Badge
   ======================================== */

.status-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  border: 1px solid;
}

.status-badge--submitted {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-secondary);
}

.status-badge--validating {
  background: rgba(212, 168, 0, 0.15);
  border-color: #d4a800;
  color: #d4a800;
  animation: pulse 2s ease-in-out infinite;
}

.status-badge--validated {
  background: rgba(0, 170, 234, 0.15);
  border-color: #00aaEA;
  color: #00aaEA;
}

.status-badge--rejected {
  background: rgba(255, 68, 102, 0.15);
  border-color: #ff4466;
  color: #ff4466;
}

.status-badge--queued {
  background: rgba(249, 115, 22, 0.15);
  border-color: #f97316;
  color: #f97316;
}

.status-badge--folding {
  background: rgba(0, 170, 234, 0.15);
  border-color: #00aaEA;
  color: #00aaEA;
  animation: pulse 2s ease-in-out infinite;
}

.status-badge--complete {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #10b981;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ========================================
   Sections
   ======================================== */

.hypothesis-section {
  margin-bottom: 2.5rem;
}

.hypothesis-section h2 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.section-intro {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0 0 1.25rem 0;
  line-height: 1.6;
}

.rationale-text {
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--text-primary);
  border-radius: 4px;
}

/* ========================================
   Result Cards Grid
   ======================================== */

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.result-card {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: opacity 0.3s ease;
}

.result-card[data-status="pending"] {
  opacity: 0.7;
}

.result-card[data-status="complete"] {
  opacity: 1;
}

.result-card[data-status="found"] {
  border-left: 3px solid var(--accent-primary);
}

.result-card[data-status="not-found"] {
  border-left: 3px solid var(--border);
}

.result-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.result-card__db {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

.result-card__status {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.result-card__body {
  font-size: 0.8125rem;
  line-height: 1.7;
}

.result-card__body p {
  margin: 0 0 0.5rem 0;
}

.result-card__body p:last-child {
  margin-bottom: 0;
}

.result-card__body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.result-card__empty {
  color: var(--text-secondary);
  font-style: italic;
}

/* ========================================
   Outcome Banners
   ======================================== */

.outcome {
  border-left: 4px solid;
  padding: 1.5rem 2rem;
  background: var(--surface-1);
  border-radius: 4px;
}

.outcome h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.outcome p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.outcome--pass {
  border-left-color: var(--confidence-high);
}

.outcome--pass h3 {
  color: var(--confidence-high);
}

.outcome--reject {
  border-left-color: var(--confidence-low);
}

.outcome--reject h3 {
  color: var(--confidence-low);
}

/* ========================================
   Reward Section
   ======================================== */

.reward-section {
  background: var(--surface-2);
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
}

.reward-section h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--accent-primary);
}

.reward-section p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.reward-section a {
  color: var(--accent-primary);
  text-decoration: underline;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.reward-section a:hover {
  color: var(--accent-secondary);
}

.reward-section--pending {
  border-color: var(--border);
  background: var(--surface-1);
}

.reward-section--pending h3 {
  color: var(--text-primary);
}

/* ========================================
   Tracking Token Notice
   ======================================== */

.tracking-token-notice {
  background: var(--surface-2);
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  padding: 1.5rem;
}

.tracking-token-notice h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--accent-primary);
}

.tracking-token-notice p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.tracking-token {
  display: block;
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-primary);
  border-radius: 4px;
  word-break: break-all;
  user-select: all;
}

.token-warning {
  font-size: 0.8125rem;
  color: #999;
  margin-top: 0.5rem;
}

/* ========================================
   Fold Link Section
   ======================================== */

.fold-link-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--confidence-high);
  border-radius: 4px;
  padding: 1.5rem;
}

.fold-link-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--confidence-high);
}

.fold-link-section p {
  margin: 0.5rem 0 1rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.fold-link-button {
  display: inline-flex;
  align-items: center;
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: 0.625rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s ease;
}

.fold-link-button:hover {
  background: var(--accent-secondary);
}

.fold-pending {
  color: #999;
  font-style: italic;
  font-size: 0.875rem;
}

/* ========================================
   Fold Preview Card
   ======================================== */

.fold-preview__card {
  padding: 1.5rem;
}

.fold-preview__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.fold-preview__protein {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.fold-preview__confidence {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  border: 1px solid;
}

.confidence--high {
  background: rgba(76, 175, 80, 0.15);
  border-color: var(--confidence-high);
  color: var(--confidence-high);
}

.confidence--medium {
  background: rgba(212, 168, 0, 0.15);
  border-color: #d4a800;
  color: #d4a800;
}

.confidence--low {
  background: rgba(255, 68, 102, 0.15);
  border-color: var(--confidence-low);
  color: var(--confidence-low);
}

.fold-preview__date {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
}

/* ========================================
   Pipeline Timeline Timestamps
   ======================================== */

/* Time display below label for timeline stages */
.pipeline__time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

/* ========================================
   Activity Log
   ======================================== */

.activity-log {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 600px;
  overflow-y: auto;
}

.activity-log__item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface-1);
  border-left: 2px solid var(--border);
}

.activity-log__time {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  min-width: 140px;
}

.activity-log__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.activity-log__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.activity-log__summary {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.activity-log__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.activity-log__badge--literature {
  background: rgba(74, 144, 217, 0.2);
  color: #4a90d9;
}

.activity-log__badge--clinical {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.activity-log__badge--structural {
  background: rgba(155, 89, 182, 0.2);
  color: #9b59b6;
}

.activity-log__badge--synthesis {
  background: rgba(230, 126, 34, 0.2);
  color: #e67e22;
}

/* ========================================
   Agent Votes Section
   ======================================== */

/* Colored proportional bar */
.vote-bar {
  display: flex;
  width: 100%;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: var(--surface-2);
}

.vote-bar__segment {
  transition: width 0.3s ease;
  min-width: 0;
}

.vote-bar__segment--support {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.vote-bar__segment--neutral {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.vote-bar__segment--oppose {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Vote legend */
.vote-legend {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.vote-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vote-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vote-legend__dot--support { background: #10b981; }
.vote-legend__dot--neutral { background: #6b7280; }
.vote-legend__dot--oppose { background: #ef4444; }

/* Vote cards */
.vote-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vote-card {
  padding: 1rem 1.25rem;
}

.vote-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.vote-card__agent {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.vote-card__badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.vote-card__direction {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  border: 1px solid;
}

.vote-card__direction--support {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #10b981;
}

.vote-card__direction--neutral {
  background: rgba(107, 114, 128, 0.15);
  border-color: #6b7280;
  color: #9ca3af;
}

.vote-card__direction--oppose {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

/* Confidence badges (optional) */
.vote-card__confidence {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid;
}

.vote-card__confidence--high {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
  color: #4caf50;
}

.vote-card__confidence--medium {
  background: rgba(212, 168, 0, 0.1);
  border-color: rgba(212, 168, 0, 0.3);
  color: #d4a800;
}

.vote-card__confidence--low {
  background: rgba(255, 68, 102, 0.1);
  border-color: rgba(255, 68, 102, 0.3);
  color: #ff4466;
}

/* Expandable reasoning */
.vote-card__reasoning {
  margin: 0.5rem 0;
}

.vote-card__reasoning summary {
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--accent-primary);
  font-weight: 500;
  user-select: none;
}

.vote-card__reasoning summary:hover {
  color: var(--accent-secondary);
}

.vote-card__reasoning p {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
}

/* Timestamp */
.vote-card__time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

/* Empty state */
.vote-empty {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
}

.vote-empty p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hypothesis-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .activity-log__item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .activity-log__time {
    min-width: auto;
  }

  .vote-legend {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .vote-card__header {
    flex-direction: column;
    align-items: flex-start;
  }
}
