/* Rule26 AI - Design System */

/* ========================================
   CSS Variables
   ======================================== */
:root {
  /* Color Palette */
  --color-navy: #1E3A8A;
  --color-navy-light: #2563EB;
  --color-navy-dark: #1E3A5F;
  --color-slate: #475569;
  --color-slate-light: #64748B;
  --color-emerald: #059669;
  --color-emerald-light: #10B981;
  --color-amber: #D97706;
  --color-amber-light: #F59E0B;
  --color-ruby: #DC2626;
  --color-ruby-light: #EF4444;
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-border: #E2E8F0;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ========================================
   Utilities
   ======================================== */
.hidden {
  display: none !important;
}

/* ========================================
   Base Styles
   ======================================== */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-slate);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--color-navy);
  line-height: 1.25;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

.text-small {
  font-size: 0.875rem;
}

.text-mono {
  font-family: var(--font-mono);
}

/* ========================================
   Layout
   ======================================== */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main-content {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}

.container {
  width: 100%;
  max-width: 80rem; /* 1280px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ========================================
   Screen Management
   ======================================== */
.screen {
  display: none;
}

.screen.active {
  display: block;
  opacity: 1;
  animation: fadeIn var(--transition-normal) ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Screen 0 - The AI Discovery Crisis */
.case-tab { transition: all 0.3s ease; }
.case-tab:hover { background-color: #f8fafc; }
.case-tab.active { color: #1E3A8A; font-weight: 600; }
.case-content { display: none; animation: slideIn 0.5s ease; }
.case-content.active { display: block; }
@keyframes slideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.stats-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.stats-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); }
.gradient-blue { background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%); }
.gradient-amber { background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%); }
.gradient-red { background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%); }
.solution-card { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); }

/* Solution CTA section - dark background, high-contrast text */
.solution-cta-section {
  background: linear-gradient(135deg, #172554 0%, #1e3a8a 50%, #1e40af 100%);
}

.solution-cta-section,
.solution-cta-section h2,
.solution-cta-section p,
.solution-cta-section .solution-section-text,
.solution-cta-section .solution-section-heading,
.solution-cta-section .solution-section-list,
.solution-cta-section .solution-section-list li {
  color: #f8fafc !important;
}

.solution-cta-section .solution-section-heading {
  color: #ffffff !important;
}

.solution-cta-buttons {
  color: #334155;
}

.solution-cta-subtext {
  color: #64748b !important;
}

/* Discovery Motion Rates chart (Screen 0) */
.discovery-motion-rates {
  max-width: 32rem;
}

.discovery-rates-chart {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.discovery-rate-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.discovery-rate-label {
  flex: 0 0 7rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-slate);
}

.discovery-rate-bar-track {
  flex: 1;
  height: 1.5rem;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  min-width: 0;
}

.discovery-rate-bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  min-width: 2.5rem;
}

.discovery-rate-92 { background: var(--color-ruby); }
.discovery-rate-70 { background: var(--color-amber); }
.discovery-rate-40 { background: var(--color-navy-light); }
.discovery-rate-30 { background: var(--color-slate); }

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ========================================
   Cards
   ======================================== */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card-hover {
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.card-hover:hover {
  box-shadow: var(--shadow-md);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-navy);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  background-color: var(--color-navy);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-navy-light);
}

/* Secondary Button */
.btn-secondary {
  background-color: transparent;
  color: var(--color-navy);
  border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--color-bg);
  border-color: var(--color-navy);
}

/* Danger Button */
.btn-danger {
  background-color: var(--color-ruby);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: var(--color-ruby-light);
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: var(--color-slate);
}

.btn-ghost:hover:not(:disabled) {
  background-color: var(--color-bg);
}

/* Small Button */
.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

/* ========================================
   Form Inputs
   ======================================== */
.input {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--color-slate);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.15);
}

.input::placeholder {
  color: var(--color-slate-light);
}

.input.invalid {
  border-color: var(--color-ruby);
}

select.input {
  cursor: pointer;
}

/* ========================================
   Status Badges
   ======================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
}

.badge-navy {
  background-color: rgba(30, 58, 138, 0.1);
  color: var(--color-navy);
}

.badge-emerald {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--color-emerald);
}

.badge-amber {
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--color-amber);
}

.badge-ruby {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--color-ruby);
}

.badge-slate {
  background-color: rgba(71, 85, 105, 0.1);
  color: var(--color-slate);
}

/* ========================================
   Navigation
   ======================================== */
