/* ==========================================================================
   AegisDoc Design System — Enterprise Fintech & Cybersecurity
   High-Trust Light Neutral Aesthetic with Integrated 4-Operations Engine
   ========================================================================== */

:root {
  /* Core Palette */
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #2563eb;
  
  --color-primary: #1e40af;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-primary-border: #bfdbfe;
  
  --color-success: #059669;
  --color-success-light: #ecfdf5;
  --color-success-border: #a7f3d0;
  
  --color-warning: #d97706;
  --color-warning-light: #fffbeb;
  --color-warning-border: #fde68a;
  
  --color-danger: #dc2626;
  --color-danger-light: #fef2f2;
  --color-danger-border: #fecaca;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Base Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: #ffffff;
  border: 1px solid var(--color-primary-hover);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* ==========================================================================
   Top Navigation Header
   ========================================================================== */
.top-navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  min-height: 64px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  gap: 16px;
}

.nav-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-dashboard-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #1e293b;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}
.nav-dashboard-toggle-btn:hover {
  background: #1e293b;
  border-color: #334155;
  color: #38bdf8;
  transform: translateY(-1px);
}
.nav-dashboard-toggle-btn svg {
  color: #38bdf8;
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .nav-dashboard-toggle-btn .btn-text {
    display: none;
  }
  .nav-dashboard-toggle-btn {
    padding: 7px 9px;
  }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}
.nav-logo-icon {
  width: 34px;
  height: 34px;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(30, 64, 175, 0.25);
  flex-shrink: 0;
}
.nav-brand-text {
  display: flex;
  flex-direction: column;
}
.nav-brand-title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.nav-brand-tagline {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}
.nav-brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-primary-border);
  text-transform: uppercase;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 6px;
}
@media (min-width: 990px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  padding: 6px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  cursor: pointer;
}
.nav-link:hover {
  color: var(--color-primary);
  background: var(--bg-subtle);
}
.nav-link.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 750;
}

.mobile-menu-btn {
  display: flex;
}
@media (min-width: 990px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* ==========================================================================
   ENTERPRISE DASHBOARD SLIDE BAR (OFF-CANVAS DRAWER)
   ========================================================================== */
.slidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.slidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.dashboard-slidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 360px;
  max-width: 88vw;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid var(--border-medium);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.dashboard-slidebar.open {
  transform: translateX(0);
}

/* Slide Bar Header */
.slidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #0f172a;
  color: #ffffff;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}
.slidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.slidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: #2563eb;
  color: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}
.slidebar-title {
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}
.slidebar-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.slidebar-close-btn {
  width: 32px;
  height: 32px;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.slidebar-close-btn:hover {
  background: #334155;
  color: #ffffff;
}

/* Active Document Live Widget inside Slide Bar */
.slidebar-doc-widget {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.sd-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.sd-widget-label {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.sd-widget-status {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
  letter-spacing: 0.04em;
}
.sd-widget-status.flagged {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}
.sd-widget-status.authentic {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}
.sd-widget-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sd-doc-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.sd-doc-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.sd-doc-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sd-doc-name {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.sd-doc-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.slidebar-action-btn {
  font-size: 0.72rem;
  padding: 6px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Slide Bar Nav Body (Scrollable) */
.slidebar-nav-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.slidebar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.slidebar-group-title {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 2px;
}
.slidebar-group-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.slidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}
.slidebar-link:hover {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--color-primary);
}
.slidebar-link.active {
  background: var(--color-primary-light);
  border-color: var(--color-primary-border);
  color: var(--color-primary);
}
.sb-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.slidebar-link:hover .sb-icon,
.slidebar-link.active .sb-icon {
  background: var(--color-primary);
  color: #ffffff;
}
.sb-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.sb-title {
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.25;
}
.sb-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-badge {
  font-size: 0.64rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.slidebar-link.active .sb-badge {
  background: var(--color-primary);
  color: #ffffff;
}

/* Slide Bar Footer */
.slidebar-footer {
  padding: 12px 18px;
  background: #0f172a;
  border-top: 1px solid #1e293b;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sb-telemetry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: #94a3b8;
}
.sb-telemetry-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.sb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}
.sb-dot.live {
  box-shadow: 0 0 6px #10b981;
}
.sb-footer-copy {
  font-size: 0.64rem;
  color: #64748b;
  text-align: center;
}

/* ==========================================================================
   APP PAGE VIEW ROUTING ARCHITECTURE
   ========================================================================== */
.app-page {
  display: none;
  opacity: 0;
  min-height: calc(100vh - 130px);
}
.app-page.active-page {
  display: block;
  opacity: 1;
  animation: pageFadeIn 0.2s ease-out;
}
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  background: #ffffff;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nav-icon-btn:hover {
  background: #f8fafc;
  color: var(--color-primary);
}
.nav-icon-btn.listening {
  background: #fef2f2;
  border-color: var(--color-danger);
  color: var(--color-danger);
  animation: pulseMic 1.5s infinite;
}
@keyframes pulseMic {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.bridge-status-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.bridge-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
}
.bridge-status-pill.paired .bridge-indicator {
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

/* ==========================================================================
   Primary Workspace Container
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Operations Toolbar (Top Action Bar) */
.operations-toolbar {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toolbar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-title-group h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.toolbar-title-group p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.upload-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 4 Operations Selector Buttons */
.operations-selector-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.op-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.op-select-btn:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}
.op-select-btn.active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.op-select-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}
.op-select-btn.active .op-select-dot {
  background: var(--color-primary);
}

/* Persistent Active Document State HUD */
.active-doc-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  margin-top: 6px;
}

.doc-hud-items {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.doc-hud-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-hud-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.doc-hud-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-hud-val.mono {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--color-primary);
}

.doc-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #ecfdf5;
  border: 1px solid #10b981;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  color: #065f46;
  letter-spacing: 0.05em;
}

