/* ============================================================
   Liveness Detection — page-specific pieces on top of the shared
   keytech sheet (document-verification.css). Two editorial ledgers:
   the three-family attack taxonomy and the technical-benefits rows —
   hairline typography instead of card walls (the old ModulePage render
   read blocky; Sofia, 2026-08-06).
   Scope: .p-keytech-liveness-detection (root also carries
   .p-document-verification for the shared dv-* rules).
   ============================================================ */

/* ---------- attack taxonomy: three hairline columns ---------- */
.p-keytech-liveness-detection .lvd-tax {
  background: var(--color-background);
  color: var(--color-foreground);
}
.p-keytech-liveness-detection .lvd-tax__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 48px;
}
@media (min-width: 900px) {
  .p-keytech-liveness-detection .lvd-tax__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
  }
}
.p-keytech-liveness-detection .lvd-tax__family {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--track-tighter);
  font-size: var(--fs-xl);
  line-height: 1.15;
  color: var(--color-black);
}
.p-keytech-liveness-detection .lvd-tax__list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.p-keytech-liveness-detection .lvd-tax__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--color-border-light);
  padding: 14px 0;
}
.p-keytech-liveness-detection .lvd-tax__item:last-child { padding-bottom: 0; }
.p-keytech-liveness-detection .lvd-tax__name {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-black);
}
.p-keytech-liveness-detection .lvd-tax__line {
  font-size: var(--fs-xs);
  line-height: var(--leading-snug);
  color: var(--color-grey-on-white);
}

/* ---------- technical benefits: two-column essay rows ---------- */
.p-keytech-liveness-detection .lvd-bene {
  background: var(--color-grey-100);
  color: var(--color-foreground);
}
.p-keytech-liveness-detection .lvd-bene__rows { margin-top: 48px; }
.p-keytech-liveness-detection .lvd-bene__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 64px;
  border-top: 1px solid var(--color-border-light);
  padding: 28px 0;
}
@media (min-width: 900px) {
  .p-keytech-liveness-detection .lvd-bene__row {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    padding: 32px 0;
  }
}
.p-keytech-liveness-detection .lvd-bene__row:last-child { padding-bottom: 0; border-bottom: 0; }
.p-keytech-liveness-detection .lvd-bene__name {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--track-tighter);
  font-size: var(--fs-xl);
  line-height: 1.18;
  color: var(--color-black);
}
.p-keytech-liveness-detection .lvd-bene__line {
  font-size: var(--fs-body);
  line-height: var(--leading-body);
  color: var(--color-grey-on-white);
  max-width: 68ch;
}

/* ---------- Deepsight banner layout (copy left, CTA right) ----------
   the dark band + blue glow come from .dv-deepsight
   (document-verification.css); this mirrors the deepfake page's
   dfd-banner recipe under this page's own scope */
.p-keytech-liveness-detection .lvd-banner {
  position: relative;
  display: grid;
  gap: 28px;
}
@media (min-width: 900px) {
  .p-keytech-liveness-detection .lvd-banner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 64px;
  }
}
.p-keytech-liveness-detection .lvd-banner .dv-intro { max-width: 620px; }

/* the module tagline runs longer than the docv hero sub — widen its
   measure so it holds two lines (layout-gate rule: subs ≤ 2 lines) */
.p-keytech-liveness-detection .dv-hero__inner .dv-hero__sub { max-width: 60ch; }

/* ---------- hero foot visual: the liveness capture orb (v2) ----------
   the design file's liveness circle rebuilt as a TRANSPARENT composition
   (Mike r2: smaller detail at the fold like the digital-id hero, no
   white card, live selfie video instead of the still photo). The aurora
   shows through; only the ring, glass, marks and Pass chip paint. */
