/* ================================================================
   InfraMind — Animated product mockup styles
   Enterprise SaaS look, light theme, real brand colours
   ================================================================ */

.mockup-frame {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-window);
  font-family: var(--font-sans);
  color: var(--ink-1000);
  position: relative;
}

/* ---------- title bar (browser-style + product header) ---------- */
.mockup-titlebar {
  height: 44px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-150);
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px;
}
.mockup-dots { display: flex; gap: 6px; }
.mockup-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.mockup-dots span:nth-child(1) { background: #FF6058; }
.mockup-dots span:nth-child(2) { background: #FFBE2F; }
.mockup-dots span:nth-child(3) { background: #29CC42; }
.mockup-url {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-600);
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 16px;
  padding: 4px 14px;
  display: flex; align-items: center; gap: 8px;
  min-width: 260px;
}
.mockup-url .lock { color: var(--ink-500); font-size: 10px; }
.mockup-tabs {
  margin-left: auto;
  display: flex; gap: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
}
.tab-pill {
  padding: 6px 12px;
  color: var(--ink-500);
  border-radius: 14px;
  cursor: default;
  transition: background 200ms;
  white-space: nowrap;
}
.tab-pill.active {
  background: var(--ink-1000);
  color: var(--paper);
  font-weight: 500;
}

/* ---------- body layout ---------- */
.mockup-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: 580px;
}

/* ---------- left sidebar ---------- */
.mockup-sidebar {
  background: var(--paper);
  border-right: 1px solid var(--ink-150);
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 12px;
  color: var(--ink-700);
}
.ms-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-top: 4px;
}
.ms-section-label.small { margin-top: 12px; font-size: 9px; }
.ms-control {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  background: var(--paper);
  font-size: 12px;
  color: var(--ink-700);
}
.ms-control .caret { color: var(--ink-400); font-size: 10px; }
.ms-search {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  font-size: 12px;
  color: var(--ink-400);
}
.ms-search .ic { font-size: 12px; }
.ms-tree {
  margin-top: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.ms-tree-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 6px;
  border-radius: 4px;
  cursor: default;
  font-size: 12px;
  color: var(--ink-700);
  transition: background 150ms;
}
.ms-tree-row.indent { padding-left: 18px; }
.ms-tree-row.indent2 { padding-left: 26px; }
.ms-tree-row.selected {
  background: var(--ink-100);
  color: var(--ink-1000);
  font-weight: 500;
}
.ms-tree-row.selected.highlight {
  background: rgba(220,38,38,0.08);
  box-shadow: inset 0 0 0 1px rgba(220,38,38,0.4);
}
.ms-tree-row .ms-caret {
  font-size: 8px;
  color: var(--ink-400);
  width: 8px;
}
.ms-tree-row .ms-row-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-400);
}
.ms-tree-row .ms-icon-asset {
  width: 12px; height: 12px;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 10px;
}
.ms-foot {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-400);
  letter-spacing: 0.04em;
  padding-top: 12px;
  border-top: 1px solid var(--ink-150);
}

/* ---------- main panel ---------- */
.mockup-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
}
.mockup-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--ink-150);
  font-size: 12px;
  color: var(--ink-500);
}
.mockup-breadcrumb .sep { color: var(--ink-300); }
.mockup-breadcrumb .here { color: var(--ink-1000); font-weight: 500; }

.mockup-canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
.mockup-canvas .stage {
  position: absolute; inset: 0;
  pointer-events: none;
}

/* ================================================================
   Stage: Map
   ================================================================ */
.stage-map {
  position: absolute; inset: 0;
  overflow: hidden;
}
.stage-map-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #E5EFE3, #D6E2D2);
}
.stage-map-routes {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

.map-marker {
  position: absolute;
  width: 20px; height: 26px;
  margin-left: -10px; margin-top: -26px;
  z-index: 3;
}
.marker-pulse {
  position: absolute;
  left: -10px; top: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(10,10,10,0.4);
  z-index: 1;
}
.marker-pin {
  position: relative; z-index: 2;
}

.map-controls {
  position: absolute;
  top: 14px; right: 14px;
  display: flex; flex-direction: column; gap: 4px;
  z-index: 4;
}
.mc-btn {
  width: 28px; height: 28px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--ink-700);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.map-styles {
  position: absolute;
  top: 14px; left: 14px;
  display: flex; gap: 4px;
  z-index: 4;
}
.ms-pill {
  padding: 5px 10px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 5px;
  font-size: 11px;
  color: var(--ink-700);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.ms-pill.active {
  background: var(--ink-1000);
  color: var(--paper);
  border-color: var(--ink-1000);
}

.map-selected-card {
  position: absolute;
  bottom: 16px;
  left: 50%; transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  padding: 12px 16px;
  width: 320px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 4;
}
.msc-row { display: flex; align-items: center; gap: 8px; }
.msc-pin { font-size: 12px; }
.msc-title { font-size: 13px; font-weight: 600; }
.msc-clear {
  margin-left: auto;
  font-size: 11px; color: var(--ink-500);
}
.msc-sub { font-size: 11px; color: var(--ink-500); margin-top: 2px; }
.msc-nav { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ink-150); }
.msc-label { font-size: 10px; color: var(--ink-500); margin-bottom: 6px; font-family: var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.msc-buttons { display: flex; gap: 4px; }
.msc-buttons button {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 11px;
  color: var(--ink-700);
  font-family: inherit;
}

/* ================================================================
   Stage: Overview
   ================================================================ */
.stage-overview {
  position: absolute; inset: 0;
  padding: 18px 24px 56px;
  overflow: hidden;
}

.ov-asset-header h3 {
  font-size: 17px; font-weight: 600;
  margin: 0 0 2px;
}
.ov-sub {
  font-size: 12px; color: var(--ink-500);
  margin-bottom: 14px;
}

.ov-asset-card {
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--paper);
  margin-bottom: 18px;
}
.ov-asset-title-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.ov-asset-name { font-size: 16px; font-weight: 600; }
.ov-asset-id {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--ink-500);
  margin-left: auto;
  letter-spacing: 0.02em;
}
.ov-pill {
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 4px;
}
.ov-pill-tunnel {
  background: #DCFCE7;
  color: #166534;
}
.ov-asset-meta {
  display: flex; gap: 18px;
  font-size: 11px; color: var(--ink-600);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ov-asset-meta > span { white-space: nowrap; }
.ov-asset-meta b { color: var(--ink-1000); font-weight: 500; }
.ov-asset-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.ov-tag {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
}
.ov-tag b { font-weight: 600; }
.ov-tag-green {
  background: #DCFCE7;
  color: #166534;
}
.ov-tag-blue {
  background: #DBEAFE;
  color: #1E40AF;
}

.ov-section { margin-bottom: 16px; }
.ov-section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 12px;
}
.ov-section-head h4 {
  font-size: 15px; font-weight: 600;
  margin: 0 0 2px;
}
.ov-section-sub {
  font-size: 11px; color: var(--ink-500);
  max-width: 480px;
}
.ov-section-totals {
  display: flex; align-items: center; gap: 12px;
}
.ov-mega-num {
  font-size: 32px; font-weight: 600;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.ov-mega-label {
  font-size: 11px; color: var(--ink-500);
  font-family: var(--font-mono);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.ov-mega-pill {
  background: rgba(220,38,38,0.1);
  color: var(--sev-critical);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.ov-defect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.ov-cat {
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  padding: 14px 16px;
  background: var(--paper);
  transition: opacity 300ms, transform 300ms;
}
.ov-cat-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 10px;
}
.ov-cat-name { font-size: 13px; font-weight: 600; }
.ov-cat-sub { font-size: 10px; color: var(--ink-500); margin-top: 1px; }
.ov-cat-total { text-align: right; }
.ov-cat-total-num {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ov-cat-total-lbl {
  font-size: 9px; color: var(--ink-500);
  font-family: var(--font-mono);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.ov-cat-rows {
  display: flex; flex-direction: column; gap: 6px;
}
.sev-row {
  display: grid; grid-template-columns: 130px 1fr 56px;
  align-items: center; gap: 10px;
}
.sev-row-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  white-space: nowrap;
}
.sev-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex: none;
}
.sev-name { color: var(--ink-1000); font-weight: 500; }
.sev-range { color: var(--ink-400); font-size: 10px; font-family: var(--font-mono); }
.sev-row-bar {
  height: 4px;
  background: var(--ink-100);
  border-radius: 2px;
  overflow: hidden;
}
.sev-row-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 500ms;
}
.sev-row-count {
  text-align: right;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-1000);
  font-weight: 500;
}

