/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES - THEME SYSTEM
   ═══════════════════════════════════════════════════════════════ */

/* Cream Theme (Default - Light) */
:root, [data-theme="cream"] {
  --bg: #fdfbf7;
  --bg-alt: #f8f5f0;
  --surface: #ffffff;
  --panel: #ffffff;
  --ink: #1a1a1a;
  --ink-secondary: #4a4a4a;
  --ink-muted: #7a7a7a;
  --line: #e5e0d8;
  --line-soft: #f0ebe3;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --success: #059669;
  --gold: #d97706;
  --danger: #dc2626;
  --orange: #f97316;
}

/* Ocean Breeze Theme (Light) */
[data-theme="ocean"] {
  --bg: #f0f9ff;
  --bg-alt: #e0f2fe;
  --surface: #ffffff;
  --panel: #ffffff;
  --ink: #0c4a6e;
  --ink-secondary: #075985;
  --ink-muted: #0369a1;
  --line: #bae6fd;
  --line-soft: #e0f2fe;
}

/* Tanzanite Theme (Dark) */
[data-theme="tanzanite"] {
  --bg: #0f0d1a;
  --bg-alt: #1a1625;
  --surface: #252136;
  --panel: #1e1a2e;
  --ink: #e8e4f0;
  --ink-secondary: #c4bdd4;
  --ink-muted: #8b82a8;
  --line: #3d3654;
  --line-soft: #2a2440;
}

/* Midnight Theme (Dark) */
[data-theme="midnight"] {
  --bg: #0a0e1a;
  --bg-alt: #111827;
  --surface: #1f2937;
  --panel: #1a2332;
  --ink: #f1f5f9;
  --ink-secondary: #cbd5e1;
  --ink-muted: #64748b;
  --line: #334155;
  --line-soft: #1e293b;
}

/* Obsidian Theme (Dark) */
[data-theme="obsidian"] {
  --bg: #09090b;
  --bg-alt: #18181b;
  --surface: #27272a;
  --panel: #1c1c1f;
  --ink: #fafafa;
  --ink-secondary: #d4d4d8;
  --ink-muted: #71717a;
  --line: #3f3f46;
  --line-soft: #27272a;
}

/* ═══════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER & BRANDING
   ═══════════════════════════════════════════════════════════════ */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: white;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.brand-tagline {
  font-size: 11px;
  color: var(--ink-muted);
}

.header-actions {
  display: flex;
  gap: 12px;
}

.settings-btn {
  padding: 8px 16px;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-btn:hover {
  background: var(--line);
}

/* ═══════════════════════════════════════════════════════════════
   INPUT SCREEN
   ═══════════════════════════════════════════════════════════════ */

.input-screen {
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.input-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: var(--ink);
}

.input-subtitle {
  font-size: 14px;
  text-align: center;
  color: var(--ink-muted);
  margin-bottom: 32px;
}

.input-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 8px;
  display: block;
}

.transcript-input {
  width: 100%;
  min-height: 300px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  background: var(--bg-alt);
  color: var(--ink);
}

.transcript-input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.transcript-input::placeholder {
  color: var(--ink-muted);
}

.context-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  background: var(--bg-alt);
  color: var(--ink);
  margin-top: 16px;
}

.analyze-btn {
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.analyze-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}

.analyze-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   LOADING OVERLAY
   ═══════════════════════════════════════════════════════════════ */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(253, 251, 247, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 24px;
  backdrop-filter: blur(8px);
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: white;
  font-size: 18px;
  font-weight: 600;
}

.loading-subtext {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.loading-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 14px;
}

.loading-stage-icon {
  font-size: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   RESULTS SCREEN
   ═══════════════════════════════════════════════════════════════ */

.results-screen {
  display: none;
}

.results-screen.active {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   TAB NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

.tab-nav {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: var(--surface);
  border-radius: 12px;
  margin: 20px auto;
  max-width: 500px;
  border: 1px solid var(--line);
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab-btn:hover {
  background: var(--line-soft);
  color: var(--ink-secondary);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--blue-500), var(--cyan));
  color: white;
}

.tab-btn.active.oracle {
  background: linear-gradient(135deg, var(--orange), var(--gold));
}

.tab-btn.active.team {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
}

.tab-btn.active.record {
  background: linear-gradient(135deg, var(--success), var(--teal));
}

/* ═══════════════════════════════════════════════════════════════
   TAB CONTENT CONTAINERS
   ═══════════════════════════════════════════════════════════════ */

.tab-content {
  display: none;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.tab-content.active {
  display: block;
}

/* Tab Headers */
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.tab-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

.tab-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.tab-badge.oracle {
  background: linear-gradient(135deg, var(--orange), var(--gold));
}

.tab-badge.oracle.work-safe {
  background: linear-gradient(135deg, #10b981, #059669);
}

.tab-badge.team {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
}

.tab-badge.record {
  background: linear-gradient(135deg, var(--success), var(--teal));
}

/* ═══════════════════════════════════════════════════════════════
   SECTION STYLES
   ═══════════════════════════════════════════════════════════════ */

.section {
  margin-bottom: 28px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-icon {
  font-size: 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.section-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan));
  color: white;
}

/* ═══════════════════════════════════════════════════════════════
   SIGNALBOARD (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

.signalboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.signal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.signal-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.signal-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.signal-sublabel {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.signal-status {
  font-size: 16px;
  margin-top: 4px;
}

/* Signal card risk highlight */
.signal-card.risk {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), transparent);
}

/* Pulse Animation for Signal Cards */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
  50% { box-shadow: 0 0 15px 3px rgba(59, 130, 246, 0.2); }
}

.signal-card.pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

.signal-card.pulse.positive {
  animation-name: pulse-glow-green;
}

@keyframes pulse-glow-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
  50% { box-shadow: 0 0 15px 3px rgba(5, 150, 105, 0.2); }
}

.signal-card.pulse.warning {
  animation-name: pulse-glow-orange;
}

@keyframes pulse-glow-orange {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
  50% { box-shadow: 0 0 15px 3px rgba(217, 119, 6, 0.2); }
}

.signal-card.pulse.danger {
  animation-name: pulse-glow-red;
}

@keyframes pulse-glow-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
  50% { box-shadow: 0 0 15px 3px rgba(220, 38, 38, 0.25); }
}