.nav-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-btn:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.15);
}

/* Progress dots */
.progress-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.progress-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.progress-dot.active {
  background: var(--color-amber-light);
  transform: scale(1.2);
}

.progress-dot.unlocked {
  cursor: pointer;
}

.progress-dot.locked {
  cursor: not-allowed;
  opacity: 0.6;
}

.restart-btn {
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

.restart-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   Graph Nodes (for knowledge graph)
   ======================================== */
.graph-node {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

.graph-node:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.graph-node.highlighted {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px var(--color-navy);
}

/* Graph tooltip */
#graph-tooltip {
  position: fixed;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background: var(--color-navy);
  color: white;
  border-radius: var(--radius-sm);
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

#graph-tooltip.active {
  opacity: 1;
}

/* ========================================
   Panels & Overlays
   ======================================== */
.overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  z-index: 40;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 32rem;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  z-index: 50;
}

.slide-panel.active {
  transform: translateX(0);
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  z-index: 50;
}

.modal.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rfp-modal {
  max-width: 36rem;
  width: 90%;
}

.rfp-modal-content {
  padding: 0;
}

.rfp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.rfp-modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-navy);
}

.rfp-modal-body {
  padding: 1.25rem;
  max-height: 20rem;
  overflow-y: auto;
}

.rfp-draft-text {
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: pre-wrap;
  background: var(--color-bg);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin: 0;
}

/* ========================================
   Tables
   ======================================== */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-light);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background-color: var(--color-bg);
}

/* ========================================
   Lists
   ======================================== */
.list-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-fast);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background-color: var(--color-bg);
}

.list-item-clickable {
  cursor: pointer;
}

/* ========================================
   Progress Indicators
   ======================================== */
.progress-bar {
  height: 0.5rem;
  background-color: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--color-navy);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* ========================================
   Utility Classes
   ======================================== */
.text-navy { color: var(--color-navy); }
.text-slate { color: var(--color-slate); }
.text-emerald { color: var(--color-emerald); }
.text-amber { color: var(--color-amber); }
.text-ruby { color: var(--color-ruby); }

.bg-navy { background-color: var(--color-navy); }
.bg-surface { background-color: var(--color-surface); }
.bg-bg { background-color: var(--color-bg); }

.border-color { border-color: var(--color-border); }

/* ========================================
   Tabs
   ======================================== */
.tab-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-slate);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.tab-btn:hover {
  color: var(--color-navy);
}

.tab-btn.active {
  color: var(--color-navy);
  border-bottom-color: var(--color-navy);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn var(--transition-normal) ease;
}

/* ========================================
   Loading Overlay
   ======================================== */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  pointer-events: none;
}

#loading-overlay.active {
  display: flex;
  pointer-events: auto;
}

/* ========================================
   Screen 1: Introduction / Case Context
   ======================================== */
.intro-split {
  display: flex;
  gap: 2rem;
  max-width: 72rem;
}

.intro-split-centered {
  max-width: none;
  align-items: center;
  margin: 0 auto;
  min-height: calc(100vh - 12rem);
}

.intro-left {
  flex: 4;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.intro-right {
  flex: 6;
  min-width: 0;
}

.intro-split-centered .intro-right {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.intro-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.intro-bullets li {
  margin-bottom: 1rem;
}

.intro-bullets li:last-child {
  margin-bottom: 0;
}

.intro-header {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-navy);
}

.intro-case-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-navy);
}

.intro-quote {
  color: var(--color-slate);
  background: var(--color-surface);
}

/* Role pills */
.role-pills {
  display: flex;
  gap: 0.5rem;
}

.role-pill {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-slate);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.role-pill:hover {
  border-color: var(--color-navy);
  background: rgba(30, 58, 138, 0.05);
  color: var(--color-navy);
}

.role-pill.active {
  border-color: var(--color-navy);
  background: var(--color-navy);
  color: white;
}

/* Jurisdiction selector */
.intro-jurisdiction {
  margin-bottom: 0;
}

.intro-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-slate);
  margin-bottom: 0.5rem;
}

.intro-select {
  width: 100%;
  padding: 0.75rem 1rem;
}

.intro-jurisdiction-note {
  font-size: 0.75rem;
  color: var(--color-slate-light);
  margin: 0.5rem 0 0 0;
}

/* Jurisdiction badge */
.jurisdiction-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--color-navy);
}

.jurisdiction-badge.hidden {
  display: none;
}

.jurisdiction-badge-text {
  font-weight: 500;
}