.p-keytech-liveness-detection .lvd-orb {
  position: relative;
  /* fully visible above the card foot on every viewport: the 50svh foot
     band minus the float margin caps the diameter on short windows
     (Mike r3/r4: a touch smaller twice, and it sits a bit lower) */
  width: min(300px, 54vw, calc(50svh - 70px));
  aspect-ratio: 1;
  /* r5: rides 10px higher */
  margin-bottom: 34px;
}
/* soft white halo just outside the blue ring (the asset's outer circle) */
.p-keytech-liveness-detection .lvd-orb::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  /* r6: a touch more white light in the halo (reference: the outer
     circle reads grey-white, strongest over the top arc) */
  border: 1px solid color-mix(in oklab, var(--color-white) 26%, transparent);
  background: radial-gradient(
    closest-side,
    transparent 72%,
    color-mix(in oklab, var(--color-white) 12%, transparent) 92%,
    transparent 100%
  );
}
.p-keytech-liveness-detection .lvd-orb__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* r7 (Mike): the blur INVERTS — the ground blurs, the inner circle
   stays sharp. The base loop frosts as the ground; a second registered
   copy shows sharp inside the glass circle. (A masked backdrop-filter
   ring would need only one video, but Chromium ignores mask on
   backdrop-filter — the whole face frosted.) */
.p-keytech-liveness-detection .lvd-orb__cam {
  position: absolute;
  inset: 9%;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-black);
  /* r8: just a whisper of frost on the ground */
  filter: blur(3px);
}
/* the sharp core: same clip, sized/offset so it registers pixel-exact
   with the ground (r8: the capture mask reaches almost to the blue ring
   — ground box 82% from 9%; core box 77% from 11.5% → inner video spans
   (9−11.5)/77 = −3.25% offset, 82/77 = 106.5% size) */
.p-keytech-liveness-detection .lvd-orb__core {
  position: absolute;
  inset: 11.5%;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}
.p-keytech-liveness-detection .lvd-orb__corevid {
  position: absolute;
  left: -3.25%;
  top: -3.25%;
  width: 106.5%;
  height: 106.5%;
  object-fit: cover;
}
/* inner glass circle — outline + faint tint only now; the face behind
   it stays fully visible (the ground ring owns the blur) */
.p-keytech-liveness-detection .lvd-orb__glass {
  position: absolute;
  inset: 11.5%;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--color-white) 30%, transparent);
  background: color-mix(in oklab, var(--color-white) 4%, transparent);
}
/* landmark callouts — dots on the face, leader lines reaching past the
   ring (the marks canvas is wider than the orb; overflow stays visible) */
.p-keytech-liveness-detection .lvd-orb__marks {
  position: absolute;
  top: 0;
  height: 100%;
  left: -30%;
  width: 160%;
  /* the base sheet clamps svg to max-width 100% — this canvas is wider
     than the orb on purpose (leader lines reach past the ring) */
  max-width: none;
  color: var(--color-white);
  overflow: visible;
}
.p-keytech-liveness-detection .lvd-orb__pass {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 6px 18px;
  border-radius: 8px;
  background: var(--color-green-flow);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-lg);
  line-height: 1.4;
  box-shadow: none;
}
@media (max-width: 767px) {
  .p-keytech-liveness-detection .lvd-orb { width: min(230px, 60vw); margin-bottom: 28px; }
  .p-keytech-liveness-detection .lvd-orb__pass { font-size: var(--fs-body); padding: 5px 14px; }
}

/* ============================================================
   HOW IT WORKS — the four pipeline checks as WHITE dashboard cards
   (Mike 2026-08-08): the deepsight dsw screening-console vocabulary
   rebuilt page-scoped as lvw-* on the sol-how stage's light gradient
   panel. One card per check, crossfaded by the standalone scroll-walk;
   bars fill, pills pop, lanes rise each time a step activates.
   ============================================================ */
/* This page gives the How-it-works stage more room so the in-window dashboard
   (nav + face + checks) can breathe; scoped to liveness — other pages keep the
   shared 1.05/0.95 balance. */
@media (min-width: 1024px) {
  .p-keytech-liveness-detection .p-solution .sol-how__inner {
    grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr);
    gap: 56px;
  }
}
/* How it works rides the shared solution-hero.js standalone pin/scroll-walk
   (the same as deepsight/deepfake): the whole lvw-deck console crossfades its
   panels on desktop, and on mobile the pairing clones the console per step so
   dashFit scales each to the column. No page-scoped walk CSS needed. */

