/* ============================================================================
   Cult Shield · Live Scan demo
   Shows the agent process: 49 Etsy listings analyzed, 47 matches, 1 notice drafted.
   Self-contained section, dark surface, sits between trust-shelf and solutions.
   ============================================================================ */

.cs-scan {
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(13, 148, 136, 0.16), transparent 65%),
    var(--cs-surface-dark);
  color: var(--cs-text-on-dark);
  padding: var(--cs-20) 0 var(--cs-24);
  border-top: 1px solid var(--cs-border-dark);
  border-bottom: 1px solid var(--cs-border-dark);
  position: relative;
  overflow: hidden;
}

.cs-scan::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at center, #000 30%, transparent 80%);
}

.cs-scan > .cs-container { position: relative; z-index: 1; }

.cs-scan-head {
  text-align: center;
  max-width: 64ch;
  margin: 0 auto var(--cs-12);
}

.cs-scan-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  background: rgba(13, 148, 136, 0.14);
  border: 1px solid rgba(13, 148, 136, 0.32);
  border-radius: var(--cs-r-pill);
  font-family: var(--cs-font-ui);
  font-size: var(--cs-text-xs);
  color: #5EEAD4;
  font-weight: 600;
  letter-spacing: var(--cs-tracking-mega);
  text-transform: uppercase;
  margin-bottom: var(--cs-5);
}

.cs-scan-head .eyebrow .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5EEAD4;
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.55);
  animation: cs-scan-pulse 1.8s var(--cs-ease) infinite;
}

@keyframes cs-scan-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(94, 234, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); }
}

.cs-scan-head h2 {
  font-family: var(--cs-font-display);
  font-size: var(--cs-text-3xl);
  color: #F4F7FB;
  letter-spacing: -0.022em;
  line-height: 1.1;
  font-weight: 600;
  margin-bottom: var(--cs-4);
}

.cs-scan-head h2 .accent {
  color: #5EEAD4;
  font-style: italic;
  font-weight: 500;
}

.cs-scan-head p {
  font-size: var(--cs-text-md);
  color: rgba(220, 235, 255, 0.66);
  max-width: 52ch;
  margin: 0 auto;
}

/* ----------------------------------------------------------------------------
   Browser frame
   ---------------------------------------------------------------------------- */