/* Jurisdiction settings panel (simple) */
.jurisdiction-settings-panel {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-slate);
}

.jurisdiction-settings-panel strong {
  color: var(--color-navy);
}

/* Jurisdiction tailoring (Screen 1 - dynamic) */
.jurisdiction-tailoring-placeholder {
  transition: opacity 0.2s ease;
}

.jurisdiction-tailoring-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #7dd3fc;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.jurisdiction-tailoring-header {
  margin-bottom: 1rem;
}

.jurisdiction-tailoring-badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0369a1;
  background: #bae6fd;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.jurisdiction-tailoring-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .jurisdiction-tailoring-grid { grid-template-columns: 1fr; }
}

.jurisdiction-tailoring-section {
  background: white;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  border: 1px solid #e0f2fe;
}

.jurisdiction-tailoring-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-navy);
  margin: 0 0 0.5rem 0;
}

.jurisdiction-tailoring-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-slate);
}

.jurisdiction-tailoring-list li {
  padding: 0.125rem 0;
}
.jurisdiction-tailoring-list li::before {
  content: "• ";
  color: var(--color-navy-light);
}

.jurisdiction-tailoring-text {
  font-size: 0.8125rem;
  color: var(--color-slate);
  margin: 0;
  line-height: 1.45;
}

.jurisdiction-tailoring-strategy {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-slate);
}

.jurisdiction-tailoring-strategy li {
  padding: 0.25rem 0;
}

/* Case facts modal (Screen 1) */
.case-facts-modal {
  backdrop-filter: blur(2px);
}
.case-facts-modal.hidden {
  display: none !important;
}
.case-facts-modal:not(.hidden) {
  display: flex;
}

/* GEMA protocol modal */
#gema-modal.hidden {
  display: none !important;
}
#gema-modal:not(.hidden) {
  display: flex;
}

/* Case law ticker - blue theme per spec */
.case-law-ticker {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.case-law-ticker-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.case-law-ticker-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e3a8a;
}


.case-law-ticker-content {
  font-size: 0.875rem;
  color: #1e40af;
}

.case-law-ticker-content div {
  margin-bottom: 0.25rem;
}

.case-law-ticker-content div:last-child {
  margin-bottom: 0;
}

/* Evidence sources connected */
.evidence-source-tag {
  font-size: 0.75rem;
  background: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  color: var(--color-slate);
}

/* Artifact cards */
.artifact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.artifact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.artifact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.artifact-card-icon-wrap {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artifact-card-icon {
  width: 1rem;
  height: 1rem;
  color: var(--color-navy);
}

.artifact-card-body {
  min-width: 0;
}

.artifact-card-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-slate);
}

.artifact-card-meta {
  font-size: 0.6875rem;
  color: var(--color-slate);
  margin-top: 0.25rem;
  opacity: 0.9;
}

/* Continue button */
.btn-continue {
  animation: pulse-subtle 2.5s ease-in-out infinite;
}

@keyframes pulse-subtle {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(30, 58, 138, 0); }
}

@media (max-width: 1024px) {
  .intro-split {
    flex-direction: column;
  }

  .artifact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ========================================
   Screen 2: Motion-Led Navigator
   ======================================== */
.motion-nav-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: calc(100vh - 14rem);
}

.motion-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.motion-nav-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.motion-nav-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-slate);
}

.motion-selector-dropdown {
  min-width: 20rem;
}

.motion-select {
  min-width: 280px;
}

.motion-nav-top-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.jurisdictional-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.jurisdictional-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(30, 58, 138, 0.1);
  color: var(--color-navy);
  white-space: nowrap;
}

.jurisdictional-badge:hover {
  background: rgba(30, 58, 138, 0.18);
}

.motion-nav-role {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-navy);
}

.motion-nav-columns {
  display: grid;
  grid-template-columns: 25% 50% 25%;
  gap: 1.5rem;
  flex: 1;
  min-height: 0;
}

.motion-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.motion-col-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 1rem;
}

/* Legal elements */
.legal-elements-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.legal-element-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 0.25rem;
  position: relative;
  padding-right: 2.5rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.legal-element-card:hover {
  border-color: var(--color-navy);
  background: var(--color-bg);
}

.legal-element-card.active {
  border-color: var(--color-navy);
  background: rgba(30, 58, 138, 0.05);
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2);
}

.legal-element-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.legal-element-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-full);
}

.legal-element-tag-brutal {
  background: #fee2e2;
  color: #991b1b;
}