.heatmap {
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  padding: 12px 14px;
  background: var(--paper);
}
.heatmap-rows {
  display: flex; flex-direction: column; gap: 2px;
}
.heatmap-row {
  display: grid; grid-template-columns: 84px 1fr;
  gap: 8px;
  align-items: center;
}
.heatmap-label {
  font-size: 11px;
  color: var(--ink-600);
}
.heatmap-cells {
  display: grid;
  grid-template-columns: repeat(32, 1fr);
  gap: 1px;
  height: 16px;
}
.heatmap-cell {
  border-radius: 1px;
}
.heatmap-axis {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: 10px;
  color: var(--ink-400);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  padding-left: 92px;
}

.ov-toolbar {
  position: absolute;
  right: 24px; bottom: 16px;
}
.ov-generate {
  padding: 8px 16px;
  background: var(--ink-1000);
  color: var(--paper);
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.ov-generate.pressed {
  transform: scale(0.97);
  background: var(--ink-700);
}

/* ================================================================
   Stage: Bill of Quantities (modal overlay)
   ================================================================ */
.stage-bom {
  position: absolute; inset: 0;
  display: flex;
  align-items: center; justify-content: center;
  z-index: 5;
}
.bom-backdrop {
  position: absolute; inset: 0;
  background: rgba(10,10,10,0.4);
  backdrop-filter: blur(2px);
}
.bom-panel {
  position: relative;
  width: calc(100% - 64px);
  max-width: 920px;
  max-height: calc(100% - 40px);
  overflow: hidden;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: 0 24px 56px rgba(0,0,0,0.25);
  display: flex; flex-direction: column;
}
.bom-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink-150);
  display: flex; align-items: flex-start; gap: 16px;
}
.bom-head h4 { font-size: 16px; font-weight: 600; margin: 0; }
.bom-sub { font-size: 11px; color: var(--ink-500); margin-top: 4px; }
.bom-totals { margin-left: auto; text-align: right; }
.bom-total-num {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.bom-total-lbl {
  font-size: 10px; color: var(--ink-500);
  font-family: var(--font-mono);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.bom-close {
  width: 24px; height: 24px;
  background: transparent;
  border: 0;
  font-size: 18px;
  color: var(--ink-500);
  cursor: default;
  font-family: inherit;
}

.bom-controls {
  padding: 12px 20px;
  border-bottom: 1px solid var(--ink-150);
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.bom-ctl {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--ink-500);
}
.bom-ctl-lbl {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bom-pill {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 4px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  color: var(--ink-700);
  font-weight: 500;
}
.bom-pill.active {
  background: var(--ink-1000);
  color: var(--paper);
  border-color: var(--ink-1000);
}
.bom-export {
  padding: 6px 12px;
  background: var(--ink-1000);
  color: var(--paper);
  border: 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
}

.bom-table {
  flex: 1;
  overflow: auto;
  padding: 8px 0;
}
.bom-row {
  display: grid;
  grid-template-columns: 24px 90px 110px 90px 50px 1fr 60px 60px;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  font-size: 11px;
  transition: opacity 300ms, transform 300ms;
}
.bom-row-head {
  border-bottom: 1px solid var(--ink-200);
  color: var(--ink-500);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 6px; padding-bottom: 10px;
}
.bom-row-head span:first-child { grid-column: 1 / 3; }
.bom-row-group {
  background: var(--ink-50);
  border-top: 1px solid var(--ink-150);
  font-weight: 500;
  color: var(--ink-1000);
}
.bom-chev { color: var(--ink-500); font-size: 9px; }
.bom-code { font-weight: 600; letter-spacing: 0.02em; }
.bom-items {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--ink-500);
}
.bom-qty {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 500;
}
.bom-count {
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.bom-act {
  color: var(--ink-400);
  font-size: 11px;
  text-align: center;
}

.bom-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--ink-150);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--ink-50);
}
.bom-foot > span:first-child {
  font-size: 11px;
  color: var(--ink-500);
}
.bom-grand-label {
  font-size: 10px;
  color: var(--ink-500);
  font-family: var(--font-mono);
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-right: 12px;
}
.bom-grand-num {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ================================================================
   Click cursor overlay
   ================================================================ */
.click-cursor {
  position: absolute;
  width: 22px; height: 22px;
  z-index: 100;
  pointer-events: none;
  margin-left: -2px; margin-top: -2px;
  transition: left 80ms linear, top 80ms linear;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}
.click-ripple {
  position: absolute;
  left: -16px; top: -16px;
  width: 44px; height: 44px;
  border: 2px solid var(--ink-1000);
  border-radius: 50%;
  animation: ripple 350ms ease-out;
  opacity: 0.6;
}
@keyframes ripple {
  from { transform: scale(0.2); opacity: 0.8; }
  to   { transform: scale(1.4); opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .mockup-body { grid-template-columns: 1fr; height: 460px; }
  .mockup-sidebar { display: none; }
  .ov-defect-grid { grid-template-columns: 1fr; }
  .mockup-tabs { display: none; }
}

/* ================================================================
   Platform-page mini mockups (Ingest / Detect / Rank / Decide)
   Render inside .dd-visual (4:3 aspect)
   ================================================================ */

.pm-frame {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--paper);
  font-family: var(--font-sans);
  color: var(--ink-1000);
  font-size: 12px;
  overflow: hidden;
}
.pm-head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--ink-150);
  background: var(--ink-50);
  display: flex; align-items: center; justify-content: space-between;
  flex: none;
  white-space: nowrap;
  gap: 12px;
}
.pm-head-title {
  font-size: 12px; font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.pm-head-stat {
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.pm-body {
  flex: 1;
  padding: 12px 16px;
  overflow: hidden;
  position: relative;
}
.pm-body.pm-stack {
  display: flex; flex-direction: column; gap: 8px;
}
.pm-foot {
  border-top: 1px solid var(--ink-150);
  padding: 8px 16px;
  background: var(--ink-50);
  display: flex; flex-direction: column; gap: 4px;
  flex: none;
}
.pm-foot-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px;
  white-space: nowrap;
  gap: 12px;
}
.pm-mono { font-family: var(--font-mono); font-size: 11px; }
.pm-dim { color: var(--ink-500); }
.pm-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 500;
}