/* ═══════════════════════════════════════════════════════════════
   SIGNALBOARD - GROUPED VIEW (3 Primary Metrics)
   ═══════════════════════════════════════════════════════════════ */

.signalboard-primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.signal-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.signal-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.signal-group-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.signal-group-status {
  font-size: 18px;
  margin-bottom: 8px;
}

.signal-group-sub {
  font-size: 11px;
  color: var(--ink-muted);
}

/* Group color accents */
.signal-group.deal-health {
  border-top: 3px solid var(--blue-500);
}

.signal-group.relationship {
  border-top: 3px solid var(--success);
}

.signal-group.risk {
  border-top: 3px solid var(--orange);
}

/* Expand details */
.signalboard-details {
  margin-top: 8px;
}

.signalboard-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-muted);
  list-style: none;
  user-select: none;
}

.signalboard-expand::-webkit-details-marker {
  display: none;
}

.signalboard-expand:hover {
  background: var(--line-soft);
}

.expand-arrow {
  font-size: 10px;
  transition: transform 0.2s;
}

.signalboard-details[open] .expand-arrow {
  transform: rotate(180deg);
}

.signalboard-details[open] .signalboard-expand {
  border-radius: 8px 8px 0 0;
}

.signalboard-details .signalboard {
  border-radius: 0 0 8px 8px;
  border: 1px solid var(--line-soft);
  border-top: none;
  padding: 16px;
  background: var(--bg-alt);
}

/* Mobile responsive */
@media (max-width: 600px) {
  .signalboard-primary {
    grid-template-columns: 1fr;
  }
  
  .signal-group-value {
    font-size: 28px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   VERDICT BOX - Deal Assessment
   ═══════════════════════════════════════════════════════════════ */

.verdict-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
  border: 2px solid #fbbf24;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

[data-theme="tanzanite"] .verdict-box,
[data-theme="midnight"] .verdict-box,
[data-theme="obsidian"] .verdict-box {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.08) 100%);
  border-color: rgba(251, 191, 36, 0.5);
}

.verdict-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.verdict-icon {
  font-size: 20px;
}

.verdict-title {
  font-weight: 700;
  color: #92400e;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="tanzanite"] .verdict-title,
[data-theme="midnight"] .verdict-title,
[data-theme="obsidian"] .verdict-title {
  color: #fbbf24;
}

.verdict-text {
  color: #78350f;
  font-size: 14px;
  line-height: 1.7;
}

[data-theme="tanzanite"] .verdict-text,
[data-theme="midnight"] .verdict-text,
[data-theme="obsidian"] .verdict-text {
  color: var(--ink-secondary);
}

/* Verdict status variants */
.verdict-box.proceed {
  background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
  border-color: #22c55e;
}

.verdict-box.proceed .verdict-title { color: #166534; }
.verdict-box.proceed .verdict-text { color: #14532d; }

.verdict-box.caution {
  background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
  border-color: #fbbf24;
}

.verdict-box.stop {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #ef4444;
}

.verdict-box.stop .verdict-title { color: #991b1b; }
.verdict-box.stop .verdict-text { color: #7f1d1d; }

/* ═══════════════════════════════════════════════════════════════
   HIDDEN DYNAMICS - Power Signals & Psychology
   ═══════════════════════════════════════════════════════════════ */

.dynamics-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

[data-theme="tanzanite"] .dynamics-card,
[data-theme="midnight"] .dynamics-card,
[data-theme="obsidian"] .dynamics-card {
  background: var(--surface);
  border-color: var(--line);
}

.dynamics-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.dynamics-card-icon {
  font-size: 18px;
}

.dynamics-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.dynamics-card-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-secondary);
}

.dynamics-card-content strong {
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}

.dynamics-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.dynamics-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Unspoken Concerns - Red variant */
.dynamics-card.concerns {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fecaca;
}

[data-theme="tanzanite"] .dynamics-card.concerns,
[data-theme="midnight"] .dynamics-card.concerns,
[data-theme="obsidian"] .dynamics-card.concerns {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
  border-color: rgba(239, 68, 68, 0.3);
}

.dynamics-card.concerns .dynamics-card-title {
  color: #991b1b;
}

[data-theme="tanzanite"] .dynamics-card.concerns .dynamics-card-title,
[data-theme="midnight"] .dynamics-card.concerns .dynamics-card-title,
[data-theme="obsidian"] .dynamics-card.concerns .dynamics-card-title {
  color: #f87171;
}

.dynamics-card.concerns .dynamics-card-content {
  color: #7f1d1d;
}

[data-theme="tanzanite"] .dynamics-card.concerns .dynamics-card-content,
[data-theme="midnight"] .dynamics-card.concerns .dynamics-card-content,
[data-theme="obsidian"] .dynamics-card.concerns .dynamics-card-content {
  color: var(--ink-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   PSYCHOLOGICAL MARKERS TABLE
   ═══════════════════════════════════════════════════════════════ */

.psych-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.psych-table th,
.psych-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.psych-table th {
  background: var(--line-soft);
  font-weight: 600;
  color: var(--ink-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.psych-table tbody tr:hover {
  background: var(--blue-50);
}

[data-theme="tanzanite"] .psych-table tbody tr:hover,
[data-theme="midnight"] .psych-table tbody tr:hover,
[data-theme="obsidian"] .psych-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.1);
}

.psych-table td strong {
  color: var(--ink);
}

.psych-table td:nth-child(2) {
  color: var(--ink-muted);
  font-style: italic;
}

.psych-table td:nth-child(3) {
  color: var(--blue-600);
}

/* ═══════════════════════════════════════════════════════════════
   SMART SUMMARY (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

/* Old smart-summary kept for backwards compatibility */
.smart-summary {
  background: linear-gradient(135deg, var(--blue-50), rgba(6, 182, 212, 0.05));
  border: 1px solid var(--blue-100);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

[data-theme="tanzanite"] .smart-summary,
[data-theme="midnight"] .smart-summary,
[data-theme="obsidian"] .smart-summary {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.05));
  border-color: rgba(59, 130, 246, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   SMART SUMMARY V2 - Animated Sentiment-Based Border
   ═══════════════════════════════════════════════════════════════ */

/* Animated border glow keyframes */
@keyframes borderGlow {
  0%, 100% {
    box-shadow: 0 0 5px var(--glow-color), 0 0 10px var(--glow-color), 0 0 15px var(--glow-color);
  }
  50% {
    box-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
  }
}

@keyframes borderPulse {
  0%, 100% {
    border-color: var(--border-color);
    box-shadow: 0 0 8px var(--glow-color);
  }
  50% {
    border-color: var(--border-color-bright);
    box-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
  }
}

.smart-summary-v2 {
  background: linear-gradient(135deg, var(--blue-50) 0%, white 100%);
  border: 6px solid var(--blue-400);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
  --border-color: var(--blue-400);
  --border-color-bright: var(--blue-500);
  --glow-color: rgba(59, 130, 246, 0.4);
}

/* Sentiment-based border colors */
.smart-summary-v2.sentiment-info {
  border-color: var(--blue-400);
  --border-color: var(--blue-400);
  --border-color-bright: var(--blue-500);
  --glow-color: rgba(59, 130, 246, 0.5);
}

.smart-summary-v2.sentiment-good {
  border-color: var(--green-500);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, white 100%);
  --border-color: var(--green-500);
  --border-color-bright: var(--green-400);
  --glow-color: rgba(16, 185, 129, 0.5);
}

.smart-summary-v2.sentiment-warning {
  border-color: var(--amber-500);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, white 100%);
  --border-color: var(--amber-500);
  --border-color-bright: var(--amber-400);
  --glow-color: rgba(245, 158, 11, 0.5);
}

.smart-summary-v2.sentiment-issue {
  border-color: var(--red-500);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, white 100%);
  --border-color: var(--red-500);
  --border-color-bright: var(--red-400);
  --glow-color: rgba(239, 68, 68, 0.5);
}

/* Animation class - applied for first 5 seconds */
.smart-summary-v2.animate-border {
  animation: borderPulse 1s ease-in-out infinite;
}

/* Dark theme adjustments */
[data-theme="tanzanite"] .smart-summary-v2,
[data-theme="midnight"] .smart-summary-v2,
[data-theme="obsidian"] .smart-summary-v2 {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, var(--surface) 100%);
}

[data-theme="tanzanite"] .smart-summary-v2.sentiment-good,
[data-theme="midnight"] .smart-summary-v2.sentiment-good,
[data-theme="obsidian"] .smart-summary-v2.sentiment-good {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, var(--surface) 100%);
}

[data-theme="tanzanite"] .smart-summary-v2.sentiment-warning,
[data-theme="midnight"] .smart-summary-v2.sentiment-warning,
[data-theme="obsidian"] .smart-summary-v2.sentiment-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, var(--surface) 100%);
}