.hud-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.benchmark-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.benchmark-select {
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
}
.benchmark-select:focus {
  border-color: var(--color-primary);
}

/* ==========================================================================
   Main Workspace Layout (Canvas + Risk HUD)
   ========================================================================== */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
@media (min-width: 900px) {
  .workspace-grid {
    grid-template-columns: 7fr 5fr;
  }
}

/* Left Panel: Viewport */
.viewport-panel {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.viewfinder-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #090d16;
  border: 1px solid var(--border-medium);
}
.viewfinder-wrapper canvas {
  width: 100%;
  display: block;
}
.viewfinder-wrapper video {
  width: 100%;
  display: none;
}

.camera-guidelines {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  bottom: 24px;
  border: 2px dashed #38bdf8;
  border-radius: var(--radius-sm);
  pointer-events: none;
  display: none;
}

.region-highlight-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.view-mode-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}
.view-btn {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-medium);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.view-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* Right Panel: Risk HUD */
.hud-panel {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.hud-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.hud-latency {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 4px;
}

.score-display-box {
  text-align: center;
  padding: 16px 0;
}
.risk-number-large {
  font-size: 3.8rem;
  font-weight: 900;
  color: var(--color-danger);
  line-height: 1;
  font-family: var(--font-mono);
}
.risk-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-top: 10px;
  background: var(--color-danger-light);
  color: var(--color-danger);
  border: 1px solid var(--color-danger-border);
}
.risk-badge.risk-low, .risk-badge.verdict-original {
  background: var(--color-success-light);
  color: var(--color-success);
  border-color: var(--color-success-border);
}
.risk-badge.risk-medium, .risk-badge.verdict-inconclusive {
  background: var(--color-warning-light);
  color: var(--color-warning);
  border-color: var(--color-warning-border);
}
.risk-badge.risk-high, .risk-badge.verdict-forged {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border-color: var(--color-danger-border);
}

/* Quality Status Banner (Section 12: Image Quality Check) */
.quality-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid var(--border-medium);
  background: var(--bg-subtle);
}
.quality-status-banner.quality-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.quality-status-banner.quality-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

/* Top Section "Why?" Key Drivers Summary (Section 18) */
.why-drivers-box {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  text-align: left;
}
.why-drivers-title {
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.why-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.why-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.why-tag.clean {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

/* Evidence-Based Additive Points Breakdown Table (Section 6) */
.evidence-breakdown-card {
  margin-top: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow: hidden;
}
.evidence-header {
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}
.evidence-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.74rem;
  border-bottom: 1px solid var(--border-subtle);
}
.evidence-row:last-child {
  border-bottom: none;
}
.evidence-row.total-row {
  background: #f8fafc;
  font-weight: 800;
}
.evidence-pts {
  font-family: var(--font-mono);
  font-weight: 800;
}
.evidence-pts.flagged {
  color: var(--color-danger);
}
.evidence-pts.passed {
  color: var(--color-success);
}

/* Legal & Forensic Disclaimer Box (Section 10) */
.disclaimer-box {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-left: 3px solid #64748b;
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: left;
}

/* ==========================================================================
   THE 4 OPERATIONS REAL-TIME VALIDATION MATRIX
   ========================================================================== */
.matrix-section {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.matrix-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.matrix-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 680px) {
  .matrix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1040px) {
  .matrix-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.operation-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.operation-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.operation-card.flagged {
  border-color: var(--color-danger);
  background: #fff8f8;
}
.operation-card.passed {
  border-color: var(--color-success-border);
  background: #f6fdf9;
}
.operation-card.selected-op {
  border-width: 2px;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25), var(--shadow-md);
}

.op-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.op-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
}
.op-status-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}
.op-status-pill.flagged {
  background: var(--color-danger);
  color: #ffffff;
}
.op-status-pill.passed {
  background: var(--color-success);
  color: #ffffff;
}
.op-status-pill.inconclusive {
  background: #f59e0b;
  color: #ffffff;
}
.operation-card.inconclusive {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.04);
}
.active-badge.inconclusive-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.op-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.op-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}
.op-metric {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.04);
  padding: 4px 6px;
  border-radius: var(--radius-xs);
}

/* ==========================================================================
   Forensic Diff & Inspector Cards
   ========================================================================== */
.inspector-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}
.inspector-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.diff-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.diff-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.84rem;
  border-bottom: 1px dashed var(--border-subtle);
}
.diff-before {
  color: var(--text-muted);
  text-decoration: line-through;
}
.diff-after {
  color: var(--color-danger);
  font-weight: 800;
}

/* ==========================================================================
   Before / After Comparison Slider
   ========================================================================== */
.slider-container {
  position: relative;
  width: 100%;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  user-select: none;
}
.slider-image-wrapper {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
}
.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.slider-img.overlay {
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  transition: clip-path 0.05s ease;
}
.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--color-primary);
  cursor: ew-resize;
  z-index: 30;
  box-shadow: 0 0 10px rgba(30, 64, 175, 0.4);
}
.slider-handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

/* ==========================================================================
   Tamper Challenge
   ========================================================================== */