/* ---------- Ingest ---------- */
.pm-file-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 70px 40px;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--ink-150);
  border-radius: 4px;
  background: var(--paper);
  transition: opacity 200ms;
}
.pm-file-icon {
  width: 22px; height: 22px;
  border: 1px solid var(--ink-300);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
}
.pm-file-icon span {
  width: 8px; height: 8px;
  display: block;
  border-radius: 50%;
}
.pm-file-info { min-width: 0; }
.pm-file-name {
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-1000);
}
.pm-file-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 10px;
  margin-top: 2px;
  white-space: nowrap;
}
.pm-file-meta .pm-mono { font-size: 10px; }
.pm-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border: 1px solid;
  border-radius: 3px;
  font-weight: 500;
}
.pm-file-bar {
  height: 4px;
  background: var(--ink-100);
  border-radius: 2px;
  overflow: hidden;
}
.pm-file-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 200ms linear;
}
.pm-file-status {
  text-align: right;
  font-size: 10px;
}

/* ---------- Detect ---------- */
.pm-detect-counter {
  position: absolute;
  right: 14px; top: 14px;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  min-width: 120px;
}
.pm-detect-big {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin: 2px 0 6px;
}
.pm-detect-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-700);
}
.pm-detect-breakdown span {
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.pm-detect-breakdown i {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
}

/* New: floating quantification badge on the real-product Detect mockup */
.pm-detect-quant {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: var(--paper);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow:
    0 1px 2px rgba(10,10,10,0.06),
    0 12px 32px -10px rgba(10,10,10,0.30);
  max-width: 280px;
}
.pm-detect-quant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.pm-detect-quant-k {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 2px;
}
.pm-detect-quant-v {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-1000);
  white-space: nowrap;
}

/* ---------- Rank ---------- */
.pm-rank-head {
  display: grid;
  grid-template-columns: 24px 1fr 70px 60px 120px;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--ink-150);
  font-size: 10px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.pm-rank-rows {
  /* container with absolute children to allow FLIP */
}
.pm-rank-row {
  position: absolute;
  left: 0; right: 0;
  height: 32px;
  display: grid;
  grid-template-columns: 24px 1fr 70px 60px 120px;
  gap: 10px;
  align-items: center;
  padding: 0 0;
  font-size: 11px;
  transition: top 800ms cubic-bezier(0.6, 0, 0.2, 1), opacity 300ms, transform 300ms;
  border-bottom: 1px solid var(--ink-100);
}
.pm-rank-sev i {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
}
.pm-rank-defect {
  display: flex; flex-direction: column; gap: 0;
  min-width: 0;
}
.pm-rank-id {
  font-size: 10px;
  color: var(--ink-500);
  letter-spacing: 0.02em;
}
.pm-rank-type {
  font-size: 11px;
  color: var(--ink-1000);
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pm-rank-score {
  display: flex; align-items: center; gap: 8px;
}
.pm-rank-bar {
  flex: 1;
  height: 4px;
  background: var(--ink-100);
  border-radius: 2px;
  overflow: hidden;
}
.pm-rank-bar-fill {
  height: 100%;
  transition: width 400ms;
}
.pm-rank-num {
  font-size: 12px;
  color: var(--ink-1000);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  width: 24px;
  text-align: right;
}

/* ---------- Decide ---------- */
.pm-avatar {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink-1000);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--ink-200);
  margin-left: -6px;
}
.pm-avatar:first-child { margin-left: 0; }
.pm-avatar.small {
  width: 16px; height: 16px;
  font-size: 8px;
  margin: 0;
  box-shadow: none;
  border-width: 0;
}
.pm-decide-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--ink-150);
  border-radius: 4px;
  background: var(--paper);
  transition: opacity 250ms, transform 250ms;
}
.pm-decide-id {
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--ink-700);
}
.pm-decide-defect {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-1000);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pm-decide-action {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border: 1px solid;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.pm-export-btn {
  padding: 6px 12px;
  background: var(--ink-1000);
  color: var(--paper);
  border: 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  transition: transform 100ms, background 200ms;
}
.pm-export-btn.pressed {
  transform: scale(0.96);
  background: var(--ink-700);

}


/* ================================================================
   Technology page animated mockups
   ================================================================ */

/* HUD overlay (Vision counter) */
.tm-hud {
  position: absolute;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  padding: 8px 10px;
  box-shadow: 0 2px 8px rgba(10,10,10,0.06);
  min-width: 124px;
}
.tm-hud-tr { right: 14px; top: 14px; }
.tm-hud-big {
  font-size: 26px; font-weight: 700;
  font-family: var(--font-mono);
  color: var(--ink-1000);
  letter-spacing: -0.02em;
  margin: 2px 0 6px;
  line-height: 1;
}
.tm-hud-bar {
  height: 4px;
  background: var(--ink-150);
  border-radius: 2px;
  overflow: hidden;
}
.tm-hud-bar-fill {
  height: 100%; background: var(--ink-1000);
  transition: width 80ms linear;
}

/* Corner tag (campaign label) */
.tm-corner-tag {
  position: absolute;
  background: rgba(10,10,10,0.86); color: #fff;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  font-size: 10px;
}
.tm-corner-tag .pm-mono { font-size: 9.5px; color: inherit; }

/* mockup legend */
.tm-legend {
  position: absolute;
  left: 12px; bottom: 12px;
  display: flex; gap: 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-sm);
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-700);
}
.tm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tm-legend i {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
}