[data-theme="tanzanite"] .smart-summary-v2.sentiment-issue,
[data-theme="midnight"] .smart-summary-v2.sentiment-issue,
[data-theme="obsidian"] .smart-summary-v2.sentiment-issue {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, var(--surface) 100%);
}

.smart-summary-v2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.smart-summary-v2-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.smart-summary-v2-icon {
  font-size: 20px;
}

.smart-summary-v2-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.3px;
}

.must-read-badge {
  background: var(--blue-100);
  border: 1px solid var(--blue-300);
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 4px;
}

.smart-summary-v2.sentiment-good .must-read-badge {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--green-400);
  color: var(--green-700);
}

.smart-summary-v2.sentiment-warning .must-read-badge {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--amber-400);
  color: var(--amber-700);
}

.smart-summary-v2.sentiment-issue .must-read-badge {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--red-400);
  color: var(--red-700);
}

[data-theme="tanzanite"] .must-read-badge,
[data-theme="midnight"] .must-read-badge,
[data-theme="obsidian"] .must-read-badge {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--blue-500);
  color: var(--blue-300);
}

.smart-summary-v2-body {
  padding: 20px;
}

/* Insight Flow Line - Understanding → Insight → Action */
.smart-summary-insight-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.08));
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* V1 SO WHAT - Bold headline */
.ss-v1-so-what {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 16px;
}

/* V1 Context - Plain paragraphs */
.ss-v1-context {
  margin-bottom: 20px;
}

.ss-v1-paragraph {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-secondary);
  margin-bottom: 12px;
}

.ss-v1-paragraph:last-child {
  margin-bottom: 0;
}

/* V1 Forecast - With structured bolding */
.ss-v1-forecast {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-secondary);
}

.ss-v1-forecast strong {
  color: var(--ink);
  font-weight: 600;
}

.smart-summary-v2.sentiment-good .smart-summary-insight-flow {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
}

.smart-summary-v2.sentiment-warning .smart-summary-insight-flow {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
}

.smart-summary-v2.sentiment-issue .smart-summary-insight-flow {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
}

[data-theme="tanzanite"] .smart-summary-insight-flow,
[data-theme="midnight"] .smart-summary-insight-flow,
[data-theme="obsidian"] .smart-summary-insight-flow {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(16, 185, 129, 0.1));
}

.insight-segment {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.insight-segment.understanding {
  color: var(--blue-600);
}

.insight-segment.key-insight {
  color: var(--success);
}

.insight-segment.key-action {
  color: var(--orange);
}

[data-theme="tanzanite"] .insight-segment,
[data-theme="midnight"] .insight-segment,
[data-theme="obsidian"] .insight-segment {
  color: var(--ink);
}

[data-theme="tanzanite"] .insight-segment.understanding,
[data-theme="midnight"] .insight-segment.understanding,
[data-theme="obsidian"] .insight-segment.understanding {
  color: var(--blue-400);
}

[data-theme="tanzanite"] .insight-segment.key-insight,
[data-theme="midnight"] .insight-segment.key-insight,
[data-theme="obsidian"] .insight-segment.key-insight {
  color: #34d399;
}

[data-theme="tanzanite"] .insight-segment.key-action,
[data-theme="midnight"] .insight-segment.key-action,
[data-theme="obsidian"] .insight-segment.key-action {
  color: var(--orange);
}

.insight-arrow {
  font-size: 16px;
  color: var(--ink-muted);
  font-weight: 600;
}

/* Smart Summary Paragraphs - max 2 sentences each */
.smart-summary-paragraph {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-secondary);
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.smart-summary-paragraph:last-of-type {
  border-bottom: none;
}

.smart-summary-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.smart-summary-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.smart-summary-section:first-child {
  padding-top: 0;
}

.smart-summary-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.section-icon-inline {
  font-size: 16px;
}

.section-label-inline {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--amber-600);
}

.smart-summary-section.forecast .section-label-inline {
  color: var(--blue-600);
}