.legal-element-tag-complex {
  background: #fef3c7;
  color: #92400e;
}

.legal-element-tag-technical {
  background: #dbeafe;
  color: #1e40af;
}

.legal-element-tag-multi-tenant {
  background: #e0e7ff;
  color: #3730a3;
}

.legal-element-subtitle {
  font-size: 0.6875rem;
  color: var(--color-slate);
}

.legal-element-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.legal-element-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--color-border);
  color: var(--color-slate);
}

/* Proportionality Calculator */
.proportionality-calc {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-top: 1.5rem;
}

.proportionality-calc-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-slate);
  margin: 0 0 0.5rem;
}

.proportionality-chart {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.proportionality-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.proportionality-label {
  flex: 0 0 5rem;
  color: var(--color-slate);
}

.proportionality-bar-track {
  flex: 1;
  height: 1.25rem;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  min-width: 0;
}

.proportionality-bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: white;
  min-width: 2rem;
}

.proportionality-bar-manual {
  background: var(--color-amber);
}

.proportionality-bar-hash {
  background: var(--color-emerald);
}

.proportionality-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.proportionality-value { font-weight: 500; }
.proportionality-value-emerald { color: var(--color-emerald); font-weight: 600; }

.proportionality-note {
  font-size: 0.75rem;
  color: var(--color-slate-light);
}

/* Hash Match Visualization */
.hash-match-viz {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hash-upload-zone {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.hash-upload-text {
  font-size: 0.875rem;
  color: var(--color-slate-light);
  margin-bottom: 1rem;
}

.hash-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hash-flowchart {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

.hash-flowchart-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
}

.hash-flowchart-box i {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.hash-flowchart-input {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.hash-flowchart-hash {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.hash-flowchart-match {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.hash-flowchart-arrow {
  width: 2rem;
  height: 1rem;
  color: var(--color-slate);
}

.hash-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-slate-light);
}

.hash-flow-arrow {
  color: var(--color-slate);
  font-weight: 600;
}

/* Trade Secret Balancer */
.trade-secret-balancer {
  background: rgba(217, 119, 6, 0.08);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
}

.trade-secret-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #92400e;
  margin: 0 0 0.5rem;
}

.trade-secret-body {
  font-size: 0.875rem;
}

.trade-secret-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.trade-secret-item:last-child { margin-bottom: 0; }

.trade-secret-item i {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
}

.trade-secret-ordered i { color: var(--color-emerald); }
.trade-secret-protected i { color: var(--color-ruby); }

/* Generate Motion Package */
.btn-generate-motion {
  width: 100%;
  padding: 1rem 1.5rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-emerald);
  border-color: var(--color-emerald);
}

.btn-generate-motion:hover {
  background: #047857;
  border-color: #047857;
}

/* Evidence panel */
.evidence-panel {
  flex: 1;
  overflow-y: auto;
}

.evidence-placeholder {
  font-size: 0.875rem;
  color: var(--color-slate-light);
  padding: 2rem;
  text-align: center;
}

.evidence-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.evidence-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.evidence-have .evidence-section-title { color: var(--color-emerald); }
.evidence-partial .evidence-section-title { color: var(--color-amber); }
.evidence-gap .evidence-section-title { color: var(--color-ruby); }

.evidence-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.evidence-col-header .motion-col-title {
  margin: 0;
}

#rfp-draft-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.evidence-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.evidence-card {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  cursor: default;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.evidence-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.evidence-card-have {
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.evidence-card-partial {
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.evidence-card-gap {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.evidence-card-text {
  margin-bottom: 0.25rem;
}

.evidence-card-source {
  font-size: 0.75rem;
  color: var(--color-slate-light);
}

/* Adversarial sections */
.adversarial-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

.adversarial-section {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.adversarial-opposing {
  background: var(--color-bg);
}

.adversarial-counter {
  background: var(--color-surface);
}

.adversarial-discovery {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.2);
}

.adversarial-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-light);
  margin-bottom: 0.5rem;
}

.adversarial-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-slate);
  margin: 0;
}

/* Bottom nav */
.motion-nav-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 1024px) {
  .motion-nav-columns {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Screen 3: Training Data Provenance Chain
   ======================================== */
.provenance-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 72rem;
  margin: 0 auto;
}

.provenance-header {
  padding: 1.5rem;
}

.provenance-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 0.5rem 0;
}

.provenance-subtitle {
  font-size: 1rem;
  color: var(--color-slate);
  margin: 0;
}