/* Physics rows */
.tm-phy-headrow {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1.6fr 1.4fr;
  gap: 10px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink-150);
}
.tm-phy-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1.6fr 1.4fr;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--ink-100);
}
.tm-phy-row:last-child { border-bottom: 0; }
.tm-phy-defect { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tm-phy-raw, .tm-phy-cal {
  display: flex; align-items: center; gap: 6px;
}
.tm-phy-cal { justify-content: flex-end; }
.tm-phy-bar {
  flex: 1; height: 5px;
  background: var(--ink-150); border-radius: 3px;
  overflow: hidden; min-width: 40px;
}
.tm-phy-bar-fill { display: block; height: 100%; }
.tm-phy-factor {
  display: flex; flex-direction: column;
  font-size: 11px;
  transition: opacity 200ms;
}
.tm-phy-factor-label {
  font-size: 10px;
  color: var(--ink-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Human (review) */
.tm-hum-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--ink-150);
  border-radius: var(--r-sm);
  background: var(--paper);
  transition: opacity 250ms, transform 250ms;
  min-width: 0;
}
.tm-hum-defect {
  flex: 1; min-width: 0;
  font-size: 12px;
  color: var(--ink-1000);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tm-hum-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px;
  font-size: 10px;
  font-family: var(--font-mono);
  border: 1px solid;
  border-radius: 99px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--paper);
}
.tm-audit {
  background: #0A0A0A;
  border-radius: var(--r-md);
  padding: 10px 12px;
  min-width: 0;
  overflow: hidden;
}
.tm-audit .pm-dim { color: rgba(255,255,255,0.5); }
.tm-audit-lines {
  display: flex; flex-direction: column; gap: 3px;
}
.tm-audit-line {
  font-size: 10px;
  color: rgba(255,255,255,0.86);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: tmAuditIn 240ms ease;
}
.tm-audit-line span { margin-right: 4px; }

@keyframes tmAuditIn {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}


/* ================================================================
   Unify mockup — layered 3D twin animation
   ================================================================ */

.unify-pillrow {
  position: absolute;
  left: 14px; top: 14px;
  display: flex; flex-wrap: wrap;
  gap: 5px;
  z-index: 2;
  max-width: 380px;
}
.unify-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  border-radius: 99px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  color: var(--ink-500);
  transition: all 240ms;
  white-space: nowrap;
}
.unify-pill.on {
  background: var(--ink-1000);
  border-color: var(--ink-1000);
  color: var(--paper);
}
.unify-pill.fading { opacity: 0.6; }
.unify-pill.off { opacity: 0.5; }
.unify-pill-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.unify-pill.pulse {
  animation: unifyPillPulse 600ms ease-out;
}
@keyframes unifyPillPulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(10,10,10,0.3); }
  60%  { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(10,10,10,0); }
  100% { transform: scale(1); }
}

.unify-toast {
  position: absolute;
  right: 14px; bottom: 14px;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--ink-1000);
  border-radius: var(--r-md);
  padding: 8px 12px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 16px -6px rgba(10,10,10,0.16);
  animation: unifyToastIn 380ms ease-out;
}
.unify-toast-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--status-ok);
  flex: none;
  box-shadow: 0 0 0 4px rgba(22,163,74,0.18);
}
.unify-toast-l {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--status-ok);
}
.unify-toast-v {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-1000);
}
.unify-toast-n {
  font-size: 10px;
}
@keyframes unifyToastIn {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ================================================================
   UNIFY v2 — Mercury-style polished product mockup
   ================================================================ */
.unify-stage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #FAFAFA 0%, #F4F4F5 100%);
}

/* Left rail: data sources feeding in */
.unify-sources {
  display: flex; flex-direction: column;
  gap: 8px;
  padding-top: 6px;
}
.unify-sources-lbl {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  margin-bottom: 4px;
  padding-left: 2px;
}
.unify-source-card {
  display: grid;
  grid-template-columns: 6px 1fr auto 14px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid rgba(10,10,10,0.06);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(10,10,10,0.03), 0 6px 18px -10px rgba(10,10,10,0.10);
  transition: transform 240ms cubic-bezier(.4,.0,.2,1), opacity 240ms;
}
.unify-source-swatch {
  width: 6px; height: 22px;
  border-radius: 2px;
  flex: none;
}
.unify-source-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-1000);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.unify-source-meta {
  font-size: 10px;
  color: var(--ink-500);
  white-space: nowrap;
}
.unify-source-check {
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.unify-sources-foot {
  margin-top: 10px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-left: 2px;
}

/* Window chrome */
.unify-window {
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(10,10,10,0.06);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(10,10,10,0.04),
    0 24px 60px -16px rgba(10,10,10,0.18),
    0 0 0 1px rgba(10,10,10,0.04);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.unify-window-bar {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #FAFAF8;
  border-bottom: 1px solid rgba(10,10,10,0.06);
  flex: none;
}
.unify-dot { width: 9px; height: 9px; border-radius: 50%; }
.unify-window-crumb {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-700);
  display: flex; gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unify-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #1B1F26;
}
.unify-scan {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}
.unify-canvas-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(251,250,247,0) 60%, rgba(251,250,247,0.08) 100%),
    radial-gradient(120% 80% at 50% 50%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.18) 100%);
}