.smart-summary-section-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-secondary);
}

/* Smart Summary Version Toggle */
.smart-summary-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ss-version-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--ink-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.ss-version-btn:hover {
  border-color: var(--ink-muted);
}

.ss-version-btn.active {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════
   SMART SUMMARY V2: EXECUTIVE GLANCE
   Anchor + Next Steps Only
   ═══════════════════════════════════════════════════════════════ */

/* V2 Anchor - Bold headline */
.ss-v2-anchor {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

/* V2 Next Steps */
.ss-v2-next-steps {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 16px 20px;
}

.ss-v2-next-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.ss-v2-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ss-v2-steps-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.ss-v2-steps-list li:last-child {
  margin-bottom: 0;
}

.ss-v2-steps-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--blue-500);
  font-weight: 700;
}

/* Dark theme adjustments */
[data-theme="tanzanite"] .ss-v2-next-steps,
[data-theme="midnight"] .ss-v2-next-steps,
[data-theme="obsidian"] .ss-v2-next-steps {
  background: rgba(255, 255, 255, 0.04);
}

/* Checkmark for watch-out acknowledgment */
.watch-out-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--amber-100);
  border: 1px solid var(--amber-400);
  border-radius: 4px;
  color: var(--amber-600);
  font-size: 12px;
  margin-right: 8px;
  flex-shrink: 0;
}

.smart-summary-v2.sentiment-issue .watch-out-check {
  background: var(--red-100);
  border-color: var(--red-400);
  color: var(--red-600);
}

.smart-summary-v2.sentiment-good .watch-out-check {
  background: var(--green-100);
  border-color: var(--green-400);
  color: var(--green-600);
}

.smart-summary-section.opportunity {
  padding-left: 0;
}

.smart-summary-section.opportunity .smart-summary-section-text {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
}

/* Pills kept for backwards compatibility */
.smart-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.smart-summary-icon {
  font-size: 20px;
}

.smart-summary-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue-600);
}

.smart-summary-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.smart-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.pill.positive {
  background: rgba(5, 150, 105, 0.1);
  color: var(--success);
}

.pill.neutral {
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue-600);
}

.pill.warning {
  background: rgba(217, 119, 6, 0.1);
  color: var(--gold);
}