.cs-scan-frame {
  max-width: 1180px;
  margin: 0 auto;
  background: #0B0E14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--cs-r-2xl);
  box-shadow:
    0 24px 80px -20px rgba(0, 0, 0, 0.5),
    0 4px 16px -4px rgba(13, 148, 136, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.cs-scan-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(11, 14, 20, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cs-scan-bar-dots {
  display: flex;
  gap: 7px;
}
.cs-scan-bar-dots span {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.cs-scan-bar-dots span:nth-child(1) { background: #FF5F57; }
.cs-scan-bar-dots span:nth-child(2) { background: #FEBC2E; }
.cs-scan-bar-dots span:nth-child(3) { background: #28C840; }

.cs-scan-bar-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--cs-r-md);
  font-family: var(--cs-font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}
.cs-scan-bar-url svg { width: 12px; height: 12px; opacity: 0.5; flex-shrink: 0; }
.cs-scan-bar-url { min-width: 0; }
.cs-scan-bar-url span { white-space: nowrap; }
.cs-scan-bar-url .host { color: rgba(255, 255, 255, 0.85); }
.cs-scan-bar-url .path {
  color: rgba(94, 234, 212, 0.85);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-scan-bar-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  background: rgba(94, 234, 212, 0.10);
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: var(--cs-r-pill);
  font-family: var(--cs-font-ui);
  font-size: 11px;
  font-weight: 600;
  color: #5EEAD4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cs-scan-bar-status .blink {
  width: 6px; height: 6px; border-radius: 50%;
  background: #5EEAD4;
  animation: cs-scan-blink 1.4s ease-in-out infinite;
}
@keyframes cs-scan-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

/* ----------------------------------------------------------------------------
   Main scan grid (3 column on desktop, stack on mobile)
   ---------------------------------------------------------------------------- */

.cs-scan-grid {
  display: grid;
  /* minmax(0,…): long unbreakable strings (shop handles) must never widen the track */
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

@media (min-width: 920px) {
  .cs-scan-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, 0.95fr);
  }
}

.cs-scan-col {
  padding: 22px 22px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
@media (min-width: 920px) {
  .cs-scan-col {
    border-top: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
  }
  .cs-scan-col:last-child { border-right: 0; }
}

.cs-scan-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cs-scan-col-head h3 {
  font-family: var(--cs-font-ui);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.005em;
}

.cs-scan-col-head .meta {
  font-family: var(--cs-font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
}

/* ----------------------------------------------------------------------------
   Stream (left col): rolling list of Etsy listings being analyzed
   ---------------------------------------------------------------------------- */

.cs-scan-stream {
  position: relative;
  height: 340px;
  overflow: hidden;
  border-radius: var(--cs-r-md);
  background:
    linear-gradient(to bottom,
      rgba(11, 14, 20, 0.0) 0%,
      rgba(11, 14, 20, 0.0) 78%,
      rgba(11, 14, 20, 0.85) 96%,
      rgba(11, 14, 20, 1) 100%
    ),
    rgba(255, 255, 255, 0.015);
}

.cs-scan-stream::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(11, 14, 20, 1) 0%,
    rgba(11, 14, 20, 0.6) 4%,
    transparent 14%);
}

.cs-scan-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 4px 10px;
  animation: cs-scan-scroll 28s linear infinite;
}

@keyframes cs-scan-scroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.cs-scan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: var(--cs-r-md);
  font-family: var(--cs-font-ui);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  transition: all var(--cs-fast) var(--cs-ease);
}

.cs-scan-row.is-match {
  background: rgba(193, 35, 42, 0.08);
  border-color: rgba(255, 107, 107, 0.32);
  color: rgba(255, 220, 220, 0.95);
}

.cs-scan-row.is-clean {
  background: rgba(14, 135, 84, 0.06);
  border-color: rgba(74, 222, 128, 0.20);
  color: rgba(220, 235, 230, 0.85);
}

.cs-scan-row .ico {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cs-scan-row.is-match .ico {
  background: rgba(255, 107, 107, 0.20);
  color: #FF8B92;
}
.cs-scan-row.is-clean .ico {
  background: rgba(74, 222, 128, 0.18);
  color: #4ADE80;
}

.cs-scan-row .title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
  font-weight: 500;
}

.cs-scan-row .conf {
  font-family: var(--cs-font-mono);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cs-scan-row.is-match .conf { color: #FF8B92; }
.cs-scan-row.is-clean .conf { color: #4ADE80; }

/* ----------------------------------------------------------------------------
   Detection panel (center col): biggest match shown side-by-side
   ---------------------------------------------------------------------------- */

.cs-scan-detect {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cs-scan-detect-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.cs-scan-card {
  min-width: 0;
  border-radius: var(--cs-r-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-scan-card.is-orig {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(13, 148, 136, 0.02));
  border-color: rgba(94, 234, 212, 0.20);
}

.cs-scan-card.is-rip {
  background: linear-gradient(135deg, rgba(193, 35, 42, 0.10), rgba(193, 35, 42, 0.02));
  border-color: rgba(255, 107, 107, 0.30);
  animation: cs-scan-rip-glow 3s var(--cs-ease) infinite;
}

@keyframes cs-scan-rip-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
  50%      { box-shadow: 0 0 24px -4px rgba(255, 107, 107, 0.32); }
}

.cs-scan-card .tag {
  font-family: var(--cs-font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cs-scan-card.is-orig .tag { color: #5EEAD4; }
.cs-scan-card.is-rip  .tag { color: #FF8B92; }

.cs-scan-card .thumb {
  aspect-ratio: 1;
  border-radius: var(--cs-r-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.0)),
    linear-gradient(135deg, #1B2A40 0%, #0A1322 100%);
  position: relative;
  overflow: hidden;
}

.cs-scan-card.is-rip .thumb {
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(255, 107, 107, 0.04), rgba(255, 107, 107, 0)),
    linear-gradient(135deg, #2A1820 0%, #160B14 100%);
}

.cs-scan-card .thumb svg {
  width: 60%;
  height: 60%;
  opacity: 0.7;
}

.cs-scan-card .name {
  font-family: var(--cs-font-ui);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
}

.cs-scan-card .name { overflow-wrap: anywhere; }

.cs-scan-card .src {
  font-family: var(--cs-font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.cs-scan-card .price {
  font-family: var(--cs-font-mono);
  font-size: 11px;
  font-weight: 600;
}
.cs-scan-card.is-orig .price { color: #5EEAD4; }
.cs-scan-card.is-rip  .price { color: #FF8B92; }

/* Signal rows */
.cs-scan-signals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--cs-r-md);
}

.cs-scan-signal {
  display: grid;
  grid-template-columns: 96px 1fr 40px;
  align-items: center;
  gap: 10px;
}

.cs-scan-signal .lbl {
  font-family: var(--cs-font-ui);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

.cs-scan-signal .bar {
  height: 6px;
  border-radius: var(--cs-r-pill);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}

.cs-scan-signal .bar > span {
  position: absolute;
  /* full-width span scaled down by --cs-fill; right:auto left width at 0 and the fill never showed */
  inset: 0;
  background: linear-gradient(90deg, #0D9488, #5EEAD4);
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(var(--cs-fill, 0));
  transition: transform 1.2s var(--cs-ease-out) 0.3s;
}

.cs-scan-signal .val {
  font-family: var(--cs-font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #5EEAD4;
  text-align: right;
  letter-spacing: 0.02em;
}

.cs-scan-signal.is-warn .bar > span { background: linear-gradient(90deg, #C2780A, #F59E0B); }
.cs-scan-signal.is-warn .val { color: #FCD34D; }
.cs-scan-signal.is-danger .bar > span { background: linear-gradient(90deg, #C1232A, #FF6B6B); }
.cs-scan-signal.is-danger .val { color: #FF8B92; }

/* ----------------------------------------------------------------------------
   Outcome panel (right col): notice drafted + filed
   ---------------------------------------------------------------------------- */

.cs-scan-outcome {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.cs-scan-event {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--cs-r-md);
}

.cs-scan-event .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}
.cs-scan-event.is-ok    .dot { background: #4ADE80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.5); }
.cs-scan-event.is-info  .dot { background: #5EEAD4; box-shadow: 0 0 8px rgba(94, 234, 212, 0.5); }
.cs-scan-event.is-warn  .dot { background: #F59E0B; box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.cs-scan-event.is-fired .dot { background: #5EEAD4; animation: cs-scan-blink 1.4s ease-in-out infinite; }

.cs-scan-event .body { flex: 1; min-width: 0; }
.cs-scan-event .head {
  font-family: var(--cs-font-ui);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.005em;
}
.cs-scan-event .sub {
  font-family: var(--cs-font-mono);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.cs-scan-event .ts {
  font-family: var(--cs-font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  margin-left: auto;
}

.cs-scan-cta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.18), rgba(13, 148, 136, 0.04));
  border: 1px solid rgba(94, 234, 212, 0.30);
  border-radius: var(--cs-r-md);
}

.cs-scan-cta .label {
  font-family: var(--cs-font-ui);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5EEAD4;
}

.cs-scan-cta .copy {
  font-family: var(--cs-font-display);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
}

.cs-scan-cta button {
  margin-top: 6px;
  padding: 10px 14px;
  background: #0D9488;
  color: #fff;
  border-radius: var(--cs-r-sm);
  font-family: var(--cs-font-ui);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--cs-fast) var(--cs-ease);
}
.cs-scan-cta button:hover { background: #0F766E; }

/* ----------------------------------------------------------------------------
   Counters footer
   ---------------------------------------------------------------------------- */

.cs-scan-counters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(11, 14, 20, 0.92);
}

@media (min-width: 720px) {
  .cs-scan-counters { grid-template-columns: repeat(4, 1fr); }
}

.cs-scan-counter {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 720px) {
  .cs-scan-counter:last-child { border-right: 0; }
  .cs-scan-counter { border-bottom: 0; }
}

.cs-scan-counter .num {
  font-family: var(--cs-font-display);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 600;
  color: #F4F7FB;
  letter-spacing: -0.015em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cs-scan-counter .lbl {
  font-family: var(--cs-font-ui);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

.cs-scan-counter.is-rip .num { color: #FF8B92; }
.cs-scan-counter.is-ok .num  { color: #5EEAD4; }

/* ----------------------------------------------------------------------------
   Receipts strip below the frame
   ---------------------------------------------------------------------------- */

.cs-scan-receipts {
  max-width: 1180px;
  margin: var(--cs-8) auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 760px) {
  .cs-scan-receipts { grid-template-columns: repeat(3, 1fr); }
}

.cs-scan-receipt {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--cs-r-md);
}

.cs-scan-receipt .lbl {
  font-family: var(--cs-font-mono);
  font-size: 10.5px;
  color: rgba(94, 234, 212, 0.85);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cs-scan-receipt .body {
  font-family: var(--cs-font-ui);
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.cs-scan-receipt .body strong {
  color: #F4F7FB;
  font-weight: 600;
}

/* ----------------------------------------------------------------------------
   Below-the-fold caption
   ---------------------------------------------------------------------------- */

.cs-scan-caption {
  max-width: 1180px;
  margin: var(--cs-6) auto 0;
  text-align: center;
  font-family: var(--cs-font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.04em;
}

.cs-scan-caption .lnk {
  color: rgba(94, 234, 212, 0.8);
  text-decoration: underline;
  text-decoration-color: rgba(94, 234, 212, 0.3);
  text-underline-offset: 3px;
}
.cs-scan-caption .lnk:hover { color: #5EEAD4; }

@media (max-width: 520px) {
  /* traffic dots are decoration; the shop URL is the evidence */
  .cs-scan-bar-dots { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-scan-rows,
  .cs-scan-card.is-rip,
  .cs-scan-bar-status .blink,
  .cs-scan-head .eyebrow .pulse,
  .cs-scan-event.is-fired .dot {
    animation: none !important;
  }
}