.challenge-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 16px;
}
@media (min-width: 720px) {
  .challenge-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.challenge-card {
  background: #ffffff;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.challenge-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
}
.challenge-card.correct {
  border-color: var(--color-success);
  background: var(--color-success-light);
}
.challenge-card.wrong {
  border-color: var(--color-danger);
  background: var(--color-danger-light);
}

/* Suspicious Bounding Box Overlays */
.suspicious-box {
  position: absolute;
  border: 2px solid var(--color-danger);
  background: rgba(220, 38, 38, 0.2);
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s ease;
}
.suspicious-box.selected {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}
.suspicious-box .box-tag {
  position: absolute;
  top: -22px;
  left: -2px;
  background: var(--color-danger);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 2px;
  white-space: nowrap;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open {
  display: flex;
}

/* Verification Audit Certificate Modal (Section 19 & 30) */
.cert-modal-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.4);
  position: relative;
  color: var(--text-primary);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

.cert-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-subtle);
  margin-bottom: 20px;
}
.cert-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.cert-subhead {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--color-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

.close-modal-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  background: var(--bg-base);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.close-modal-btn:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border-color: var(--color-danger-border);
  transform: scale(1.05);
}

.cert-details-list {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border-subtle);
}
.cert-row:last-child {
  border-bottom: none;
}
.cert-row span {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.82rem;
}
.cert-row strong {
  color: var(--text-primary);
  font-weight: 800;
}
.cert-row strong.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.cert-rationale-box {
  background: #f1f5f9;
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-xs);
  padding: 12px 16px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.cert-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* Office Kit Bridge Modal Card */
.bridge-modal-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.4);
  position: relative;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.bridge-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.bridge-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}
.bridge-modal-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 16px;
}
.bridge-pin-input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  text-transform: uppercase;
  margin-top: 6px;
  background: var(--bg-base);
  color: var(--text-primary);
  outline: none;
}
.bridge-pin-input:focus {
  border-color: var(--color-primary);
  background: #ffffff;
}
.bridge-status-mono {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SECTION 1: LANDING HERO & TRUST INDICATORS
   ========================================================================== */
.landing-hero {
  padding: 40px 0 60px 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-layout {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary-border);
  color: var(--color-primary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
  animation: pulseDot 2s infinite ease-in-out;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-headline {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.hero-subtext {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 28px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.hero-btn {
  padding: 12px 24px;
  font-size: 0.92rem;
}

/* Hero Trust Assurance Badges */
.hero-trust-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}
.hero-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}
.hero-trust-pill:hover {
  border-color: var(--color-primary-border);
  color: var(--color-primary);
  background: #f8fafc;
}
.hero-trust-pill svg {
  flex-shrink: 0;
}

/* ==========================================================================
   ENTERPRISE CAPABILITIES SECTION (Full Width 4-Column Balanced Grid)
   ========================================================================== */
.hero-capabilities-section {
  padding: 38px 0 54px 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 640px) {
  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .capabilities-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.cap-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.cap-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-border);
}
.cap-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cap-card:hover::before {
  opacity: 1;
}
.cap-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cap-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--color-primary-border);
}
.cap-icon-svg {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cap-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.cap-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Fallback / Legacy trust-grid */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}
.trust-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.trust-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.trust-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Hero Interactive Document Card */
.hero-visual {
  display: flex;
  justify-content: center;
}
.hero-doc-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
}
.hero-showcase-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  color: #38bdf8;
  padding: 6px 14px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}
.hero-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.hero-showcase-callout {
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-showcase-link {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
  font-size: 0.74rem;
}
.doc-mock-title {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}
.doc-mock-status.flagged {
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--color-danger);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.hero-doc-preview {
  position: relative;
  height: 280px;
  background: #f1f5f9;
  overflow: hidden;
}
.hero-doc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.hero-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ef4444, transparent);
  box-shadow: 0 0 10px #ef4444;
  animation: heroScan 3s infinite linear;
}
@keyframes heroScan {
  0% { top: 0; }
  50% { top: 95%; }
  100% { top: 0; }
}
.hero-marker-box {
  position: absolute;
  top: 48%;
  right: 14%;
  width: 130px;
  height: 38px;
  border: 2px solid var(--color-danger);
  background: rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-xs);
  pointer-events: none;
  transition: all 0.2s ease;
}
.marker-pill {
  position: absolute;
  top: -22px;
  right: 0;
  background: var(--color-danger);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 2px;
  white-space: nowrap;
}

/* Interactive Hero Hotspots */
.hero-hotspot {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.hero-hotspot:hover {
  transform: translate(-50%, -50%) scale(1.15);
}
.hotspot-pin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.45);
  border: 2px solid #ffffff;
  position: relative;
  z-index: 2;
}
.hero-hotspot.active .hotspot-pin {
  background: var(--color-danger);
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.55);
}
.hotspot-pulse {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.35);
  animation: hotspotPulse 2s infinite ease-out;
  pointer-events: none;
}
.hero-hotspot.active .hotspot-pulse {
  background: rgba(220, 38, 38, 0.4);
}
@keyframes hotspotPulse {
  0% { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Dynamic Hotspot Evidence Box */
.hero-hotspot-evidence {
  background: #f8fafc;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 16px;
}
.h-evidence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.h-evidence-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-danger);
  background: rgba(220, 38, 38, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}
.h-evidence-points {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--color-danger);
}
.h-evidence-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}
.h-evidence-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.h-tab-btn {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.h-tab-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.h-tab-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

/* Hero Doc Benchmark Metrics Footer */
.hero-doc-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}
.hero-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 4px;
}
.hero-metric:not(:last-child) {
  border-right: 1px solid var(--border-subtle);
}
.m-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.m-val {
  font-size: 0.88rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.2;
}
.m-val.danger {
  color: var(--color-danger);
}
.m-val.success {
  color: var(--color-success);
}