.pill.urgent {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════
   RISK ALERTS CARD (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

.risk-alerts-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(249, 115, 22, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.risk-alerts-card.hidden {
  display: none;
}

.risk-alerts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.risk-alerts-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--danger);
}

.risk-count-badge {
  background: var(--danger);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.risk-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(239, 68, 68, 0.1);
}

.risk-alert-item:last-child {
  border-bottom: none;
}

.risk-alert-icon {
  font-size: 16px;
}

.risk-alert-content {
  flex: 1;
}

.risk-alert-title {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

.risk-alert-action {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   SMART QUESTIONS CARD (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

.smart-questions-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(20, 184, 166, 0.05));
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-left: 4px solid var(--cyan);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.smart-questions-card.hidden {
  display: none;
}

.smart-questions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.smart-questions-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--cyan);
}

.questions-count-badge {
  background: var(--cyan);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.smart-question-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(6, 182, 212, 0.1);
}

.smart-question-item:last-child {
  border-bottom: none;
}

.smart-question-number {
  width: 24px;
  height: 24px;
  background: var(--cyan);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.smart-question-text {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   INSIGHTS GRID (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.insight-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  border-left: 4px solid var(--blue-500);
}

.insight-card.action { border-left-color: var(--blue-500); }
.insight-card.warning { border-left-color: var(--gold); }
.insight-card.success { border-left-color: var(--success); }
.insight-card.info { border-left-color: var(--cyan); }

.insight-type {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.insight-card.action .insight-type { color: var(--blue-600); }
.insight-card.warning .insight-type { color: var(--gold); }
.insight-card.success .insight-type { color: var(--success); }
.insight-card.info .insight-type { color: var(--cyan); }

.insight-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   RISK & LEVER GRID (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

.risk-lever-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.risk-lever-card {
  padding: 20px;
  border-radius: 12px;
}

.risk-lever-card.risk {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(249, 115, 22, 0.04));
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.risk-lever-card.lever {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(20, 184, 166, 0.04));
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.risk-lever-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.risk-lever-card.risk .risk-lever-label { color: var(--danger); }
.risk-lever-card.lever .risk-lever-label { color: var(--success); }

.risk-lever-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   ACTION ITEMS (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

.action-item-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.action-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--line-soft);
  border-bottom: 1px solid var(--line);
}

.action-item-num {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan));
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.action-item-title {
  flex: 1;
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

.confidence-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(5, 150, 105, 0.1);
  color: var(--success);
}

.action-item-flow {
  padding: 16px;
}

.flow-step {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.flow-step:last-child {
  border-bottom: none;
}

.flow-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.flow-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.source-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 8px;
}

.source-tag.stated { background: rgba(5, 150, 105, 0.1); color: var(--success); }
.source-tag.implicit { background: rgba(59, 130, 246, 0.1); color: var(--blue-600); }
.source-tag.gap { background: rgba(217, 119, 6, 0.1); color: var(--gold); }
.source-tag.ai { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

/* Source Legend */
.source-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--line-soft);
  border-radius: 10px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.stated { background: var(--success); }
.legend-dot.implicit { background: var(--blue-500); }
.legend-dot.gap { background: var(--gold); }
.legend-dot.ai { background: #8b5cf6; }

/* ═══════════════════════════════════════════════════════════════
   EMAIL BOX (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

.email-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.email-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--line-soft);
  border-bottom: 1px solid var(--line);
}

.email-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.copy-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan));
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  transform: scale(1.05);
}

.email-text {
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-secondary);
  white-space: pre-wrap;
}

/* ═══════════════════════════════════════════════════════════════
   TRAJECTORY CARD (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

.trajectory-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.trajectory-logic {
  font-size: 13px;
  color: var(--blue-600);
  padding: 12px 16px;
  background: var(--blue-50);
  border-radius: 8px;
  margin-bottom: 16px;
  line-height: 1.7;
  font-weight: 500;
}

[data-theme="tanzanite"] .trajectory-logic,
[data-theme="midnight"] .trajectory-logic,
[data-theme="obsidian"] .trajectory-logic {
  background: rgba(59, 130, 246, 0.1);
}

.trajectory-text {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.probability-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.probability-label {
  font-size: 13px;
  color: var(--ink-muted);
}

.probability-number {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue-600), var(--success));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════
   COACHING CARD (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

.coaching-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #faf5ff, #f5f3ff);
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  margin-bottom: 24px;
}

[data-theme="tanzanite"] .coaching-card,
[data-theme="midnight"] .coaching-card,
[data-theme="obsidian"] .coaching-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.05));
  border-color: rgba(139, 92, 246, 0.2);
}

.coaching-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.coaching-text {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════════
   DYNAMICS GRID (Oracle Tab)
   ═══════════════════════════════════════════════════════════════ */

.dynamics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.dynamic-meter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.meter-label {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.meter-bar-wrap {
  height: 8px;
  background: var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.meter-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-500), var(--success));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.meter-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   TEAM BRIEF STYLES
   ═══════════════════════════════════════════════════════════════ */

/* Overview Grid */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.overview-item {
  background: var(--line-soft);
  padding: 14px 16px;
  border-radius: 10px;
}

.overview-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.overview-value {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  background: var(--line-soft);
  font-weight: 600;
  color: var(--ink-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tr:hover td {
  background: rgba(59, 130, 246, 0.04);
}

/* Checklist */
.checklist {
  list-style: none;
  margin-bottom: 24px;
}

.checklist li {
  padding: 10px 0;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-secondary);
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist .check {
  color: var(--success);
  font-weight: bold;
}

.checklist .warn {
  color: var(--gold);
  font-weight: bold;
}

/* Leverage Grid */
.leverage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.leverage-card {
  padding: 16px;
  border-radius: 12px;
}

.leverage-card.yours {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.leverage-card.theirs {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.08), rgba(251, 191, 36, 0.04));
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.leverage-card h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.leverage-card.yours h4 { color: var(--success); }
.leverage-card.theirs h4 { color: var(--gold); }

.leverage-card ul {
  list-style: none;
  font-size: 14px;
}

.leverage-card li {
  padding: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   MEETING RECORD STYLES
   ═══════════════════════════════════════════════════════════════ */

.record-section {
  margin-bottom: 24px;
}

.record-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-600);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: none;
}

/* Discussion Topics - Numbered with bold titles and bullet points */
.discussion-topics .topic-item {
  margin-bottom: 20px;
}

.discussion-topics .topic-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.discussion-topics .topic-points {
  margin: 0;
  padding-left: 24px;
  list-style-type: disc;
}

.discussion-topics .topic-points li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

/* Action Items Table - Matching the reference design */
.action-items-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.action-items-table thead {
  background: var(--line-soft);
}

.action-items-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.action-items-table thead th.col-num {
  width: 50px;
  text-align: center;
}

.action-items-table thead th.col-action {
  width: auto;
}

.action-items-table thead th.col-responsible {
  width: 140px;
}

.action-items-table thead th.col-status {
  width: 140px;
}

.action-items-table tbody tr {
  border-bottom: 1px solid var(--line);
}

.action-items-table tbody tr:last-child {
  border-bottom: none;
}

.action-items-table tbody tr:hover {
  background: var(--line-soft);
}

.action-items-table tbody td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--ink);
  vertical-align: middle;
}

.action-items-table tbody td:first-child {
  text-align: center;
  font-weight: 500;
  color: var(--ink-muted);
}

.action-items-table tbody td.action-text {
  color: var(--ink);
}

.action-items-table tbody td.responsible-text {
  color: var(--ink-secondary);
}

.action-items-table tbody td.status-cell {
  white-space: nowrap;
}

/* Status badges with icons */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
}

.status-badge.todo {
  color: var(--blue-600);
}

.status-badge.in-progress {
  color: var(--amber-600);
}

.status-badge.done {
  color: var(--green-600);
}

.status-badge.after {
  color: var(--amber-600);
}

.status-badge.future {
  color: var(--blue-500);
}

/* Executive Summary - Warm Scannable Style */
.executive-summary-box {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  padding: 20px;
  background: var(--line-soft);
  border-radius: 12px;
  margin-bottom: 12px;
}

.executive-summary-box p {
  margin: 0 0 12px 0;
}

.executive-summary-box p:last-child {
  margin-bottom: 0;
}

/* Key Highlights Grid */
.key-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.highlight-pill.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--green-500);
  color: var(--green-700);
}

.highlight-pill.pending {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--blue-500);
  color: var(--blue-700);
}

.highlight-pill.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--amber-500);
  color: var(--amber-700);
}

.highlight-pill.info {
  background: rgba(107, 114, 128, 0.1);
  border-color: var(--ink-muted);
  color: var(--ink-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   MEETING OVERVIEW - Signal Card Style (3x2 Grid)
   ═══════════════════════════════════════════════════════════════ */

.overview-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.overview-card {
  background: var(--line-soft);
  border-radius: 10px;
  padding: 16px 20px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 4px solid var(--blue-400);
  transition: border-color 0.2s ease;
}

/* Sentiment border colors */
.overview-card.neutral {
  border-left-color: var(--blue-400);
}

.overview-card.good {
  border-left-color: var(--green-500);
}

.overview-card.warning {
  border-left-color: var(--amber-500);
}

.overview-card.issue {
  border-left-color: var(--red-500);
}

.overview-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.overview-card-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .overview-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .overview-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ACTION ITEMS - Compact Table Format
   ═══════════════════════════════════════════════════════════════ */

.source-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  background: var(--line-soft);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--ink-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.stated {
  background: var(--green-500);
}

.legend-dot.implicit {
  background: var(--blue-500);
}

.legend-dot.not-discussed {
  background: var(--amber-500);
}

.legend-dot.ai-suggested {
  background: var(--purple-500);
}

.action-items-compact {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

/* Oracle Action Items - Single Line Grid */
.oracle-actions-grid {
  display: grid;
  gap: 8px;
}

.oracle-action-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: background 0.15s ease;
}

.oracle-action-row:hover {
  background: var(--line-soft);
}

.oracle-action-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan));
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
}

.oracle-action-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oracle-action-owner {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.oracle-action-source {
  display: inline-block;
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: 4px;
}

.oracle-action-source.stated {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-600);
}

.oracle-action-source.implicit {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-600);
}

.oracle-action-source.not-discussed,
.oracle-action-source.gap {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-600);
}