/* Floating defect callout */
.unify-callout {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: clamp(220px, 50%, 320px);
  background: var(--paper);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow:
    0 1px 2px rgba(10,10,10,0.06),
    0 14px 40px -12px rgba(10,10,10,0.35);
  transition: transform 320ms cubic-bezier(.4,.0,.2,1), opacity 320ms;
}
.unify-callout-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.unify-callout-id {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-700);
  letter-spacing: 0.02em;
}
.unify-callout-sev {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  background: var(--sev-critical);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.unify-callout-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1000);
  line-height: 1.35;
  margin-bottom: 10px;
}
.unify-callout-evidence {
  display: flex; flex-direction: column; gap: 4px;
  border-top: 1px solid var(--ink-150);
  padding-top: 10px;
}
.unify-evidence-row {
  display: grid;
  grid-template-columns: 52px 70px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 11px;
}
.unify-evidence-k {
  font-family: var(--font-mono);
  color: var(--ink-500);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}
.unify-evidence-v {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-1000);
  font-weight: 500;
}
.unify-evidence-note {
  font-size: 10.5px;
  color: var(--ink-500);
}

/* Responsive: stack on narrow screens */
@media (max-width: 720px) {
  .unify-stage { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .unify-sources { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .unify-source-card { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .unify-callout { width: calc(100% - 32px); }
}


/* ================================================================
   Stage: Statistical Analysis (Overview)
   ================================================================ */
.ov-stats { margin-top: 4px; }
.ov-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 12px;
}
.ov-chart {
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  padding: 10px 12px 6px;
  background: var(--paper);
}
.ov-chart-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.ov-chart-title {
  font-size: 12px; font-weight: 600;
}
.ov-chart-ctl {
  font-size: 10px; color: var(--ink-500);
  border: 1px solid var(--ink-200);
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--paper);
}
.ov-chart-ctl-row { display: flex; align-items: center; gap: 6px; }
.ov-chart-toggle { display: flex; align-items: center; gap: 4px; }
.ov-toggle-track {
  width: 22px; height: 12px;
  border-radius: 6px;
  background: var(--ink-200);
  position: relative;
  display: inline-block;
}
.ov-toggle-track.on { background: #3B82F6; }
.ov-toggle-knob {
  position: absolute; top: 1px; left: 1px;
  width: 10px; height: 10px; border-radius: 50%; background: #fff;
  transition: transform 200ms;
}
.ov-toggle-track.on .ov-toggle-knob { transform: translateX(10px); }
.ov-chart-body { position: relative; }
.ov-chart-axis {
  font-size: 9px;
  color: var(--ink-500);
  text-align: center;
  margin-top: 2px;
  font-family: var(--font-mono);
}

/* ================================================================
   Stage: List View
   ================================================================ */
.stage-list {
  position: absolute; inset: 0;
  padding: 14px 20px 16px;
  background: var(--paper);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.list-titlebar {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 8px;
}
.list-title {
  font-size: 16px; font-weight: 600;
  margin: 0;
  display: flex; align-items: center; gap: 6px;
}
.list-title-caret { font-size: 10px; color: var(--ink-500); font-weight: 400; }
.list-sub {
  font-size: 11px; color: var(--ink-500);
  margin-top: 2px;
}
.list-actions {
  display: flex; gap: 6px; align-items: center;
}
.list-search {
  font-size: 11px;
  border: 1px solid var(--ink-200);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--ink-500);
  background: var(--paper);
  min-width: 140px;
}
.list-act-btn {
  font-size: 11px;
  border: 1px solid var(--ink-200);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--ink-700);
  background: var(--paper);
  white-space: nowrap;
}
.list-filterbar {
  display: flex; gap: 6px; align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.list-filter-chip {
  font-size: 11px;
  border: 1px solid var(--ink-200);
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-700);
}
.list-filter-chip.applied {
  background: var(--ink-1000); color: var(--paper);
  border-color: var(--ink-1000);
}
.list-filter-chip-clear {
  font-size: 11px; color: var(--ink-500); cursor: pointer;
}
.list-generate {
  padding: 5px 12px;
  background: var(--ink-1000);
  color: var(--paper);
  border: 1px solid var(--ink-1000);
  border-radius: 4px;
  font-size: 12px; font-weight: 500;
  transition: transform 100ms;
}
.list-generate.pressed { transform: scale(0.96); background: var(--ink-700); }

.list-shared-banner {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--ink-200);
  background: #FAFAF9;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.list-shared-banner b { color: var(--ink-1000); font-weight: 600; }
.list-shared-pin { color: var(--ink-500); }

.list-table {
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--ink-200);
  border-radius: 4px;
}
.list-row {
  display: grid;
  grid-template-columns: 24px 1.5fr 0.8fr 0.9fr 0.7fr 0.8fr 1.1fr 1.2fr 0.6fr 0.5fr 0.7fr;
  gap: 8px;
  padding: 6px 10px;
  font-size: 11px;
  align-items: center;
  border-bottom: 1px solid var(--ink-100);
  transition: opacity 200ms;
}
.list-row-head {
  background: var(--ink-50);
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 600;
  color: var(--ink-500);
  letter-spacing: 0.05em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink-200);
  padding: 8px 10px;
}
.list-id { color: var(--ink-500); font-size: 10px; }
.list-sev {
  font-size: 10px; font-weight: 600;
  white-space: nowrap;
}
.list-sev-critical { color: var(--sev-critical); }
.list-sev-high { color: var(--sev-high); }
.list-sev-medium { color: var(--sev-medium); }
.list-sev-low { color: var(--ink-500); }
.list-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink-700);
  font-size: 10px;
}
.list-cell-icon { color: var(--ink-400); font-size: 11px; }