/* Evidence Detected Grid */
.evidence-detected-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 14px;
  margin-top: 24px;
}
@media (min-width: 640px) {
  .evidence-detected-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .evidence-detected-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.evidence-pill-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ep-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  padding-top: 2px;
}
.ep-content strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.ep-content p {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* SECTION 3: "FROM EVIDENCE TO RISK" ARCHITECTURE FLOW */
.evidence-risk-section {
  padding: 60px 0;
  background: linear-gradient(180deg, var(--bg-base) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-subtle);
}
.risk-flow-container {
  max-width: 860px;
  margin: 0 auto;
}
.risk-flow-signals {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
@media (min-width: 768px) {
  .risk-flow-signals {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.flow-signal-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  flex: 1;
}
.flow-sig-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.flow-sig-name {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-primary);
}
.flow-sig-pts {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-mono);
}
.flow-sig-pts.danger { color: var(--color-danger); }
.flow-sig-desc {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.flow-plus {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-muted);
  text-align: center;
  padding: 0 4px;
}
.flow-arrow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}
.flow-arrow-line {
  flex: 1;
  height: 1px;
  background: var(--border-medium);
}
.flow-arrow-badge {
  background: #0f172a;
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.risk-outcome-card {
  background: #ffffff;
  border: 2px solid var(--color-danger);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 640px) {
  .risk-outcome-card {
    flex-direction: row;
    align-items: center;
  }
}
.outcome-score-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}
.outcome-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.outcome-score {
  font-size: 2.2rem;
  font-weight: 900;
  font-family: var(--font-mono);
  line-height: 1;
}
.outcome-score.danger { color: var(--color-danger); }
.outcome-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.outcome-divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
}
@media (min-width: 640px) {
  .outcome-divider {
    width: 1px;
    height: 60px;
  }
}
.outcome-verdict-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.outcome-verdict {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.outcome-verdict.danger { color: var(--color-danger); }
.outcome-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.risk-philosophy-banner {
  margin-top: 24px;
  padding: 12px 20px;
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-primary);
  flex-wrap: wrap;
}
.rp-tag {
  background: #0f172a;
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
}

/* SECTION 4: PIPELINE ACCORDION */
.pipeline-section {
  padding: 60px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}
.pipeline-stages-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pipeline-stage-item {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}
.pipeline-stage-item:hover {
  border-color: var(--color-primary);
}
.pipeline-stage-item.active {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.psi-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}
.psi-num {
  font-size: 1.1rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--color-primary);
  min-width: 28px;
}
.psi-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.psi-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text-primary);
}
.psi-summary {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.psi-chevron {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.pipeline-stage-item.active .psi-chevron {
  transform: rotate(0deg);
  color: var(--color-primary);
}
.psi-body {
  padding: 0 20px 18px 64px;
  border-top: 1px solid transparent;
}
.psi-body p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}
.psi-meta {
  font-size: 0.74rem;
  color: var(--text-primary);
  background: var(--bg-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--color-primary);
}

/* SECTION 5: PRIVACY ARCHITECTURE */
.privacy-arch-section {
  padding: 60px 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--border-subtle);
}
.privacy-boundary-box {
  max-width: 860px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.pb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #0f172a;
  color: #ffffff;
  flex-wrap: wrap;
  gap: 8px;
}
.pb-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #38bdf8;
}
.pb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}
.pb-tag {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}
.pb-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px 20px;
  align-items: center;
}
@media (min-width: 768px) {
  .pb-flow {
    flex-direction: row;
    justify-content: space-between;
  }
}
.pb-node {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  flex: 1;
  width: 100%;
}
.pb-node.core {
  border: 2px solid var(--color-primary);
  background: #f8fafc;
  flex: 1.4;
  text-align: left;
}
.pb-node-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
  text-align: center;
}
.pb-node strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pb-node.core strong {
  text-align: center;
}
.pb-node small {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.pb-tasks {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.pb-arrow {
  font-size: 1.4rem;
  color: var(--color-primary);
  font-weight: 800;
  transform: rotate(90deg);
}
@media (min-width: 768px) {
  .pb-arrow {
    transform: rotate(0deg);
  }
}
.pb-footer {
  padding: 14px 20px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
}
.pb-guarantee {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.pbg-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* SECTION 6: BENCHMARK SECTION */
.benchmark-section {
  padding: 50px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}
.benchmark-card {
  max-width: 860px;
  margin: 0 auto;
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.bench-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.bench-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0369a1;
  background: #e0f2fe;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  margin-bottom: 6px;
}
.bench-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.bench-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.4;
}
.bench-score-pill {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bsp-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bsp-val {
  font-size: 1.2rem;
  font-weight: 900;
  font-family: var(--font-mono);
}
.bsp-val.danger { color: var(--color-danger); }
.bsp-verdict {
  font-size: 0.65rem;
  font-weight: 800;
}
.bsp-verdict.danger { color: var(--color-danger); }
.bench-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* SECTION 7: FINAL CALL TO ACTION */
.final-cta-section {
  padding: 70px 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-subtle) 100%);
}
.cta-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.cta-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 28px auto;
  line-height: 1.5;
}
.cta-btn-wrapper {
  display: flex;
  justify-content: center;
}
.cta-btn-large {
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  gap: 10px;
}

/* Scanner Section Card */
.scanner-section {
  padding: 40px 0 20px 0;
}
.scanner-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.scanner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.scanner-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.scanner-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-top: 4px;
  line-height: 1.45;
}
.scanner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Operations Selector Wrapper */
.operations-selector-wrapper {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.operations-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.op-subhead {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
}
.op-lock-note {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* Document Alignment Guidelines */
.camera-guidelines {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
}
.guideline-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid #2563eb;
}
.guideline-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-top-left-radius: 6px; }
.guideline-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-top-right-radius: 6px; }
.guideline-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-bottom-left-radius: 6px; }
.guideline-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-bottom-right-radius: 6px; }
.guideline-instruction {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}