.oracle-action-source.ai-suggested,
.oracle-action-source.ai {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.action-items-compact thead {
  background: var(--line-soft);
}

.action-items-compact thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.action-items-compact tbody tr {
  transition: background 0.15s ease;
}

.action-items-compact tbody tr:hover {
  background: var(--line-soft);
}

.action-items-compact tbody td {
  padding: 14px;
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.action-items-compact tbody tr:last-child td {
  border-bottom: none;
}

.action-items-compact .col-num {
  width: 40px;
  text-align: center;
}

.action-items-compact .col-action {
  width: 35%;
  font-weight: 500;
}

.action-items-compact .col-owner {
  width: 15%;
}

.action-items-compact .col-why {
  width: 35%;
  color: var(--ink-secondary);
}

.action-items-compact .col-source {
  width: 15%;
  text-align: center;
}

.action-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--blue-500);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
}

.source-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: 4px;
}

.source-tag.stated {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-600);
}

.source-tag.implicit {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-600);
}

.source-tag.not-discussed {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-600);
}

.source-tag.ai-suggested {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple-600);
}

/* Summary Text */
.summary-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-secondary);
  padding: 16px;
  background: var(--line-soft);
  border-radius: 10px;
}

/* Quote Block */
.quote-block {
  padding: 16px;
  background: var(--line-soft);
  border-left: 4px solid var(--blue-500);
  border-radius: 0 10px 10px 0;
  margin-bottom: 12px;
  font-style: italic;
  color: var(--ink-secondary);
}

.quote-block .author {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 8px;
}

/* Metadata Grid */
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  background: var(--line-soft);
  border-radius: 12px;
}

.metadata-item {
  text-align: center;
}

.metadata-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.metadata-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* ═══════════════════════════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: white;
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS MODAL
   ═══════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--line-soft);
  color: var(--ink-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--line);
}

.modal-body {
  padding: 24px;
}

.settings-group {
  margin-bottom: 24px;
}

.settings-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 8px;
  display: block;
}

.settings-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: var(--bg-alt);
  color: var(--ink);
}

.settings-input:focus {
  outline: none;
  border-color: var(--blue-500);
}

.settings-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: var(--bg-alt);
  color: var(--ink);
  cursor: pointer;
}

.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.toggle-label {
  font-size: 14px;
  color: var(--ink);
}

.toggle-switch {
  width: 48px;
  height: 26px;
  background: var(--line);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-switch.active {
  background: var(--success);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}

.toggle-switch.active::after {
  transform: translateX(22px);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   ORACLE ACCESS GATE
   ═══════════════════════════════════════════════════════════════ */

#oracleGate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  box-sizing: border-box;
}

#oracleGate.active {
  display: flex !important;
}