.provenance-main {
  padding: 2rem;
}

.provenance-timeline-bar {
  position: relative;
  margin-bottom: 3rem;
}

.provenance-timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-border);
  transform: translateY(-50%);
}

.provenance-timeline-stages {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.timeline-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.timeline-stage:hover {
  opacity: 0.9;
}

.timeline-stage.active .stage-marker {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.timeline-stage.active .stage-label {
  font-weight: 600;
  color: var(--color-navy);
}

.stage-marker {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stage-marker-blue { background: #3b82f6; color: white; }
.stage-marker-purple { background: #a855f7; color: white; }
.stage-marker-amber { background: var(--color-amber); color: white; }
.stage-marker-red { background: var(--color-ruby); color: white; }

.stage-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-slate);
}

.stage-date {
  font-size: 0.75rem;
  color: var(--color-slate-light);
}

.stage-details {
  position: relative;
  min-height: 12rem;
}

.stage-content {
  display: none;
}

.stage-content.active {
  display: block;
  animation: stageFadeIn 0.2s ease;
}

@keyframes stageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.stage-content-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
}

.stage-title-blue { color: #1e40af; }
.stage-title-purple { color: #6b21a8; }
.stage-title-amber { color: #92400e; }
.stage-title-red { color: #991b1b; }

.stage-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.stage-content-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.stage-content-card-emerald {
  border-color: rgba(5, 150, 105, 0.4);
  background: rgba(5, 150, 105, 0.06);
}

.stage-content-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-slate);
  margin: 0 0 0.75rem 0;
}

.stage-title-emerald { color: #065f46; }

.stage-content-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.stage-content-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.stage-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stage-bullet-blue { background: #3b82f6; }
.stage-bullet-purple { background: #a855f7; }
.stage-bullet-amber { background: var(--color-amber); }
.stage-bullet-red { background: var(--color-ruby); }

.stage-content-stats { margin-top: 0.5rem; }
.stage-stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.stage-content-p {
  font-size: 0.9375rem;
  color: var(--color-slate);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.stage-evidence-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-slate);
  margin: 0 0 0.75rem 0;
}

.stage-evidence-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

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

.provenance-evidence-card {
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 1px solid;
}

.provenance-evidence-blue { border-color: rgba(59, 130, 246, 0.5); }
.provenance-evidence-emerald { border-color: rgba(5, 150, 105, 0.4); }
.provenance-evidence-red { border-color: rgba(220, 38, 38, 0.4); }

.provenance-evidence-icon { font-size: 1.25rem; margin-bottom: 0.5rem; }
.provenance-evidence-blue .provenance-evidence-icon { color: #2563eb; }
.provenance-evidence-emerald .provenance-evidence-icon { color: var(--color-emerald); }
.provenance-evidence-red .provenance-evidence-icon { color: var(--color-ruby); }

.provenance-evidence-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-navy);
}

.provenance-evidence-meta {
  font-size: 0.75rem;
  color: var(--color-slate-light);
  margin-top: 0.25rem;
}

.provenance-ai-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.provenance-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 1rem 0;
}

.provenance-ai-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.provenance-ai-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.provenance-ai-name { font-weight: 500; color: var(--color-navy); }
.provenance-ai-desc { font-size: 0.875rem; color: var(--color-slate); }

.badge-purple {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(147, 51, 234, 0.15);
  color: #6b21a8;
}

.provenance-ai-body { font-size: 0.875rem; color: var(--color-slate); }
.provenance-ai-bullet { margin-bottom: 0.5rem; }
.provenance-ai-tip { font-size: 0.75rem; color: var(--color-slate-light); margin-top: 0.75rem; }

.provenance-security-section {
  background: linear-gradient(to right, rgba(30, 58, 138, 0.04), rgba(71, 85, 105, 0.04));
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  padding: 2rem;
}

.provenance-security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

.provenance-security-card {
  padding: 1.25rem;
}

.provenance-security-icon { font-size: 1.25rem; margin-bottom: 0.5rem; }
.provenance-security-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0 0 0.5rem 0;
}

.provenance-security-p {
  font-size: 0.875rem;
  color: var(--color-slate);
  margin: 0;
  line-height: 1.5;
}

.provenance-nav-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 1.5rem;
}

/* Screen 3 Redesign Styles */

/* Timeline Stages */
.timeline-stage {
  text-align: center;
  position: relative;
  width: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.timeline-stage:hover .stage-marker {
  transform: scale(1.1);
}

.timeline-stage:hover .stage-label {
  color: #1E3A8A;
}

.stage-marker {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  transition: transform 0.3s ease;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stage-label {
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.stage-date {
  font-size: 12px;
  color: #94A3B8;
}

/* Active stage */
.timeline-stage.active .stage-marker {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.timeline-stage.active .stage-label {
  color: #1E3A8A;
  font-weight: 700;
}

/* Stage Content */
.stage-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.stage-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Evidence Cards */
.evidence-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.evidence-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Screen 3: System Evidence Graph (legacy)
   ======================================== */
.graph-layout {
  display: grid;
  grid-template-columns: 200px 1fr 0px;
  gap: 1.5rem;
  min-height: calc(100vh - 14rem);
}

.graph-layout.details-open {
  grid-template-columns: 200px 1fr 320px;
}

.graph-sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.graph-sidebar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0 0 0.5rem 0;
}

.graph-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.graph-timeline li {
  padding: 0.5rem 0;
  border-left: 2px solid var(--color-border);
  padding-left: 0.75rem;
  margin-left: 0.25rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.graph-timeline li:hover,
.graph-timeline li.highlighted {
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.graph-timeline-date {
  display: block;
  color: var(--color-slate-light);
  font-size: 0.6875rem;
}

.graph-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.legend-symbol {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.legend-data {
  border-radius: 50%;
  background: #2563EB;
}

.legend-model {
  background: #7C3AED;
}

.legend-event {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: #D97706;
}

.legend-risk {
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  background: #DC2626;
}

.legend-ai-logs {
  border-radius: 50%;
  background: #6366f1;
}

.legend-training-hashed {
  border-radius: 50%;
  background: #14b8a6;
  border: 2px solid #5eead4;
}

.graph-instructions {
  font-size: 0.75rem;
  color: var(--color-slate-light);
  margin-top: auto;
}

.graph-center {
  min-height: 400px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.graph-container-mock {
  position: relative;
  width: 100%;
  height: 24rem;
  min-height: 24rem;
  background: linear-gradient(to bottom right, #f8fafc, #eff6ff);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.graph-mock-nodes {
  position: absolute;
  inset: 0;
}

.graph-mock-node {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.graph-mock-node:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.graph-mock-node.highlighted {
  box-shadow: 0 0 0 3px var(--color-navy);
}

.graph-mock-node-teal {
  top: 25%;
  left: 25%;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: #14b8a6;
  border: 2px solid #5eead4;
}

.graph-mock-node-indigo {
  top: 33%;
  right: 33%;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: #6366f1;
}

.graph-mock-node-secure {
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #a855f7;
}

.graph-mock-node-secure.pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.85; transform: translateX(-50%) scale(1.05); }
}

.graph-svg-container {
  width: 100%;
  height: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#graph-svg {
  max-width: 100%;
  height: auto;
}

.graph-node-svg {
  cursor: pointer;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.graph-node-svg:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.graph-node-svg.highlighted {
  filter: drop-shadow(0 0 0 2px var(--color-navy));
}

.graph-node-svg.pulse-risk {
  animation: risk-pulse 2s ease-in-out infinite;
}

@keyframes risk-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.graph-node-svg.pulse-risk:hover {
  animation: none;
  transform: scale(1.08);
}

.graph-node-svg.pulse-border circle,
.graph-node-svg.pulse-border rect {
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% { stroke-width: 2px; }
  50% { stroke-width: 5px; }
}

@keyframes graphNodeAppear {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

/* Right sidebar - node details */
.graph-sidebar-right {
  overflow: hidden;
  transition: width var(--transition-slow), grid-column var(--transition-slow);
}

.graph-details-panel {
  display: none;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.graph-layout.details-open .graph-details-panel {
  display: flex;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.graph-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.graph-details-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.graph-details-close {
  padding: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-slate);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.graph-details-close:hover {
  background: var(--color-bg);
  color: var(--color-navy);
}

.graph-details-content {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

.graph-details-content h4 {
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
}

.detail-risk-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.detail-risk-badge.high {
  background: rgba(217, 119, 6, 0.15);
  color: var(--color-amber);
}

.detail-risk-badge.critical {
  background: rgba(220, 38, 38, 0.15);
  color: var(--color-ruby);
}

.detail-description {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-slate);
  margin: 0 0 1rem 0;
}

.detail-section {
  margin-bottom: 1rem;
}

.detail-security-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detail-security-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-slate);
}

.detail-security-badge {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(5, 150, 105, 0.15);
  color: #047857;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.detail-security-badge i {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.security-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  margin-top: 0.25rem;
}

.security-tag-airgap {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
}

.security-tag i {
  width: 0.75rem;
  height: 0.75rem;
}

.motion-package-icon-lock {
  background: rgba(5, 150, 105, 0.2);
}

.motion-package-icon-lock i {
  width: 1rem;
  height: 1rem;
}

.detail-hash-row {
  font-size: 0.875rem;
}

.detail-hash-label {
  font-weight: 500;
  margin-right: 0.25rem;
}

.detail-section h5 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-light);
  margin: 0 0 0.5rem 0;
}

.detail-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.detail-section li {
  padding: 0.25rem 0;
}

.detail-section li::before {
  content: "• ";
  color: var(--color-navy);
}

.graph-nav-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 1024px) {
  .graph-layout {
    grid-template-columns: 1fr;
  }

  .graph-layout.details-open {
    grid-template-columns: 1fr;
  }

  .graph-layout.details-open .graph-details-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 320px;
    z-index: 10;
  }
}

/* ========================================
   Screen 4: Technical-to-Legal Translator
   ======================================== */
.translator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  min-height: calc(100vh - 16rem);
}

.translator-left,
.translator-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.translator-right {
  overflow-y: auto;
}

.translator-header {
  margin-bottom: 1rem;
}

.translator-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0 0 0.75rem 0;
}

.translator-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.translator-select {
  flex: 1;
  min-width: 18rem;
}

.translator-format-toggle {
  display: flex;
  gap: 0.25rem;
}

.translator-format-btn.active {
  background: var(--color-navy);
  color: white;
  border-color: var(--color-navy);
}

.translator-code-container {
  flex: 1;
  min-height: 0;
  background: #1e293b;
  border-radius: var(--radius-md);
  overflow: auto;
  border: 1px solid var(--color-border);
}

.translator-code {
  margin: 0;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre;
}

.translator-code-reveal {
  animation: translatorCodeReveal 0.5s ease;
}

@keyframes translatorCodeReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.translator-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.translator-tab {
  padding: 0.75rem 1rem;
}

.translator-panel {
  flex: 1;
  overflow-y: auto;
}

.translator-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.translator-bullets li {
  padding: 0.5rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.translator-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-navy);
}

.legal-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.legal-section {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.legal-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem 0;
}

.legal-supports {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.2);
}

.legal-supports .legal-section-title { color: var(--color-emerald); }

.legal-does-not {
  background: var(--color-bg);
}

.legal-does-not .legal-section-title { color: var(--color-slate-light); }

.legal-opposing {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.2);
}

.legal-opposing .legal-section-title { color: var(--color-amber); }

.legal-questions {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
}

.legal-questions .legal-section-title { color: #2563EB; }

.jurisdiction-analysis-section {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-top: 1rem;
}

.jurisdiction-analysis-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #581c87;
  margin: 0 0 0.5rem 0;
}

.jurisdiction-analysis-text {
  font-size: 0.875rem;
  color: #6b21a8;
  margin: 0;
  line-height: 1.5;
}

.expert-declaration-section {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-top: 1rem;
}

.expert-declaration-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #92400e;
  margin: 0 0 0.5rem 0;
}

.expert-declaration-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.6;
}