/* ==========================================================================
   SECTION 5: RISK EXPLORER
   ========================================================================== */
.risk-explorer-section {
  padding: 50px 0;
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.risk-explorer-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  max-width: 860px;
  margin: 0 auto;
}
.risk-bars-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.risk-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}
.bar-header strong {
  font-family: var(--font-mono);
  font-size: 0.88rem;
}
.bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-fill.danger { background: var(--color-danger); }
.bar-fill.warning { background: var(--color-warning); }
.bar-fill.success { background: var(--color-success); }
.bar-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ==========================================================================
   SECTION 6: HOW IT WORKS PIPELINE
   ========================================================================== */
.how-it-works-section {
  padding: 60px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}
.pipeline-timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 680px) {
  .pipeline-timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}
.timeline-step {
  display: flex;
  gap: 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.15s ease;
}
.timeline-step:hover {
  border-color: var(--color-primary-border);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.step-num {
  width: 32px;
  height: 32px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.step-content h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.step-content p {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   SECTION 7: TECHNOLOGY BLUEPRINT
   ========================================================================== */
.technology-section {
  padding: 60px 0;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
}
.blueprint-card {
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xl);
}
.blueprint-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) {
  .blueprint-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.blueprint-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 20px;
}
.blueprint-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
}
.blueprint-box h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}
.blueprint-formula {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #93c5fd;
  background: #0b1120;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 10px;
  overflow-x: auto;
}
.blueprint-box p {
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 12px;
}
.blueprint-stat {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #cbd5e1;
  border-top: 1px dashed #334155;
  padding-top: 8px;
}
.blueprint-stat strong {
  color: #34d399;
}
.blueprint-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #334155;
}
@media (min-width: 640px) {
  .blueprint-footer {
    grid-template-columns: repeat(3, 1fr);
  }
}
.bp-foot-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.74rem;
  color: #94a3b8;
}
.bp-foot-item strong {
  color: #ffffff;
  font-size: 0.82rem;
}

/* ==========================================================================
   SECTION 8: PRIVACY CENTER
   ========================================================================== */
.privacy-section {
  padding: 60px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}
.privacy-faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 680px) {
  .privacy-faq-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .privacy-faq-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.privacy-card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}
.privacy-badge.success {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--color-success);
  background: var(--color-success-light);
  border: 1px solid var(--color-success-border);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.privacy-card h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.privacy-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ==========================================================================
   SECTION 9: SCAN HISTORY LEDGER
   ========================================================================== */
.history-section {
  padding: 50px 0;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
}
.history-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
}
.history-list {
  display: flex;
  flex-direction: column;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}
.history-item:last-child {
  border-bottom: none;
}
.history-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.history-item-id {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}
.history-item-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.history-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.history-item-score {
  font-family: var(--font-mono);
  font-weight: 800;
}
.history-item-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.history-item-badge.forged {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border: 1px solid var(--color-danger-border);
}
.history-item-badge.clean {
  background: var(--color-success-light);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}
.history-item-badge.inconclusive {
  background: var(--color-warning-light);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}
.history-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ==========================================================================
   CINEMATIC PROCESSING OVERLAY
   ========================================================================== */
.processing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.processing-modal {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  text-align: center;
}
.processing-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-primary-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  margin: 0 auto 16px auto;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.processing-title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.processing-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.processing-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.proc-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  transition: all 0.2s ease;
}
.proc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-medium);
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.proc-step.active {
  color: var(--color-primary);
  font-weight: 800;
}
.proc-step.active .proc-dot {
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
  animation: pulseDot 1s infinite;
}
.proc-step.completed {
  color: var(--color-success);
}
.proc-step.completed .proc-dot {
  background: var(--color-success);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  z-index: 200;
  justify-content: space-around;
  align-items: center;
}
@media (max-width: 768px) {
  /* Top Header: Remove overflowing desktop CTA button and optimize spacing */
  .top-navbar {
    padding: 0 14px;
    min-height: 58px;
  }
  .nav-container {
    gap: 8px;
  }
  .nav-cta-btn {
    display: none !important; /* Hide redundant desktop Scan CTA in mobile header */
  }
  .nav-brand {
    gap: 8px;
  }
  .nav-logo-icon {
    width: 32px;
    height: 32px;
  }
  .nav-brand-title {
    font-size: 1.05rem;
  }
  .nav-brand-tagline {
    font-size: 0.62rem;
  }
  .nav-actions {
    gap: 8px;
  }
  .bridge-status-pill {
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  /* Mobile Bottom Navigation & Safe Area Inset for Modern Devices */
  .mobile-bottom-nav {
    display: flex;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  /* Hero Section Mobile Polish */
  .landing-hero {
    padding: 32px 0 24px 0;
  }
  .hero-headline {
    font-size: clamp(1.85rem, 7.5vw, 2.3rem);
    margin-bottom: 14px;
    line-height: 1.18;
  }
  .hero-subtext {
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 22px;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
    margin-bottom: 24px;
  }
  .hero-cta-group .hero-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 12px 16px;
    font-size: 0.92rem;
  }

  /* Scanner Controls & Actions Mobile Stacking */
  .scanner-card {
    padding: 18px 14px;
  }
  .scanner-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }
  .scanner-actions button,
  .scanner-actions .benchmark-select-wrapper,
  .scanner-actions .benchmark-select {
    width: 100%;
    justify-content: center;
  }

  /* Document Canvas & Viewport Mobile Adaptations */
  .viewport-panel {
    padding: 14px;
  }
  .view-mode-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .view-mode-bar > div {
    display: flex;
    width: 100%;
    gap: 6px;
  }
  .view-mode-bar .view-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.74rem;
  }
  #runAnalysisBtn {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }

  /* Workspace HUD Panel */
  .hud-panel {
    padding: 16px 14px;
  }
  .hud-actions-group {
    flex-direction: column;
    gap: 8px;
  }

  /* Modals Mobile Sizing */
  .cert-modal-card,
  .bridge-modal-card {
    padding: 22px 16px;
    margin: 12px;
    max-width: 94vw;
    max-height: 88vh;
    overflow-y: auto;
  }
  .cert-details-list {
    padding: 10px 12px;
  }
  .cert-row {
    font-size: 0.78rem;
  }
  .cert-row strong.mono {
    font-size: 0.72rem;
    word-break: break-all;
  }
}