/* Filter panel */
.list-filterpanel {
  position: absolute;
  top: 0; right: 0;
  width: 220px; height: 100%;
  background: var(--paper);
  border-left: 1px solid var(--ink-200);
  box-shadow: -4px 0 12px rgba(10,10,10,0.08);
  display: flex; flex-direction: column;
  transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 4;
  font-size: 11px;
}
.lfp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 6px;
  font-weight: 600;
}
.lfp-x { color: var(--ink-500); cursor: pointer; }
.lfp-status {
  font-size: 10px; color: #EA580C;
  padding: 4px 14px 6px;
}
.lfp-section {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--ink-100);
  font-weight: 500;
}
.lfp-section.collapsed {
  color: var(--ink-600);
  font-weight: 400;
}
.lfp-section-head {
  display: flex; justify-content: space-between; width: 100%;
}
.lfp-sev-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 4px 14px 10px;
}
.lfp-sev-chip {
  padding: 3px 8px;
  border: 1px solid var(--ink-200);
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  background: var(--paper);
}
.lfp-sev-chip.active {
  background: var(--ink-1000); color: var(--paper); border-color: var(--ink-1000);
}
.lfp-foot {
  margin-top: auto;
  padding: 10px 14px;
  border-top: 1px solid var(--ink-150);
  background: var(--ink-50);
}
.lfp-foot-summary {
  font-size: 10px;
  margin-bottom: 8px;
}
.lfp-foot-summary b { color: var(--ink-1000); }
.lfp-foot-btns {
  display: flex; gap: 6px; align-items: center; justify-content: space-between;
}
.lfp-reset {
  font-size: 11px; color: var(--ink-500); cursor: pointer;
}
.lfp-apply {
  padding: 5px 12px;
  background: var(--ink-1000); color: var(--paper);
  border: 1px solid var(--ink-1000);
  border-radius: 4px;
  font-size: 11px; font-weight: 500;
  transition: transform 100ms;
}
.lfp-apply.pressed { transform: scale(0.96); background: var(--ink-700); }

/* Toast */
.list-toast {
  position: absolute;
  bottom: 14px;
  right: 240px;
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex; align-items: flex-start; gap: 8px;
  z-index: 5;
  max-width: 280px;
  box-shadow: 0 2px 8px rgba(10,10,10,0.08);
}
.list-toast-dot {
  width: 8px; height: 8px; background: #16A34A;
  border-radius: 50%; margin-top: 4px;
}
.list-toast-title { font-size: 12px; font-weight: 600; color: #166534; }
.list-toast-sub { font-size: 10px; color: #166534; opacity: 0.8; }

/* ================================================================
   Stage: 3D View
   ================================================================ */
.stage-3d {
  position: absolute; inset: 0;
  padding: 10px 0 0;
  background: var(--paper);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.s3-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 20px 8px;
}
.s3-topbar-title { font-size: 13px; font-weight: 600; }
.s3-topbar-ctls { display: flex; gap: 6px; }
.s3-ctl-pill {
  padding: 3px 10px;
  border: 1px solid var(--ink-200);
  background: var(--paper);
  border-radius: 4px;
  font-size: 11px;
  display: inline-flex; align-items: center; gap: 6px;
}

/* Heatmap row at top */
.s3-heatmap {
  display: grid;
  grid-template-columns: 110px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 8px;
  padding: 0 20px 8px;
  border-bottom: 1px solid var(--ink-150);
}
.s3-heatmap-labels {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 9px; color: var(--ink-600);
  font-family: var(--font-mono);
}
.s3-heatmap-cells {
  display: grid;
  grid-template-columns: repeat(28, 1fr);
  grid-template-rows: repeat(3, 8px);
  gap: 1px;
}
.s3-heat-cell {
  border-radius: 1px;
  height: 100%;
}
.s3-heatmap-cells { grid-row: 1; }
.s3-heatmap-axis {
  grid-column: 2; grid-row: 2;
  display: flex; justify-content: space-between;
  font-size: 8px; color: var(--ink-500);
  font-family: var(--font-mono);
}

/* Main canvas — immersive tunnel viewport (light/white background) */
.s3-canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #fafaf7;
}
.s3-tunnel-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Real product screenshot used in place of the SVG mock */
.s3-tunnel-real {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  transition: opacity 200ms linear;
}
.s3-stage {
  position: absolute; inset: 0;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  overflow: hidden;
}
.s3-scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  transition: transform 200ms linear;
}

/* Floor */
.s3-floor {
  position: absolute;
  left: -20%; right: -20%;
  bottom: 0; height: 55%;
  background:
    linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%),
    repeating-linear-gradient(90deg, #2a2620 0px, #2a2620 60px, #1f1c18 60px, #1f1c18 61px),
    repeating-linear-gradient(0deg, #2a2620 0px, #2a2620 40px, #1f1c18 40px, #1f1c18 41px),
    linear-gradient(to bottom, #3a3328, #1f1c18);
  transform: rotateX(72deg);
  transform-origin: 50% 100%;
  opacity: 0.9;
}
.s3-ceiling {
  position: absolute;
  left: -20%; right: -20%;
  top: 0; height: 25%;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%),
    linear-gradient(to bottom, #1a1410, #0c0805);
  transform: rotateX(-65deg);
  transform-origin: 50% 0%;
  opacity: 0.85;
}

/* Main brick wall */
.s3-wall {
  position: absolute;
  left: 18%; top: 8%;
  width: 70%; height: 84%;
  transform: rotateY(-26deg);
  transform-origin: left center;
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.6),
    inset -20px 0 80px rgba(0,0,0,0.7);
  border-left: 1px solid rgba(0,0,0,0.5);
}
.s3-wall-tex {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  display: block;
}

/* Defect dots scattered on the wall */
.s3-wall-marker {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.4);
  pointer-events: none;
  transition: opacity 200ms;
}

