/* Delta View styles — scoped for use inside upload.html or standalone.
   Global resets and topbar removed (host page provides those). */
.btn { padding: 8px 16px; border-radius: 6px; border: none; font-weight: 600; cursor: pointer; font-size: 9pt; transition: all 0.15s; }
.btn-primary { background: #e87722; color: white; }
.btn-primary:hover { background: #d06a1f; }
.btn-secondary { background: #334155; color: #e2e8f0; }
.btn-secondary:hover { background: #475569; }
.btn-success { background: #16a34a; color: white; }
.btn-sm { padding: 4px 10px; font-size: 8pt; }

.stats { display: flex; gap: 16px; padding: 10px 24px; background: #1e293b; border-bottom: 1px solid #334155; flex-wrap: wrap; }
.stat { display: flex; align-items: center; gap: 6px; }
.stat-n { font-size: 16pt; font-weight: 800; }
.stat-l { font-size: 8pt; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; }

.main { display: flex; height: calc(100vh - 100px); }
.nav { width: 220px; background: #1e293b; border-right: 1px solid #334155; overflow-y: auto; flex-shrink: 0; padding-top: 8px; }
.nav-item { padding: 7px 14px; cursor: pointer; border-left: 3px solid transparent; font-size: 9pt; display: flex; align-items: center; justify-content: space-between; }
.nav-item:hover { background: #334155; }
.nav-item.active { border-left-color: #e87722; background: rgba(232,119,34,0.1); color: #e87722; }
.nav-badge { font-size: 7pt; padding: 1px 5px; border-radius: 3px; font-weight: 700; }
.b-update { background: rgba(34,197,94,0.2); color: #4ade80; }
.b-new { background: rgba(232,119,34,0.2); color: #e87722; }
.b-stale { background: rgba(148,163,184,0.2); color: #94a3b8; }
.b-none { background: rgba(100,116,139,0.15); color: #64748b; }

.content { flex: 1; overflow-y: auto; padding: 20px; }

/* Section card */
.sec { background: #1e293b; border: 1px solid #334155; border-radius: 8px; margin-bottom: 14px; overflow: hidden; }
.sec-head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(232,119,34,0.06); border-bottom: 1px solid #334155; }
.sec-num { font-size: 13pt; font-weight: 800; color: #e87722; }
.sec-name { font-size: 11pt; font-weight: 700; flex: 1; }
.sec-body { padding: 12px 14px; }
.sec-narrative { font-size: 9pt; color: #94a3b8; padding: 6px 10px; border-left: 2px solid #475569; margin-bottom: 8px; font-style: italic; }

/* Update row */
.upd { padding: 8px 10px; margin-bottom: 6px; border-radius: 4px; border-left: 3px solid #334155; display: flex; gap: 10px; align-items: flex-start; }
.upd-update { border-left-color: #4ade80; background: rgba(34,197,94,0.04); }
.upd-new { border-left-color: #e87722; background: rgba(232,119,34,0.04); }
.upd-stale { border-left-color: #64748b; background: rgba(100,116,139,0.04); }
.upd-check { margin-top: 2px; accent-color: #e87722; }
.upd-body { flex: 1; }
.upd-num { font-weight: 700; color: #64748b; font-size: 8.5pt; }
.upd-existing { font-size: 8.5pt; color: #64748b; margin-top: 2px; }
.upd-text { font-size: 9.5pt; color: #e2e8f0; margin-top: 3px; padding: 4px 8px; background: rgba(15,23,42,0.5); border-radius: 3px; }
.upd-text[contenteditable]:focus { outline: 1px solid #e87722; background: rgba(232,119,34,0.05); }
.upd-resp { font-size: 8pt; color: #94a3b8; margin-top: 2px; }
.upd-conf { font-size: 7pt; padding: 1px 4px; border-radius: 2px; font-weight: 600; }
.conf-high { background: rgba(34,197,94,0.15); color: #4ade80; }
.conf-med { background: rgba(234,179,8,0.15); color: #facc15; }
.conf-low { background: rgba(239,68,68,0.15); color: #f87171; }

/* Ungrounded entry — content tokens did not intersect the source transcript.
   Visible-failure pattern (Notion AI / Linear "needs review" badge style):
   discrete amber border + warning badge with hover detail. */
.upd--ungrounded { border-left-color: #f59e0b !important; background: rgba(245,158,11,0.06); }
.upd-ungrounded-badge { font-size: 7pt; padding: 1px 5px; border-radius: 2px; font-weight: 700; background: rgba(245,158,11,0.18); color: #fbbf24; cursor: help; letter-spacing: 0.3px; }
.upd-actions { display: flex; gap: 4px; margin-top: 4px; }
.copy-btn { background: none; border: 1px solid #475569; color: #94a3b8; padding: 2px 8px; border-radius: 3px; font-size: 7.5pt; cursor: pointer; }
.copy-btn:hover { border-color: #e87722; color: #e87722; }
.copied { border-color: #4ade80 !important; color: #4ade80 !important; }

/* Decision */
.dec { padding: 6px 10px; margin-top: 6px; border-left: 3px solid #8b5cf6; background: rgba(139,92,246,0.05); border-radius: 0 4px 4px 0; font-size: 9pt; }
.dec-label { font-size: 7.5pt; color: #8b5cf6; font-weight: 700; text-transform: uppercase; }

/* Loading / Setup */
.setup { max-width: 600px; margin: 60px auto; text-align: center; }
.setup h2 { font-size: 16pt; margin-bottom: 12px; }
.setup p { color: #94a3b8; font-size: 10pt; margin-bottom: 20px; }
.drop-zone { border: 2px dashed #475569; border-radius: 8px; padding: 40px; cursor: pointer; transition: all 0.2s; }
.drop-zone:hover { border-color: #e87722; background: rgba(232,119,34,0.05); }
.drop-zone input { display: none; }
.spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid #334155; border-top-color: #e87722; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) { .nav { display: none; } .stats { gap: 8px; } }

/* Mode tabs at top of setup */
.mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #334155;
}
.mode-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: #1e293b;
  color: #94a3b8;
  font-weight: 600;
  font-size: 10pt;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.mode-tab.active {
  background: #e87722;
  color: white;
  font-weight: 700;
}