@media (max-width: 480px) {
  /* Extra Small Devices (360px - 412px Phones like iQOO, Galaxy, Pixel) */
  .top-navbar {
    padding: 0 10px;
  }
  .nav-logo-icon {
    width: 28px;
    height: 28px;
  }
  .nav-logo-icon svg {
    width: 18px;
    height: 18px;
  }
  .nav-brand-title {
    font-size: 0.96rem;
  }
  .nav-brand-tagline {
    font-size: 0.58rem;
  }
  .bridge-status-pill {
    padding: 4px 8px;
    font-size: 0.66rem;
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-top: 16px;
  }
  .trust-item {
    padding: 10px 8px;
  }
  .trust-icon {
    font-size: 1.1rem;
    margin-bottom: 2px;
  }
  .trust-title {
    font-size: 0.76rem;
    margin-bottom: 2px;
  }
  .trust-desc {
    font-size: 0.65rem;
    line-height: 1.3;
  }

  .active-doc-hud {
    padding: 8px 12px;
  }
  .doc-hud-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .doc-hud-item {
    min-width: 0;
  }
  .doc-hud-val {
    max-width: 125px;
  }
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.mobile-nav-item svg {
  stroke: var(--text-muted);
  transition: stroke 0.15s ease;
}
.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--color-primary);
}
.mobile-nav-item.active svg,
.mobile-nav-item:hover svg {
  stroke: var(--color-primary);
}

/* ==========================================================================
   MODE BADGE & EMPTY STATE ENHANCEMENTS
   ========================================================================== */
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.mode-badge.empty {
  background: #f1f5f9;
  color: var(--text-muted);
  border-color: #cbd5e1;
}
.mode-badge.real {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.35);
}
.mode-badge.demo {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.35);
}
.mode-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.risk-badge.verdict-neutral {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.empty-evidence-hint {
  padding: 24px 12px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.why-tag.empty-tag {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}

.active-badge.flagged-badge {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.active-badge.passed-badge {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   MOBILE CAMERA & VIEWFINER CONTROLS
   ========================================================================== */

/* Universal accessible hidden input: keeps element rendered so .click() is never blocked */
.visually-hidden-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Enhanced Viewfinder Video element for mobile portrait & landscape */
.viewfinder-wrapper video {
  width: 100%;
  min-height: 280px;
  max-height: 70vh;
  object-fit: cover;
  background: #000000;
  display: none;
}

/* Floating Camera Shutter Bar inside Viewfinder */
.camera-shutter-bar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 10px 20px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  z-index: 25;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

/* Large Native-Feel Camera Shutter Button */
.shutter-capture-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.shutter-capture-btn:active {
  transform: scale(0.92);
}
.shutter-capture-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  transition: background 0.15s ease;
}
.shutter-capture-btn:active .shutter-capture-inner {
  background: #e2e8f0;
}

/* Shutter Tool Buttons (Flip & Close) */
.camera-tool-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.camera-tool-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}
.camera-tool-btn:active {
  transform: scale(0.9);
}

/* ==========================================================================
   ENTERPRISE CAPABILITY CARDS & SEMANTIC ICONS
   ========================================================================== */
.trust-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.trust-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}
.trust-icon-svg {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

/* Evidence Pill SVGs */
.ep-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.ep-icon-svg.danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
}
.ep-icon-svg.warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fef3c7;
}
.ep-icon-svg.primary {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
}
.ep-icon-svg.info {
  background: #f0fdf4;
  color: #059669;
  border: 1px solid #dcfce7;
}

/* ==========================================================================
   FORENSIC LAB DARK WORKSTATION (#page-lab)
   ========================================================================== */
#page-lab {
  background: #0b0f19;
  color: #f1f5f9;
  min-height: calc(100vh - 65px);
}
#page-lab #workspace {
  max-width: 1300px;
  padding: 24px 20px 48px 20px;
}
.lab-workstation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1e293b;
  flex-wrap: wrap;
  gap: 12px;
}
.lwh-badge {
  font-size: 0.64rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}
.lwh-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.01em;
}
.lwh-status-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lwh-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #94a3b8;
  background: #131b2e;
  border: 1px solid #1e293b;
  padding: 4px 10px;
  border-radius: 4px;
}
.lwh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.lwh-dot.green {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}
.lwh-dot.blue {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

#page-lab .viewport-panel {
  background: #0f172a;
  border: 1px solid #1e293b;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}
#page-lab .hud-panel {
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #f8fafc;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}
#page-lab .hud-header {
  border-bottom-color: #1e293b;
}
#page-lab .hud-title {
  color: #f8fafc;
}
#page-lab .hud-latency {
  background: #1e293b;
  color: #38bdf8;
}
#page-lab .viewfinder-wrapper {
  background: #050811;
  border-color: #1e293b;
}
#page-lab .view-btn {
  background: #131b2e;
  border-color: #1e293b;
  color: #94a3b8;
}
#page-lab .view-btn:hover {
  background: #1e293b;
  color: #f8fafc;
}
#page-lab .view-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}
#page-lab .why-drivers-box {
  background: #131b2e;
  border-color: #1e293b;
}
#page-lab .why-drivers-title {
  color: #94a3b8;
}
#page-lab .why-tag {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}
#page-lab .evidence-breakdown-card {
  background: #131b2e;
  border-color: #1e293b;
}
#page-lab .evidence-header {
  border-bottom-color: #1e293b;
  color: #f8fafc;
}
#page-lab .evidence-row {
  border-bottom-color: #1e293b;
}
#page-lab .evidence-name {
  color: #e2e8f0;
}
#page-lab .evidence-points-val {
  color: #f8fafc;
}
#page-lab .inspector-card {
  background: #131b2e;
  border-color: #1e293b;
}
#page-lab .inspector-header {
  border-bottom-color: #1e293b;
  color: #f8fafc;
}
#page-lab .inspector-body {
  color: #cbd5e1;
}
#page-lab .inspector-math-details {
  background: #090d16;
  border-color: #1e293b;
  color: #38bdf8;
}