/* Featured defect patch — bounded selection */
.s3-defect-patch {
  position: absolute;
  border: 1.5px dashed #F97316;
  background: rgba(220, 38, 38, 0.12);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 0 16px rgba(249, 115, 22, 0.4);
  transition: opacity 300ms;
}
.s3-defect-fill {
  position: absolute;
  inset: 4px;
  background:
    repeating-linear-gradient(45deg, rgba(220,38,38,0.18) 0px, rgba(220,38,38,0.18) 4px, transparent 4px, transparent 10px),
    radial-gradient(ellipse at center, rgba(180,60,30,0.3), rgba(60,20,10,0.1));
  border-radius: 1px;
}
.s3-defect-label {
  position: absolute;
  top: -22px; left: -1px;
  background: #F97316;
  color: #fff;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.s3-defect-label span {
  font-weight: 400;
  opacity: 0.85;
  margin-left: 4px;
}

/* Opposite (far) wall — fades into distance */
.s3-wall-far {
  position: absolute;
  right: 8%; top: 12%;
  width: 30%; height: 75%;
  background: linear-gradient(to left,
    rgba(40, 30, 22, 0.85),
    rgba(20, 14, 10, 0.4) 70%,
    transparent);
  transform: rotateY(28deg);
  transform-origin: right center;
  filter: blur(1px);
}

/* Atmospheric overlays on top of 3D */
.s3-vignette {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 95% at 50% 50%, transparent 40%, rgba(0,0,0,0.55) 100%);
}
.s3-dust {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 30%, rgba(255,220,180,0.04) 0%, transparent 12%),
    radial-gradient(circle at 78% 70%, rgba(255,210,160,0.03) 0%, transparent 15%),
    radial-gradient(circle at 55% 25%, rgba(255,225,190,0.03) 0%, transparent 10%);
}

/* Axis overlay (bottom-left) */
.s3-axis-overlay {
  position: absolute;
  bottom: 12px; left: 12px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.9;
}

/* Make focus card pop against dark background */
.s3-focus-card {
  z-index: 5;
}

/* Focus card */
.s3-focus-card {
  position: absolute;
  left: 16px; top: 16px;
  width: 160px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(10,10,10,0.08);
  font-size: 11px;
  transition: opacity 300ms, transform 300ms;
}
.s3-focus-head {
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--ink-150);
  padding-bottom: 6px; margin-bottom: 6px;
}
.s3-focus-arrow { color: var(--ink-500); font-size: 10px; }
.s3-focus-label { font-weight: 600; }
.s3-focus-x { margin-left: auto; color: var(--ink-500); cursor: pointer; }
.s3-focus-rows { display: flex; flex-direction: column; gap: 2px; }
.s3-focus-rows > div {
  display: flex; justify-content: space-between;
  font-size: 10px;
}
.s3-focus-rows span { color: var(--ink-500); }
.s3-focus-rows b { font-weight: 500; font-family: var(--font-mono); }
.s3-focus-thumb {
  margin-top: 8px;
  height: 60px;
  background: repeating-linear-gradient(0deg, #D4D4D4 0, #D4D4D4 4px, #A3A3A3 4px, #A3A3A3 8px),
              repeating-linear-gradient(90deg, transparent 0, transparent 14px, rgba(0,0,0,0.2) 14px, rgba(0,0,0,0.2) 15px);
  border-radius: 3px;
}

/* Right defects panel */
.s3-defects-panel {
  position: absolute;
  right: 0; top: 0;
  width: 220px;
  height: 100%;
  background: var(--paper);
  border-left: 1px solid var(--ink-200);
  padding: 10px 12px;
  display: flex; flex-direction: column;
  font-size: 11px;
}
.s3-dp-head {
  display: flex; justify-content: space-between;
  font-weight: 600;
  margin-bottom: 6px;
}
.s3-dp-clear { color: var(--ink-500); font-weight: 400; cursor: pointer; }
.s3-dp-filtered {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink-50);
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 8px;
}
.s3-dp-dot { width: 6px; height: 6px; background: #DC2626; border-radius: 50%; }
.s3-dp-title { font-size: 11px; font-weight: 600; }
.s3-dp-tabs {
  display: flex; gap: 8px;
  border-bottom: 1px solid var(--ink-150);
  margin-bottom: 6px;
}
.s3-dp-tab {
  padding: 4px 0;
  font-size: 11px;
  color: var(--ink-500);
  cursor: pointer;
}
.s3-dp-tab.active {
  color: var(--ink-1000); font-weight: 600;
  border-bottom: 2px solid var(--ink-1000);
}
.s3-dp-rows {
  flex: 1;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 2px;
}
.s3-dp-row {
  display: grid;
  grid-template-columns: 12px 18px 1fr 28px 28px 28px;
  gap: 4px;
  align-items: center;
  padding: 3px 4px;
  border-bottom: 1px solid var(--ink-100);
  font-size: 10px;
}
.s3-dp-row.selected {
  background: rgba(124, 58, 237, 0.06);
  border-left: 2px solid #7C3AED;
}
.s3-dp-sev {
  width: 16px; height: 16px;
  border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
}

/* View controls */
.s3-view-ctls {
  position: absolute;
  right: 240px; bottom: 12px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 10px;
  display: flex; flex-direction: column; gap: 4px;
  min-width: 80px;
  box-shadow: 0 2px 6px rgba(10,10,10,0.06);
}
.s3-vc-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--ink-500);
  text-transform: uppercase;
}
.s3-vc-views {
  display: flex; gap: 4px;
}
.s3-vc-views span {
  padding: 2px 6px;
  border: 1px solid var(--ink-200);
  border-radius: 3px;
  font-size: 9px;
  color: var(--ink-600);
}
.s3-vc-views span.active {
  background: var(--ink-1000); color: var(--paper); border-color: var(--ink-1000);
}
.s3-vc-pad {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--ink-600);
}
.s3-vc-pad > span { display: flex; gap: 4px; align-items: center; }
.s3-vc-center {
  width: 6px; height: 6px; background: var(--ink-700);
  border-radius: 50%;
  display: inline-block;
}
.s3-vc-zoom {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--ink-150);
  padding-top: 4px;
}

/* Generic */
.pm-mono { font-family: var(--font-mono); }
.pm-dim { color: var(--ink-500); }


/* ================================================================
   Map: Elevation Profile panel (slides in from right)
   ================================================================ */