.expert-declaration-list li {
  margin-bottom: 0.25rem;
}

.expert-declaration-list li:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.legal-section li {
  padding: 0.25rem 0;
}

.translator-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.translator-confidence {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 280px;
}

.translator-confidence-label {
  font-size: 0.875rem;
  color: var(--color-slate);
}

.translator-confidence-value {
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 4rem;
}

.translator-confidence-bar {
  flex: 1;
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.translator-confidence-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.translator-confidence-fill.conf-high {
  background: var(--color-emerald);
}

.translator-confidence-fill.conf-medium {
  background: var(--color-amber);
}

.translator-confidence-fill.conf-low {
  background: var(--color-ruby);
}

.translator-nav {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 1024px) {
  .translator-layout {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Screen 5: Motion-Ready Output Zone
   ======================================== */
.conclusion-layout {
  max-width: 72rem;
  margin: 0 auto;
}

.motion-output-header {
  margin-bottom: 2rem;
}

.motion-output-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 0.5rem 0;
}

.motion-output-subtitle {
  font-size: 1rem;
  color: var(--color-slate);
  margin: 0;
}

.conclusion-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.conclusion-col {
  min-width: 0;
}

.conclusion-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0 0 1rem 0;
}

/* Motion Package Preview - Layered stack */
.motion-package-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-top: 0.75rem;
}