/* Floating Zoom Controls */
.canvas-zoom-controls {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: flex;
  gap: 4px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 3px;
  z-index: 20;
}
.zoom-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.zoom-btn:hover {
  background: #1e293b;
  color: #f8fafc;
}
.zoom-btn.text-btn {
  width: auto;
  padding: 0 6px;
  font-size: 0.72rem;
}

/* Numbered Region Marker Badges */
.region-num-badge {
  position: absolute;
  top: -12px;
  left: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc2626;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  border: 2px solid #0f172a;
}
.region-box.focused {
  outline: 2px solid #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
}

/* ==========================================================================
   ENTERPRISE FOOTER
   ========================================================================== */
.enterprise-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 60px 0 28px 0;
  border-top: 1px solid #1e293b;
  margin-top: 50px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}
.footer-brand-col {
  display: flex;
  flex-direction: column;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.footer-tagline {
  font-size: 0.76rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.footer-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #64748b;
  max-width: 280px;
  margin-bottom: 14px;
}
.footer-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.f-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  background: #1e293b;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #334155;
}
.footer-heading {
  font-size: 0.72rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: #94a3b8;
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: #38bdf8;
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.74rem;
  color: #64748b;
}
.fb-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-weight: 600;
  font-family: var(--font-mono);
}
.fb-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* ==========================================================================
   PRODUCTION DEFENSIVE UPGRADE: NEW COMPONENTS STYLING
   ========================================================================== */

/* 1. Instant Sample Analysis Button */
.btn-sample-instant {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid #38bdf8;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.btn-sample-instant:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  border-color: #7dd3fc;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
  transform: translateY(-1px);
}
.btn-sample-instant:active {
  transform: translateY(0);
}
.btn-sample-instant svg {
  color: #38bdf8;
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.6));
}

/* 2. Empty Canvas Visual Placeholder */
.empty-canvas-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(4px);
  z-index: 5;
  border-radius: var(--radius-md);
  padding: 24px;
}
.eco-card {
  text-align: center;
  max-width: 380px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-xl);
}
.eco-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.eco-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}
.eco-card p {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 18px;
}

/* 3. Engine Validation Section */
.validation-section {
  padding: 50px 0;
  background: #0f172a;
  color: #f8fafc;
  border-bottom: 1px solid #1e293b;
}
.val-metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
@media (min-width: 640px) {
  .val-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .val-metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.val-metric-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.val-metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.val-metric-val {
  font-size: 1.85rem;
  font-weight: 900;
  font-family: var(--font-mono);
  margin: 4px 0;
}
.val-metric-val.success { color: #10b981; }
.val-metric-val.highlight { color: #38bdf8; }
.val-metric-val.neutral { color: #f59e0b; }
.val-metric-sub {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.35;
}

.val-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (min-width: 840px) {
  .val-main-grid {
    grid-template-columns: 3fr 2fr;
  }
}
.val-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-lg);
  padding: 22px;
}
.val-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #334155;
}
.val-card-header h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}
.val-badge {
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 4px;
}
.val-badge.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* Binary Confusion Matrix Table */
.confusion-matrix-table-wrap {
  overflow-x: auto;
  margin-bottom: 14px;
}
.confusion-matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.82rem;
}
.confusion-matrix-table th, 
.confusion-matrix-table td {
  border: 1px solid #334155;
  padding: 12px 14px;
}
.cm-corner {
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.72rem;
  text-transform: uppercase;
}
.cm-predicted-header {
  background: #0f172a;
  color: #38bdf8;
  font-weight: 800;
}
.cm-col-hdr {
  background: #111c38;
  color: #cbd5e1;
  font-weight: 700;
}
.cm-row-hdr {
  background: #111c38;
  color: #cbd5e1;
  font-weight: 700;
  text-align: left;
}
.cm-cell {
  background: #0b1329;
  font-family: var(--font-mono);
}
.cm-val {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 2px;
}
.cm-lbl {
  font-size: 0.68rem;
  color: #94a3b8;
}
.cm-cell.true-neg .cm-val { color: #10b981; }
.cm-cell.false-pos .cm-val { color: #f59e0b; }
.cm-cell.false-neg .cm-val { color: #ef4444; }
.cm-cell.true-pos .cm-val { color: #10b981; }
.cm-notes {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* Dataset Specifications List */
.val-dataset-specs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.val-dataset-specs li {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #cbd5e1;
}
.val-dataset-specs strong {
  color: #38bdf8;
  display: block;
  font-size: 0.82rem;
  margin-bottom: 2px;
}

/* Known Failure Cases Grid */
.failure-cases-card {
  margin-top: 8px;
}
.failure-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .failure-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.failure-item {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}
.failure-num {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 900;
  color: #f59e0b;
  margin-bottom: 8px;
}
.failure-content h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}
.failure-content p {
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 10px;
}
.failure-mitigation {
  font-size: 0.72rem;
  background: rgba(16, 185, 129, 0.1);
  border-left: 2px solid #10b981;
  padding: 6px 8px;
  color: #a7f3d0;
  border-radius: 0 4px 4px 0;
}
.failure-mitigation strong {
  color: #10b981;
}

/* 4. Privacy Tiers & Boundary Diagram */
.privacy-tiers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 28px;
}
@media (min-width: 768px) {
  .privacy-tiers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.privacy-tier-card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.privacy-tier-card.enclave {
  border-top: 3px solid #0284c7;
}
.privacy-tier-card.lan {
  border-top: 3px solid #10b981;
}
.ptc-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.ptc-badge.lan {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}
.ptc-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.privacy-tier-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 12px;
}
.ptc-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-primary);
}
.ptc-points li {
  line-height: 1.4;
}

.privacy-diagram-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 28px;
  color: #f8fafc;
}
.pdc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.pdc-header h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}
.pdc-badge {
  font-size: 0.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  padding: 2px 8px;
  border-radius: 4px;
}
.privacy-svg-container {
  width: 100%;
  overflow-x: auto;
  display: flex;
  justify-content: center;
}
.privacy-boundary-svg {
  width: 100%;
  max-width: 920px;
  height: auto;
  border-radius: 8px;
}