.oracle-gate-content {
  background: var(--surface);
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.oracle-gate-header {
  padding: 28px 28px 20px;
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
}

.oracle-gate-icon { font-size: 48px; margin-bottom: 12px; }
.oracle-gate-title { font-size: 24px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.oracle-gate-subtitle { font-size: 15px; color: var(--ink-secondary); }

.oracle-gate-body { padding: 24px 28px; }
.oracle-gate-section { margin-bottom: 20px; }
.oracle-gate-section-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.oracle-gate-text { font-size: 14px; line-height: 1.7; color: var(--ink-secondary); }
.oracle-gate-text p { margin-bottom: 12px; }
.oracle-gate-text p:last-child { margin-bottom: 0; }
.oracle-gate-divider { height: 1px; background: var(--line); margin: 24px 0; }

.oracle-gate-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.oracle-gate-choice {
  padding: 20px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--bg-alt);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.oracle-gate-choice:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.oracle-gate-choice.full-access { border-color: var(--success); }
.oracle-gate-choice.full-access:hover { background: rgba(5, 150, 105, 0.08); }
.oracle-gate-choice.work-safe { border-color: var(--gold); }
.oracle-gate-choice.work-safe:hover { background: rgba(217, 119, 6, 0.08); }

.oracle-gate-choice-icon { font-size: 28px; margin-bottom: 10px; }
.oracle-gate-choice-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.oracle-gate-choice.full-access .oracle-gate-choice-title { color: var(--success); }
.oracle-gate-choice.work-safe .oracle-gate-choice-title { color: var(--gold); }
.oracle-gate-choice-desc { font-size: 13px; color: var(--ink-secondary); line-height: 1.5; }

.oracle-gate-footer {
  padding: 20px 28px;
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 20px 20px;
}

.oracle-gate-confirm { font-size: 13px; color: var(--ink-muted); text-align: center; line-height: 1.6; }

/* Oracle Tab Footer */
.oracle-footer-disclaimer {
  margin-top: 24px;
  padding: 14px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-muted);
}

.oracle-footer-disclaimer .mode-indicator { font-weight: 600; }
.oracle-footer-disclaimer .mode-indicator.full-access { color: var(--success); }
.oracle-footer-disclaimer .mode-indicator.work-safe { color: var(--gold); }
.oracle-footer-disclaimer .settings-link { color: var(--blue-500); cursor: pointer; }

@media (max-width: 600px) {
  .oracle-gate-choices { grid-template-columns: 1fr; }
  .oracle-footer-disclaimer { flex-direction: column; gap: 8px; text-align: center; }
}

/* Work Safe Mode - Hide psych content by default */
/* Individual toggles can override this */
body.work-safe-mode [data-psych-section="powerSignals"] { display: none !important; }
body.work-safe-mode [data-psych-section="psychMarkers"] { display: none !important; }
body.work-safe-mode [data-psych-section="unspokenConcerns"] { display: none !important; }
body.work-safe-mode [data-psych-section="coachingNote"] { display: none !important; }

/* Individual overrides - show even in work-safe mode */
body.show-powerSignals [data-psych-section="powerSignals"] { display: block !important; }
body.show-psychMarkers [data-psych-section="psychMarkers"] { display: block !important; }
body.show-unspokenConcerns [data-psych-section="unspokenConcerns"] { display: block !important; }
body.show-coachingNote [data-psych-section="coachingNote"] { display: block !important; }

/* Individual section hiding (when Full Details ON but toggle OFF) */
body.hide-powerSignals [data-psych-section="powerSignals"] { display: none !important; }
body.hide-psychMarkers [data-psych-section="psychMarkers"] { display: none !important; }
body.hide-unspokenConcerns [data-psych-section="unspokenConcerns"] { display: none !important; }
body.hide-coachingNote [data-psych-section="coachingNote"] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .signalboard {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .insights-grid,
  .risk-lever-grid,
  .leverage-grid {
    grid-template-columns: 1fr;
  }
  
  .tab-nav {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    flex: 1 1 auto;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .signalboard {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .signal-card {
    padding: 12px;
  }
  
  .signal-value {
    font-size: 16px;
  }
  
  .overview-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════ */

@media print {
  .app-header,
  .tab-nav,
  .action-buttons,
  .settings-btn,
  .modal-overlay,
  .loading-overlay {
    display: none !important;
  }
  
  .tab-content {
    display: block !important;
    page-break-after: always;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CHAT INTEGRATION CSS - IMA v2.9
   ═══════════════════════════════════════════════════════════════ */

/* Chat Toggle Button in Header */
.chat-toggle-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #06b6d4 0%, #14b8a6 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Split Screen Wrapper */
.split-screen-wrapper {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--surface);
}

.split-screen-wrapper.active {
  display: flex;
  flex-direction: column;
}

/* Split Header Bar */
.split-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.split-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.split-back-btn:hover {
  background: var(--hover);
  border-color: #06b6d4;
}

.split-view-toggles {
  display: flex;
  gap: 4px;
  background: var(--hover);
  padding: 4px;
  border-radius: 8px;
}

.split-view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.split-view-btn:hover { color: var(--ink); }

.split-view-btn.active {
  background: var(--surface);
  color: #06b6d4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Split Container */
.split-screen-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.split-panel {
  overflow-y: auto;
  height: 100%;
}

.split-panel-chat {
  flex: 0 0 420px;
  min-width: 320px;
  max-width: 600px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.split-panel-report {
  flex: 1;
  padding: 24px;
  background: var(--surface);
}

.split-divider {
  width: 6px;
  background: var(--border);
  cursor: col-resize;
  transition: background 0.2s;
  flex-shrink: 0;
}

.split-divider:hover { background: #06b6d4; }

/* View collapse modes */
.split-screen-container.chat-collapsed .split-panel-chat,
.split-screen-container.chat-collapsed .split-divider { display: none; }

.split-screen-container.report-collapsed .split-panel-report,
.split-screen-container.report-collapsed .split-divider { display: none; }

.split-screen-container.report-collapsed .split-panel-chat {
  max-width: 100%;
  flex: 1;
}

/* Chat Panel */
.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-logo { font-size: 24px; }
.chat-title { font-weight: 600; font-size: 16px; color: var(--ink); }
.chat-subtitle { font-size: 12px; color: var(--ink-muted); }

.chat-context-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 12px;
  font-size: 11px;
  color: #06b6d4;
}

/* Chat Style Toggle */
.chat-style-toggle {
  display: flex;
  background: var(--hover);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.chat-style-btn {
  padding: 5px 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.chat-style-btn:hover {
  color: var(--ink);
}

.chat-style-btn.active {
  background: var(--surface);
  color: #06b6d4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Messages Area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Message Bubbles */
.chat-message {
  display: flex;
  gap: 12px;
  animation: msgSlide 0.3s ease-out;
}

@keyframes msgSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message.user { flex-direction: row-reverse; }

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: var(--border);
  color: var(--ink-muted);
}

.chat-message.user .chat-avatar {
  background: linear-gradient(135deg, #06b6d4 0%, #14b8a6 100%);
  color: white;
  font-size: 11px;
  font-weight: 600;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  position: relative;
}

.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, #06b6d4 0%, #14b8a6 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.assistant .chat-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

/* Copy Button */
.chat-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(0,0,0,0.05);
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: all 0.2s;
}

.chat-message:hover .chat-copy-btn {
  opacity: 1;
}

.chat-copy-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

.chat-copy-btn.copied {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

/* Typing Indicator */
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.chat-typing-dot {
  width: 8px;
  height: 8px;
  background: #06b6d4;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* Streaming cursor */
.chat-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: #06b6d4;
  margin-left: 2px;
  animation: cursorBlink 1s infinite;
  vertical-align: text-bottom;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Chat Input Area */
.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

/* File attachment preview */
.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chat-attachment {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink);
  max-width: 200px;
}

.chat-attachment-icon {
  font-size: 16px;
}

.chat-attachment-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-remove {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background 0.2s;
}

.chat-attachment-remove:hover {
  background: rgba(239, 68, 68, 0.4);
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input-wrapper.drag-over {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.05);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.chat-input-wrapper:focus-within {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.chat-attach-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-attach-btn:hover {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
}

.chat-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  color: var(--ink);
  font-family: inherit;
}

.chat-input:focus { outline: none; }
.chat-input::placeholder { color: var(--ink-muted); }

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #06b6d4 0%, #14b8a6 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: transform 0.2s, opacity 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) { transform: scale(1.05); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Stop Generation Button */
.chat-stop-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.chat-stop-btn:hover { transform: scale(1.05); }
.chat-stop-btn.visible { display: flex; }

/* Code blocks in chat */
.chat-code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  overflow-x: auto;
  margin: 8px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-code-block .keyword { color: #569cd6; }
.chat-code-block .string { color: #ce9178; }
.chat-code-block .comment { color: #6a9955; }
.chat-code-block .number { color: #b5cea8; }
.chat-code-block .function { color: #dcdcaa; }

/* Empty State */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px 20px;
}

.chat-empty-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 20px;
}

.chat-suggestion-btn {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  margin: 4px 0;
  width: 100%;
  max-width: 280px;
}

.chat-suggestion-btn:hover {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.05);
}

/* Oracle Cards in Chat */
.oracle-card {
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 10px 10px 0;
  border-left: 4px solid;
}

.oracle-card strong {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.oracle-card .oracle-card-content {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink);
}

.oracle-card .oracle-card-content br {
  display: block;
  margin-bottom: 4px;
}

/* Action - Blue */
.oracle-card.action {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: #3b82f6;
}
.oracle-card.action strong { color: #3b82f6; }

/* Warning/Risk - Orange/Amber */
.oracle-card.warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: #f59e0b;
}
.oracle-card.warning strong { color: #d97706; }

/* Success/Insight - Green */
.oracle-card.success {
  background: rgba(16, 185, 129, 0.1);
  border-left-color: #10b981;
}
.oracle-card.success strong { color: #059669; }

/* Info/Signal - Purple */
.oracle-card.info {
  background: rgba(139, 92, 246, 0.1);
  border-left-color: #8b5cf6;
}
.oracle-card.info strong { color: #7c3aed; }

/* Quote/Say This - Gold */
.oracle-card.quote {
  background: rgba(251, 191, 36, 0.1);
  border-left-color: #f59e0b;
}
.oracle-card.quote strong { color: #b45309; }

/* Blockquotes in chat */
.chat-quote {
  border-left: 3px solid #b8860b;
  background: rgba(184, 134, 11, 0.08);
  padding: 8px 12px;
  margin: 8px 0;
  font-style: italic;
  border-radius: 0 6px 6px 0;
}

/* Bullet points */
.chat-bullet {
  color: #06b6d4;
  font-weight: bold;
}

/* ═══════════════════════════════════════════════════════════════
   PAPER PLANE ANIMATION - First Chat Session
   ═══════════════════════════════════════════════════════════════ */
.paper-plane-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The report card that gets folded */
.plane-report-card {
  width: 280px;
  background: var(--surface, #fff);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  transform-origin: center center;
  position: relative;
}

.plane-report-header {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink, #1a1a1a);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plane-report-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plane-report-line {
  height: 8px;
  background: linear-gradient(90deg, var(--line, #e5e0d8) 0%, transparent 100%);
  border-radius: 4px;
}

.plane-report-line:nth-child(1) { width: 100%; }
.plane-report-line:nth-child(2) { width: 85%; }
.plane-report-line:nth-child(3) { width: 70%; }
.plane-report-line:nth-child(4) { width: 90%; }

/* Stage 1: Scrunch up the paper */
.plane-report-card.scrunching {
  animation: scrunchPaper 2s ease-in-out forwards;
}

@keyframes scrunchPaper {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(0.95) rotate(-2deg); }
  40% { transform: scale(0.9) rotate(2deg) translateY(-5px); }
  60% { transform: scale(0.8) rotate(-2deg); }
  80% { transform: scale(0.7) rotate(1deg); }
  100% { transform: scale(0.6) rotate(0deg); }
}

/* Stage 2: Fold into paper plane shape */
.plane-report-card.folding {
  animation: foldToPlane 2s ease-in-out forwards;
}

@keyframes foldToPlane {
  0% { 
    transform: scale(0.6) rotate(0deg) perspective(800px) rotateX(0deg);
    border-radius: 12px;
  }
  20% { 
    transform: scale(0.55) rotate(-5deg) perspective(800px) rotateX(30deg);
    border-radius: 8px;
  }
  40% { 
    transform: scale(0.5) rotate(-15deg) perspective(800px) rotateX(50deg) rotateY(10deg);
    border-radius: 4px;
  }
  60% { 
    transform: scale(0.4) rotate(-25deg) perspective(800px) rotateX(60deg) rotateY(20deg);
    border-radius: 2px;
    width: 200px;
    padding: 15px;
  }
  80% { 
    transform: scale(0.3) rotate(-30deg) perspective(800px) rotateX(70deg) rotateY(30deg);
    border-radius: 0;
    width: 150px;
    padding: 10px;
  }
  100% { 
    transform: scale(0.2) rotate(-35deg) perspective(800px) rotateX(80deg) rotateY(40deg);
    opacity: 0;
    width: 100px;
    padding: 5px;
  }
}

/* The paper plane */
.paper-plane {
  position: absolute;
  font-size: 3.5rem;
  opacity: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
  transform: rotate(-30deg);
}

/* Stage 3: Slow graceful flight */
.paper-plane.flying {
  animation: flyToChat 3s ease-in-out forwards;
}

@keyframes flyToChat {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(-30deg) scale(1);
  }
  15% {
    transform: translate(10vw, -8vh) rotate(-25deg) scale(0.95);
  }
  30% {
    transform: translate(22vw, -5vh) rotate(-32deg) scale(0.9);
  }
  45% {
    transform: translate(38vw, -10vh) rotate(-28deg) scale(0.85);
  }
  60% {
    transform: translate(52vw, -6vh) rotate(-35deg) scale(0.75);
  }
  75% {
    transform: translate(68vw, -12vh) rotate(-28deg) scale(0.65);
    opacity: 1;
  }
  90% {
    transform: translate(82vw, -4vh) rotate(-32deg) scale(0.5);
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translate(90vw, 5vh) rotate(-30deg) scale(0.4);
  }
}

/* Chat icon pulse when plane arrives */
.chat-toggle-btn.receiving {
  animation: pulseReceive 0.6s ease-out 3;
}

@keyframes pulseReceive {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 15px rgba(6, 182, 212, 0); }
}

/* ═══════════════════════════════════════════════════════════════
   SMART TIMER - Analysis Progress
   ═══════════════════════════════════════════════════════════════ */
.analysis-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}

.timer-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  margin-bottom: 0.5rem;
}

.timer-clock {
  position: relative;
  width: 120px;
  height: 120px;
}

.timer-circle-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 8;
}

.timer-circle-progress {
  fill: none;
  stroke: url(#timerGradient);
  stroke-width: 8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.5s ease;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-elapsed {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
}

.timer-unit {
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timer-phases {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 280px;
}

.timer-phase {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: var(--bg-alt);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.timer-phase.active {
  opacity: 1;
  background: var(--blue-50);
  border-left: 3px solid var(--blue-500);
}

.timer-phase.complete {
  opacity: 0.7;
}

.timer-phase-icon {
  width: 20px;
  text-align: center;
}

.timer-phase.complete .timer-phase-icon::after {
  content: '✓';
  color: var(--success);
}

.timer-phase.active .timer-phase-icon::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--blue-500);
  border-radius: 50%;
  animation: pulseDot 1s ease-in-out infinite;
}

.timer-phase:not(.active):not(.complete) .timer-phase-icon::after {
  content: '○';
  color: var(--ink-muted);
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.timer-phase-label {
  font-size: 0.85rem;
  color: var(--ink);
  flex: 1;
}

.timer-phase.active .timer-phase-label {
  font-weight: 600;
  color: var(--blue-600);
}

.timer-estimate {
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.timer-estimate strong {
  color: var(--ink-secondary);
}

/* Mobile */
@media (max-width: 768px) {
  .split-screen-container { flex-direction: column; }
  .split-panel-chat {
    flex: none;
    max-width: 100%;
    height: 50%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .split-panel-report { height: 50%; }
  .split-divider { display: none; }
}