.motion-package-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid rgba(5, 150, 105, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  position: relative;
  z-index: 1;
  margin-bottom: -0.5rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.motion-package-card:hover {
  z-index: 2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
}

.motion-package-card:nth-child(1) { z-index: 5; margin-left: 0; }
.motion-package-card:nth-child(2) { z-index: 4; margin-left: 6px; }
.motion-package-card:nth-child(3) { z-index: 3; margin-left: 12px; }
.motion-package-card:nth-child(4) { z-index: 2; margin-left: 18px; }
.motion-package-card:nth-child(5) { z-index: 1; margin-left: 24px; }

.motion-package-card-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.motion-package-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.motion-package-card-title {
  font-weight: 500;
  color: var(--color-navy);
}

.motion-package-card-meta {
  font-size: 0.75rem;
  color: var(--color-slate-light);
  margin-top: 0.125rem;
}

.motion-package-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(5, 150, 105, 0.15);
  color: #047857;
}

/* Export Options */
.export-options {
  display: flex;
  flex-direction: column;
}

.export-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.export-btn-primary {
  width: 100%;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.export-btn {
  width: 100%;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-width: 2px;
}

.export-btn:hover,
.export-btn-primary:hover {
  transform: none;
}

.export-note {
  font-size: 0.75rem;
  color: var(--color-slate-light);
  text-align: center;
  margin: 1rem 0 0 0;
}

.governance-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.governance-col-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-light);
  margin: 0 0 0.5rem 0;
}