.p-keytech-liveness-detection .lvw-deck {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 640px);
  margin-inline: auto;
  border-radius: 14px;
  border: 1px solid var(--color-border-light);
  background: var(--color-white);
  box-shadow: none;
  overflow: hidden;
}
/* Browser chrome is now the shared <BrowserChrome /> component (brchrome-*,
   components/browser-chrome.css) — the bespoke .lvw-chrome* CSS was removed. */
/* the dashboard inside the window: labeled nav + main */
.p-keytech-liveness-detection .lvw-app {
  display: flex;
  align-items: stretch;
  min-height: 300px;
}
.p-keytech-liveness-detection .lvw-appnav {
  flex-shrink: 0;
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 18px 12px;
  background: var(--color-grey-50);
  border-right: 1px solid var(--color-grey-100);
}
.p-keytech-liveness-detection .lvw-appnav__line {
  height: 7px; border-radius: 999px; background: var(--color-grey-200);
}
.p-keytech-liveness-detection .lvw-appmain {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.p-keytech-liveness-detection .lvw-apphead {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 20px;
  border-bottom: 1px solid var(--color-grey-100);
  flex-shrink: 0;
}
.p-keytech-liveness-detection .lvw-apphead__pass {
  padding: 4px 12px; border-radius: 999px;
  background: var(--color-green-100); color: var(--color-green-600);
  font-size: 12px; font-weight: 600;
}
.p-keytech-liveness-detection .lvw-apphead__sid {
  font-size: 12px; font-weight: 500; color: var(--color-grey-400);
}
.p-keytech-liveness-detection .lvw-body {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
}
/* ---- face capture (left) — the same selfie loop as the hero, cropped to a
   round avatar. (Landmark-mesh overlay is currently disabled in the markup;
   its styles are retained below for a quick re-enable.) ---- */
.p-keytech-liveness-detection .lvw-face {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 18px 20px;
  border-right: 1px solid var(--color-grey-100);
}
.p-keytech-liveness-detection .lvw-face__cap {
  position: relative;
  width: 150px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-blue-100);
  border: 1px solid var(--color-grey-100);
}
.p-keytech-liveness-detection .lvw-face__cam {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.p-keytech-liveness-detection .lvw-face__mesh {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: var(--color-blue-500);
}
.p-keytech-liveness-detection .lvw-mesh__links path {
  stroke-dasharray: 64; stroke-dashoffset: 64;
  animation: lvwMeshDraw 1.1s ease forwards, lvwMeshBreathe 3.2s ease-in-out 1.3s infinite;
}
.p-keytech-liveness-detection .lvw-mesh__links path:nth-child(n + 7) { animation-delay: 0.2s, 1.4s; }
.p-keytech-liveness-detection .lvw-mesh__links path:nth-child(n + 13) { animation-delay: 0.4s, 1.5s; }
.p-keytech-liveness-detection .lvw-mesh__dots circle {
  fill: var(--color-white);
  opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: lvwDotPop 0.4s ease forwards, lvwDotTwinkle 3.2s ease-in-out 1.3s infinite;
}
.p-keytech-liveness-detection .lvw-mesh__dots circle:nth-child(even) { animation-delay: 0.25s, 1.5s; }
.p-keytech-liveness-detection .lvw-mesh__dots circle:nth-child(3n) { animation-delay: 0.45s, 1.7s; }
.p-keytech-liveness-detection .lvw-face__scan {
  position: absolute; left: 0; right: 0; top: 0; height: 34%;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in oklab, var(--color-blue-500) 24%, transparent),
    transparent
  );
  animation: lvwScan 3.6s ease-in-out infinite;
}
@keyframes lvwMeshDraw { to { stroke-dashoffset: 0; } }
@keyframes lvwMeshBreathe { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.95; } }
@keyframes lvwDotPop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes lvwDotTwinkle { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes lvwScan {
  0% { transform: translateY(-30%); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(330%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .p-keytech-liveness-detection .lvw-mesh__links path { animation: none; stroke-dashoffset: 0; opacity: 0.8; }
  .p-keytech-liveness-detection .lvw-mesh__dots circle { animation: none; opacity: 1; }
  .p-keytech-liveness-detection .lvw-face__scan { display: none; }
}
.p-keytech-liveness-detection .lvw-screens {
  position: relative;
  display: grid;
  flex: 1;
  min-width: 0;
  align-self: stretch;
}
.p-keytech-liveness-detection .lvw-screen {
  grid-area: 1 / 1;
  align-self: start;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 236px;
  padding: 18px 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.p-keytech-liveness-detection .lvw-screen.is-active {
  opacity: 1;
  transition: opacity 0.35s ease 0.05s;
}
.p-keytech-liveness-detection .lvw-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-grey-on-white);
}
.p-keytech-liveness-detection .lvw-head .ds-icon { width: 18px; height: 18px; color: var(--color-grey-400); }

/* score table rows (label · fill bar · tone pill) */
.p-keytech-liveness-detection .lvw-table { display: flex; flex-direction: column; }
.p-keytech-liveness-detection .lvw-trow {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.p-keytech-liveness-detection .lvw-trow:last-child { border-bottom: 0; }
/* verdict rows (spoof checks) — label + pill, no score bar; same hairline
   row style as the scored rows (text · pill · separator, no boxes) */
.p-keytech-liveness-detection .lvw-trow--split { grid-template-columns: minmax(0, 1fr) auto; }
.p-keytech-liveness-detection .lvw-trow__lbl { font-size: 12px; font-weight: 500; color: var(--color-grey-500); }
.p-keytech-liveness-detection .lvw-score {
  position: relative;
  height: 8px;
  border-radius: 5px;
  background: var(--color-grey-100);
  overflow: hidden;
}
.p-keytech-liveness-detection .lvw-score__fill {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: var(--color-blue);
  transform-origin: left center;
  transform: scaleX(var(--v, 0));
}

/* tone pills */
.p-keytech-liveness-detection .lvw-pill {
  white-space: nowrap;
  justify-self: end;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  padding: 3px 9px;
  border-radius: 999px;
}
.p-keytech-liveness-detection .lvw-pill--good { background: var(--color-green-100); color: var(--color-green-600); }
.p-keytech-liveness-detection .lvw-pill--bad { background: var(--color-red-100); color: var(--color-red-600); }

/* lanes (glyph · label · pill) */

/* footer chips */
.p-keytech-liveness-detection .lvw-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.p-keytech-liveness-detection .lvw-chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-grey-100);
  color: var(--color-grey-on-white);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.p-keytech-liveness-detection .lvw-chip--accent {
  background: color-mix(in oklab, var(--color-blue-500) 14%, transparent);
  color: var(--color-blue);
}

/* choreography — bars fill, pills pop, lanes rise on each activation */
.p-keytech-liveness-detection .lvw-screen .lvw-score__fill { transform: scaleX(0); }
.p-keytech-liveness-detection .lvw-screen.is-active .lvw-score__fill {
  animation: lvw-fill 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--d, 0s);
}
.p-keytech-liveness-detection .lvw-screen .lvw-pill { opacity: 0; transform: translateY(3px) scale(0.9); }
.p-keytech-liveness-detection .lvw-screen.is-active .lvw-pill {
  animation: lvw-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--d, 0s);
}
@keyframes lvw-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(var(--v, 0)); }
}
@keyframes lvw-pop {
  from { opacity: 0; transform: translateY(3px) scale(0.9); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .p-keytech-liveness-detection .lvw-screen { transition: none; }
  .p-keytech-liveness-detection .lvw-screen .lvw-score__fill,
  .p-keytech-liveness-detection .lvw-screen .lvw-pill {
    animation: none !important;
    opacity: 1;
    transform: scaleX(var(--v, 1));
  }
  .p-keytech-liveness-detection .lvw-screen .lvw-pill { transform: none; }
}