/* 5. Hardened Upload Modal */
.upload-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.upload-modal-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  color: #f8fafc;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.upload-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid #1e293b;
}
.um-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.um-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.um-title {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 2px 0;
}
.um-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
}
.um-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}
.um-close-btn:hover { color: #ffffff; }

.upload-modal-body {
  padding: 20px 24px;
}
.um-spec-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.um-pill {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: #1e293b;
  color: #cbd5e1;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #334155;
}
.um-pill.highlight {
  color: #38bdf8;
  border-color: #0284c7;
}

.um-dropzone {
  border: 2px dashed #334155;
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  background: #111c38;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}
.um-dropzone:hover,
.um-dropzone.dragover,
.um-dropzone:focus {
  border-color: #38bdf8;
  background: #152244;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}
.um-drop-icon {
  margin-bottom: 12px;
}
.um-drop-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
}
.um-browse-link {
  color: #38bdf8;
  text-decoration: underline;
}
.um-drop-help {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
}

.um-alert-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 14px;
  font-size: 0.78rem;
}

.um-progress-wrap {
  margin-top: 16px;
  background: #1e293b;
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid #334155;
}
.um-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.um-progress-step { color: #38bdf8; }
.um-progress-pct { font-family: var(--font-mono); color: #ffffff; }
.um-progress-track {
  width: 100%;
  height: 6px;
  background: #0f172a;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}
.um-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}
.um-progress-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.um-progress-sub {
  font-size: 0.7rem;
  color: #64748b;
}
.um-cancel-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.um-cancel-btn:hover { text-decoration: underline; }

.um-sample-fallback {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.76rem;
  color: #94a3b8;
}
.um-sample-link {
  background: none;
  border: none;
  color: #38bdf8;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: 0.76rem;
}
.um-sample-link:hover { text-decoration: underline; }

/* 6. Performance & Compatibility Block */
.perf-block-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-top: 24px;
  color: #f8fafc;
}
.perf-block-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.perf-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin: 4px 0 0 0;
}
.perf-badge {
  font-size: 0.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  padding: 3px 8px;
  border-radius: 4px;
}
.perf-specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
@media (min-width: 600px) {
  .perf-specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .perf-specs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.perf-spec-item {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.perf-spec-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}
.perf-spec-val {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #38bdf8;
}
.perf-spec-sub {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
}

.perf-matrix-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid #1e293b;
}
@media (min-width: 768px) {
  .perf-matrix-wrap {
    grid-template-columns: 1fr 1fr;
  }
}
.perf-matrix-col h4 {
  font-size: 0.82rem;
  font-weight: 800;
  color: #e2e8f0;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.perf-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.perf-chip {
  font-size: 0.72rem;
  font-weight: 600;
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 4px;
}
.perf-chip.verified {
  color: #34d399;
  border-color: #059669;
  background: rgba(5, 150, 105, 0.12);
}
.perf-fallback-desc {
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.45;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 10px 12px;
  border-radius: var(--radius-md);
}
.perf-fallback-desc code {
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.stat-footnote {
  color: #38bdf8;
  font-size: 0.72rem;
  text-decoration: underline;
  margin-left: 4px;
}

/* Phase 1: Forensic Limitations Banner & Benchmark Notes */
.forensic-limits-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.flb-icon {
  flex-shrink: 0;
  margin-top: 2px;
}
.flb-content {
  flex: 1;
}
.flb-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.flb-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: #b45309;
  background: rgba(245, 158, 11, 0.18);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
}
.flb-header strong {
  font-size: 0.88rem;
  color: var(--text-primary);
}
.flb-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}
.flb-link {
  color: #d97706;
  font-weight: 700;
  text-decoration: underline;
  margin-left: 6px;
  display: inline-block;
}
.flb-link:hover {
  color: #b45309;
}

.val-synthetic-limits-note {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.vsln-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f59e0b;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.val-synthetic-limits-note ul {
  margin: 0 0 12px 18px;
  padding: 0;
  color: #94a3b8;
  font-size: 0.8rem;
  line-height: 1.5;
}
.vsln-footer {
  margin: 0;
  font-size: 0.78rem;
  color: #cbd5e1;
  border-top: 1px dashed #334155;
  padding-top: 10px;
}