.governance-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.governance-column li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.governance-allowed li {
  color: var(--color-emerald);
}

.governance-allowed li i {
  color: var(--color-emerald);
  flex-shrink: 0;
}

.governance-blocked li {
  color: var(--color-slate);
}

.governance-blocked li i {
  color: var(--color-ruby);
  flex-shrink: 0;
}

.blocked-item {
  cursor: help;
}

.governance-note {
  font-size: 0.8125rem;
  color: var(--color-slate-light);
  margin: 1rem 0 0 0;
  font-style: italic;
}

.query-example {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.query-box {
  padding: 1rem 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-slate);
}

.query-box code {
  background: none;
  padding: 0;
}

.answer-card {
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.answer-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-slate);
}

/* Audit trail */
.audit-trail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  margin-bottom: 2rem;
}

.audit-trail.expanded {
  max-height: 400px;
}

.audit-trail-content {
  padding: 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.audit-trail-content h4 {
  font-size: 1rem;
  margin: 0 0 1rem 0;
}

.audit-trail-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
}

.audit-trail-dl dt {
  font-weight: 500;
  color: var(--color-navy);
}

.audit-trail-dl dd {
  margin: 0;
  color: var(--color-slate);
}

/* CTA */
.conclusion-cta {
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.04) 0%, transparent 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.cta-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
}

.cta-subtitle {
  font-size: 1.125rem;
  color: var(--color-slate);
  margin: 0 auto 2rem;
  max-width: 42rem;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  text-decoration: none;
}

.conclusion-nav {
  display: flex;
  justify-content: flex-start;
}

.conclusion-reveal {
  opacity: 0;
  animation: conclusionReveal 0.5s ease forwards;
}

.conclusion-top.conclusion-reveal { animation-delay: 0.1s; }
.conclusion-cta.conclusion-reveal { animation-delay: 0.2s; }

@keyframes conclusionReveal {
  to { opacity: 1; }
}

@media (max-width: 1024px) {
  .conclusion-top {
    grid-template-columns: 1fr;
  }

  .governance-list {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
}

/* ========================================
   Auth Gate (Netlify Identity)
   ======================================== */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(135deg, #172554 0%, #1e3a8a 50%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-gate.hidden {
  display: none !important;
}
.auth-gate-content {
  text-align: center;
  color: white;
  padding: 3rem;
  max-width: 24rem;
}
.auth-gate-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.auth-gate-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.auth-gate-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}
.auth-login-btn {
  background: white !important;
  color: #1e3a8a !important;
  border: none !important;
}
.auth-login-btn:hover {
  background: #f1f5f9 !important;
  color: #172554 !important;
}

@media (max-width: 768px) {
  .slide-panel {
    max-width: 100%;
  }

  h1 { font-size: 1.5rem; }
}