.map-elev-panel {
  position: absolute;
  top: 14%;
  right: 18px;
  width: 280px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(10,10,10,0.12);
  transition: opacity 300ms, transform 300ms;
  z-index: 3;
}
.mep-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 6px;
}
.mep-title { font-size: 12px; font-weight: 600; }
.mep-sub { font-size: 10px; color: var(--ink-500); font-family: var(--font-mono); }
.mep-x { color: var(--ink-500); font-size: 12px; cursor: pointer; }
.mep-foot {
  display: flex; gap: 12px; margin-top: 6px;
  padding-top: 6px; border-top: 1px solid var(--ink-150);
  font-size: 10px;
}
.mep-foot > div { display: flex; flex-direction: column; }
.mep-foot span { color: var(--ink-500); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.04em; }
.mep-foot b { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ================================================================
   Map: Street View panel
   ================================================================ */
.map-streetview-panel {
  position: absolute;
  top: 46%;
  right: 18px;
  width: 280px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  padding: 8px 10px 10px;
  box-shadow: 0 6px 20px rgba(10,10,10,0.12);
  transition: opacity 300ms, transform 300ms;
  z-index: 3;
}
.msv-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  padding-bottom: 6px;
}
.msv-pin { font-size: 12px; }
.msv-title { font-weight: 600; flex: 0 0 auto; }
.msv-coords { color: var(--ink-500); font-family: var(--font-mono); font-size: 10px; flex: 1; }
.msv-x { color: var(--ink-500); cursor: pointer; }
.msv-photo {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: 4px;
  overflow: hidden;
  background: #87b3d4;
}
.msv-sky {
  position: absolute; top: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to bottom, #b8d4e8, #ddead0);
}
.msv-tree {
  position: absolute;
  width: 90px; height: 100px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 40%, #4a6b3a 0%, #2d4a23 100%),
    radial-gradient(ellipse 80% 60% at 50% 70%, #5a7c46 0%, transparent 70%);
  border-radius: 50% 50% 30% 30%;
}
.msv-tree-l { left: -20px; bottom: 30%; }
.msv-tree-l2 { left: -40px; bottom: 18%; width: 100px; height: 80px; opacity: 0.85; }
.msv-hedge {
  position: absolute;
  right: -10px;
  bottom: 22%;
  width: 50%;
  height: 60%;
  background:
    radial-gradient(ellipse 100% 50% at 50% 100%, #5a7c46 0%, #3d5a30 100%);
  border-radius: 40% 30% 8% 8%;
}
.msv-road {
  position: absolute;
  bottom: 0; left: 50%;
  width: 80%;
  height: 42%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #b8b2a4 0%, #8a8478 100%);
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
}
.msv-road-line {
  position: absolute;
  bottom: 0; left: 50%;
  width: 4px;
  height: 42%;
  transform: translateX(-50%);
  background: repeating-linear-gradient(to bottom, #fff 0, #fff 6px, transparent 6px, transparent 14px);
  opacity: 0.7;
  clip-path: polygon(48% 0, 52% 0, 90% 100%, 10% 100%);
}
.msv-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, transparent 50%, rgba(0,0,0,0.25) 100%);
  pointer-events: none;
}
.msv-compass {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(10,10,10,0.6);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 600;
}
.msv-tag {
  position: absolute;
  bottom: 8px; left: 8px;
  background: rgba(10,10,10,0.6);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-family: var(--font-mono);
}

/* ================================================================
   List: Dialog modals (Save / Share)
   ================================================================ */
.list-dialog-backdrop {
  position: absolute; inset: 0;
  background: rgba(10,10,10,0.35);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: opacity 200ms;
}
.list-dialog {
  width: 360px;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(10,10,10,0.25);
  overflow: hidden;
  transition: transform 200ms;
}
.list-dialog-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-150);
  display: flex; justify-content: space-between; align-items: center;
}
.list-dialog-head h4 {
  font-size: 14px; font-weight: 600;
  margin: 0;
}
.list-dialog-x {
  color: var(--ink-500); cursor: pointer; font-size: 14px;
}
.list-dialog-body {
  padding: 14px 16px;
}
.list-dialog-label {
  display: block;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.list-dialog-input {
  width: 100%;
  border: 1px solid var(--ink-200);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  background: var(--paper);
  font-family: var(--font-sans);
  color: var(--ink-1000);
}
.list-dialog-textarea {
  width: 100%;
  border: 1px solid var(--ink-200);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: var(--font-sans);
  resize: none;
  color: var(--ink-1000);
}
.list-dialog-summary {
  margin-top: 10px;
  padding: 6px 10px;
  background: var(--ink-50);
  border-radius: 4px;
  font-size: 11px;
  color: var(--ink-600);
}
.list-dialog-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--ink-150);
  display: flex; gap: 8px; justify-content: flex-end;
  background: var(--ink-50);
}
.list-dialog-cancel {
  padding: 5px 12px;
  font-size: 11px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 4px;
  color: var(--ink-700);
}
.list-dialog-primary {
  padding: 5px 14px;
  font-size: 11px;
  background: var(--ink-1000);
  color: var(--paper);
  border: 1px solid var(--ink-1000);
  border-radius: 4px;
  font-weight: 500;
}
.list-dialog-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--ink-50);
  border-radius: 4px;
}
.list-dialog-row-icon { font-size: 16px; }
.list-dialog-row-title { font-size: 12px; font-weight: 600; }
.list-dialog-row-sub { font-size: 10px; color: var(--ink-500); }
.list-dialog-access {
  font-size: 11px;
  color: var(--ink-700);
  padding: 3px 8px;
  border: 1px solid var(--ink-200);
  border-radius: 3px;
  background: var(--paper);
}
.list-dialog-email {
  display: flex; gap: 6px; align-items: center;
}
.list-dialog-email .list-dialog-input { flex: 1; }
.list-dialog-perm {
  font-size: 11px;
  color: var(--ink-700);
  padding: 5px 10px;
  border: 1px solid var(--ink-200);
  border-radius: 4px;
  background: var(--paper);
  white-space: nowrap;
}
.list-dialog-checkbox {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--ink-700);
}
.list-dialog-check {
  width: 14px; height: 14px;
  background: var(--ink-1000);
  color: var(--paper);
  font-size: 9px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center; justify-content: center;
}
