/* ════════════════════════════════════════════════════════════
   VIZIT FX — interactive proof moments (blink test, self-sorting
   carousel, head-to-head, bleed map). Light-theme, brand tokens.
   Requires ci-styles tokens; pairs with vizit-effects.js.
   ════════════════════════════════════════════════════════════ */

.fx{ position:relative; }
.fx, .fx *{ box-sizing:border-box; }
.fx-frame{
  position:relative; background:#fff;
  border:1px solid var(--color-200,#e4e4e4);
  box-shadow:0 1px 2px rgba(0,33,61,.05), 0 40px 80px -48px rgba(0,33,61,.28);
  overflow:hidden;
}
.fx-chrome{
  display:flex; align-items:center; gap:10px;
  padding:10px 16px;
  border-bottom:1px solid var(--color-200,#e4e4e4);
  font-family:var(--font-mono,monospace); font-size:10px;
  letter-spacing:.1em; text-transform:uppercase; color:var(--muted,#737373);
  background:var(--color-50,#fafafa);
}
.fx-chrome .dot{
  width:6px; height:6px; border-radius:999px; background:var(--accent,#0174d9);
  box-shadow:0 0 0 3px rgba(1,116,217,.16);
  animation:fxPulse 1.8s ease-in-out infinite;
}
@keyframes fxPulse{ 0%,100%{opacity:1} 50%{opacity:.4} }
.fx-btn{
  cursor:pointer; border:1px solid var(--accent,#0174d9);
  background:var(--accent,#0174d9); color:#fff;
  font-family:var(--font-sans,sans-serif); font-size:13px; font-weight:500;
  padding:10px 20px; border-radius:999px !important;
  display:inline-flex; align-items:center; gap:8px;
  transition:background .2s, box-shadow .2s;
  box-shadow:0 10px 24px -10px rgba(1,116,217,.5);
}
.fx-btn:hover{ background:var(--blue-500,#015fb2); }
.fx-btn.ghost{ background:#fff; color:var(--blue-1000,#00213d); border-color:var(--color-300,#d4d4d4); box-shadow:none; }
.fx-btn.ghost:hover{ border-color:var(--accent,#0174d9); color:var(--accent,#0174d9); }
.fx-note{
  font-family:var(--font-mono,monospace); font-size:10.5px;
  letter-spacing:.08em; text-transform:uppercase; color:var(--muted,#737373);
}
.fx-controls{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; padding:14px 16px; border-top:1px solid var(--color-200,#e4e4e4); background:var(--color-50,#fafafa); }

/* product tile (shared) */
.fx-tile{
  position:relative; background:#fff;
  border:1px solid var(--color-200,#e4e4e4);
  display:flex; flex-direction:column; overflow:hidden;
}
.fx-tile .ph{
  flex:1; display:flex; align-items:center; justify-content:center;
  padding:12px; min-height:0; background:#fff;
}
.fx-tile .ph img{ max-width:100%; max-height:100%; object-fit:contain; display:block; }
.fx-tile .nm{
  padding:8px 10px 4px; font-family:var(--font-sans,sans-serif);
  font-size:11.5px; font-weight:500; color:var(--color-800,#262626);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.fx-tile .pr{
  padding:0 10px 10px; display:flex; justify-content:space-between; align-items:center;
  font-size:11px; color:var(--muted,#737373);
}
.fx-tile .pr b{ color:var(--color-900,#171717); font-weight:600; }
.fx-score{
  position:absolute; right:8px; top:8px; z-index:3;
  font-family:var(--font-mono,monospace); font-weight:600; font-size:11px;
  padding:3px 8px; border-radius:999px; background:#fff;
  border:1px solid; font-variant-numeric:tabular-nums;
  box-shadow:0 2px 8px rgba(0,33,61,.12);
}
.fx-hi{ color:var(--accent,#0174d9); border-color:var(--blue-200,#80c3fe); }
.fx-md{ color:#8a6500; border-color:#e8c66a; }
.fx-lo{ color:var(--risk-red,#c8453a); border-color:#e5a49d; }

/* ══════════ SEARCH → SHELF ══════════ */
.fx-search-stage{ position:relative; padding:18px; min-height:430px; overflow:hidden; }
.fx-sbar{
  position:absolute; left:18px; right:18px; top:50%; transform:translateY(-50%); z-index:5;
  display:flex; align-items:center; gap:12px; padding:6px 6px 6px 18px;
  background:#fff; border:1px solid var(--color-300,#d4d4d4); border-radius:999px;
  box-shadow:0 18px 44px -24px rgba(0,33,61,.35);
  transition:top .7s cubic-bezier(.2,.85,.25,1), transform .7s cubic-bezier(.2,.85,.25,1), box-shadow .7s;
}
.fx-sbar svg{ width:20px; height:20px; color:var(--muted,#737373); flex:0 0 auto; }
.fx-sbar .q{ flex:1; display:flex; align-items:center; font-family:var(--font-sans,sans-serif); font-size:18px; color:#0e1b2a; min-height:32px; }
.fx-sbar .caret{ width:1.5px; height:20px; background:#0e1b2a; margin-left:2px; animation:fxCaret 1s steps(1) infinite; }
@keyframes fxCaret{ 0%,49%{opacity:1} 50%,100%{opacity:0} }
.fx-sbar .go{
  font-family:var(--font-sans,sans-serif); font-size:13px; font-weight:500; color:#fff;
  background:#0a0e14; border-radius:999px; padding:8px 16px; transition:transform .2s, background .2s;
}
.fx-sbar .go.press{ transform:scale(.94); background:#3f464e; }
.docked .fx-sbar{ top:18px; transform:none; box-shadow:0 1px 2px rgba(0,33,61,.06); }
.docked .fx-sbar .caret{ display:none; }
.fx-sgrid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; padding-top:64px; }
.fx-sgrid .fx-tile{ padding:10px; border-radius:10px; gap:0; }
.fx-sgrid .fx-tile .ph{ aspect-ratio:1; flex:none; padding:8%; border-radius:6px; background:#f7f8fa; }
.fx-sgrid .fx-tile .ln{ display:block; height:6px; border-radius:3px; background:#e5e7eb; margin-top:9px; flex:none; }
.fx-sgrid .fx-tile .ln.s{ width:55%; margin-top:6px; }
.fx-search .fx-cur{ position:absolute; left:0; top:0; width:18px; height:18px; z-index:9; pointer-events:none; will-change:transform; opacity:0; transition:opacity .3s; }
.fx-search .fx-cur.show{ opacity:1; }
.fx-search .fx-cur svg{ width:18px; height:18px; filter:drop-shadow(0 2px 3px rgba(0,0,0,.35)); transition:transform .12s; }
.fx-search .fx-cur.click svg{ transform:scale(.82) translate(1px,1px); }
.fx-search .fx-atc{ position:absolute; left:var(--tx,50%); top:var(--ty,50%); transform:translate(-50%,-50%) scale(.85); background:#0a0e14; color:#fff; font-family:var(--font-sans,sans-serif); font-size:10.5px; font-weight:500; padding:4px 9px; border-radius:999px; opacity:0; transition:opacity .25s, transform .25s cubic-bezier(.2,.85,.25,1); white-space:nowrap; z-index:8; display:flex; align-items:center; gap:6px; pointer-events:none; }
.fx-search .fx-atc.on{ opacity:1; transform:translate(-50%,-50%) scale(1); }
.fx-search .fx-atc i{ width:10px; height:10px; border-radius:50%; background:#22c55e; display:inline-grid; place-items:center; }
.fx-search .fx-atc i::after{ content:""; width:2.5px; height:5px; border:solid #fff; border-width:0 2px 2px 0; transform:translateY(-1px) rotate(45deg); }
.fx-sgrid .fx-tile{
  opacity:0; transform:translateY(14px) scale(.97);
  transition:opacity .4s ease, transform .4s cubic-bezier(.2,.85,.25,1), filter .5s ease, box-shadow .5s ease, border-color .4s;
}
.fx-sgrid .fx-tile .fx-score{ opacity:0; transition:opacity .4s; }
.fx-sgrid .fx-tile.in{ opacity:1; transform:none; }
.fx-sgrid .fx-tile.in.win .fx-score, .fx-sgrid .fx-tile.in.lost .fx-score{ opacity:1; }
.fx-sgrid .fx-tile.lost{ opacity:.5; filter:grayscale(1) contrast(.85); }
.fx-sgrid .fx-tile.win{ transform:scale(1.03); z-index:2; border-color:var(--accent,#0174d9); animation:fxGlow 1.6s ease-in-out infinite; }
.fx-sgrid .fx-tile.win.press{ transform:scale(.99); }
@keyframes fxGlow{ 0%,100%{ box-shadow:0 0 0 1px var(--accent,#0174d9), 0 0 18px 0 rgba(52,160,254,.35); } 50%{ box-shadow:0 0 0 1px var(--accent,#0174d9), 0 0 30px 4px rgba(52,160,254,.55); } }
@media (max-width:540px){ .fx-sgrid{ grid-template-columns:repeat(2,1fr); } .fx-sbar .q{ font-size:15px; } }

/* ══════════ BLINK TEST ══════════ */
.fx-blink-stage{ position:relative; padding:18px; }
.fx-blink-shelf{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.fx-blink-shelf .fx-tile{ aspect-ratio:1/1.18; transition:opacity .8s ease, filter .8s ease, transform .6s ease; }
.fx-blink-shelf .fx-tile.lost{ opacity:.14; filter:grayscale(1); transform:scale(.95); }
.fx-blink-shelf .fx-tile.win{ box-shadow:0 0 0 2px var(--accent,#0174d9), 0 18px 44px -18px rgba(1,116,217,.5); border-color:var(--accent,#0174d9); }
.fx-blink-veil{
  position:absolute; inset:0; z-index:20; background:var(--blue-1000,#00213d);
  opacity:0; pointer-events:none; transition:opacity .25s;
  display:flex; align-items:center; justify-content:center;
}
.fx-blink-veil .count{
  font-family:var(--font-display,serif); font-size:96px; color:#fff; line-height:1;
}
.fx-blink-path{ position:absolute; inset:18px; z-index:8; pointer-events:none; width:calc(100% - 36px); height:calc(100% - 36px); }
.fx-blink-meter{
  display:flex; align-items:baseline; gap:10px; margin-left:auto;
  font-family:var(--font-mono,monospace); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted,#737373);
}
.fx-blink-meter b{
  font-family:var(--font-display,serif); font-size:26px; line-height:1;
  color:var(--blue-1000,#00213d); letter-spacing:-.02em;
}

/* ══════════ SELF-SORTING CAROUSEL ══════════ */
.fx-car-stage{ padding:26px 18px 20px; }
.fx-car-row{ display:flex; gap:12px; justify-content:center; }
.fx-car-row .slot{ width:132px; position:relative; transition:transform .7s cubic-bezier(.2,.85,.25,1); }
.fx-car-row .slot .fx-tile{ height:236px; }
.fx-car-row .slot .pos{
  position:absolute; top:-20px; left:50%; transform:translateX(-50%);
  font-family:var(--font-mono,monospace); font-size:10.5px; color:var(--muted,#737373);
}
.fx-car-row .slot.first3::after{
  content:""; position:absolute; inset:-4px; pointer-events:none;
  border:1.5px solid rgba(1,116,217,.0); transition:border-color .5s .4s;
}
.fx-car-row .slot.first3.lit::after{ border-color:rgba(1,116,217,.55); }

/* ══════════ HEAD-TO-HEAD ══════════ */
.fx-h2h-serp{ padding:16px; }
.fx-h2h-head{
  font-family:var(--font-mono,monospace); font-size:10.5px; letter-spacing:.08em;
  text-transform:uppercase; color:var(--muted,#737373); margin-bottom:14px;
}
.fx-h2h-row{ display:flex; gap:10px; }
.fx-h2h-row .h2c{
  flex:1; min-width:0; position:relative; background:#fff;
  border:1px solid var(--color-200,#e4e4e4); padding:10px 10px 12px;
  transition:transform .7s cubic-bezier(.2,.85,.25,1), box-shadow .3s, border-color .3s;
}
.fx-h2h-row .h2c .rank{ position:absolute; left:9px; top:8px; font-family:var(--font-mono,monospace); font-size:10.5px; color:var(--color-400,#a3a3a3); font-weight:600; }
.fx-h2h-row .h2c .vz{ position:absolute; right:8px; top:6px; font-family:var(--font-mono,monospace); font-weight:600; font-size:10.5px; padding:2px 7px; border-radius:999px; border:1px solid; background:#fff; white-space:nowrap; }
.fx-h2h-row .h2c .thumb{ height:112px; margin:20px 0 8px; display:flex; align-items:center; justify-content:center; }
.fx-h2h-row .h2c .thumb img{ max-width:100%; max-height:100%; object-fit:contain; }
.fx-h2h-row .h2c .t{ font-size:12px; font-weight:600; color:var(--color-900,#171717); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fx-h2h-row .h2c .stars{ font-size:10.5px; color:#d99b27; margin-top:3px; }
.fx-h2h-row .h2c .stars span{ color:var(--color-400,#a3a3a3); }
.fx-h2h-row .h2c .price{ font-size:14px; font-weight:700; color:var(--color-900,#171717); margin-top:4px; }
.fx-h2h-row .h2c .cart{ margin-top:8px; width:100%; border:none; border-radius:999px; padding:7px; background:var(--blue-1000,#00213d); color:#fff; font-size:10.5px; font-weight:600; cursor:default; }
.fx-h2h-row .h2c .youtag{
  position:absolute; left:50%; top:-9px; transform:translateX(-50%);
  background:var(--accent,#0174d9); color:#fff; font-size:9px; font-weight:700;
  letter-spacing:.1em; padding:2px 9px; border-radius:999px; display:none; z-index:3;
}
.fx-h2h-row .h2c.you{ border-color:var(--accent,#0174d9); box-shadow:0 0 0 1.5px var(--accent,#0174d9), 0 16px 36px -18px rgba(1,116,217,.4); }
.fx-h2h-row .h2c.you .youtag{ display:block; }
.fx-h2h-row .h2c .ribbon{
  position:absolute; right:-4px; top:30px; background:var(--blue-1000,#00213d); color:#fff;
  font-size:8.5px; font-weight:700; letter-spacing:.06em; padding:3px 9px; display:none; z-index:3;
}
.fx-h2h-row .h2c.win .ribbon{ display:block; }
.fx-h2h-row .h2c.flash{ animation:fxH2Flash .9s ease; }
@keyframes fxH2Flash{ 0%,100%{ box-shadow:0 0 0 1.5px var(--accent,#0174d9); } 45%{ box-shadow:0 0 0 6px rgba(1,116,217,.35), 0 0 40px rgba(1,116,217,.4); } }
.fx-h2h-board{
  margin-left:auto; display:flex; align-items:baseline; gap:8px;
  font-family:var(--font-mono,monospace); font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted,#737373);
}
.fx-h2h-board b{ font-family:var(--font-display,serif); font-size:24px; color:var(--blue-1000,#00213d); letter-spacing:-.02em; }

/* ══════════ BLEED MAP ══════════ */
.fx-bleed{ }
.fx-bleed-banner{ display:flex; align-items:stretch; border-bottom:1px solid var(--color-200,#e4e4e4); background:#fff; flex-wrap:wrap; }
.fx-bleed-banner .bcol{ padding:14px 20px; border-right:1px solid var(--color-200,#e4e4e4); }
.fx-bleed-banner .bcol:last-child{ border-right:none; }
.fx-bleed-banner .bcol.grow{ flex:1; min-width:220px; }
.fx-bleed-banner .bk{ font-family:var(--font-mono,monospace); font-size:9.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted,#737373); }
.fx-bleed-banner .bv{ font-family:var(--font-mono,monospace); font-weight:600; font-size:22px; margin-top:5px; font-variant-numeric:tabular-nums; color:var(--risk-red,#c8453a); }
.fx-bleed-banner .bv span{ font-size:12px; color:var(--muted,#737373); font-weight:400; }
.fx-bleed-banner .bv.big{ font-size:36px; letter-spacing:-.5px; }
.fx-bleed-banner .bv.ok{ color:var(--accent,#0174d9); }
.fx-bleed-wall{
  display:grid; grid-template-columns:repeat(12,1fr); gap:5px; padding:14px;
  background:var(--color-50,#fafafa);
}
@media (max-width:900px){ .fx-bleed-wall{ grid-template-columns:repeat(8,1fr); } }
.fx-btile{
  position:relative; aspect-ratio:1/1.15; border-radius:4px; overflow:hidden; cursor:pointer;
  background:#fff; border:1px solid var(--color-200,#e4e4e4);
  transition:transform .25s, box-shadow .25s, filter .5s;
  display:flex; align-items:center; justify-content:center; padding:6px;
}
.fx-btile img{ max-width:100%; max-height:100%; object-fit:contain; display:block; }
.fx-btile .ov{ position:absolute; inset:0; pointer-events:none; }
.fx-btile.bleed{ filter:saturate(.75); }
.fx-btile.bleed .ov{ background:radial-gradient(circle at 50% 60%, rgba(200,69,58,.05), rgba(200,69,58,.5)); animation:fxBleedPulse 1.8s ease-in-out infinite; }
.fx-btile.warn .ov{ background:rgba(217,155,39,.12); box-shadow:inset 0 0 0 1px rgba(217,155,39,.45); }
.fx-btile.ok .ov{ box-shadow:inset 0 0 0 1px rgba(1,116,217,.35); }
.fx-btile.fixed .ov{ animation:fxHeal .9s ease; }
.fx-btile:hover{ transform:scale(1.16); z-index:5; box-shadow:0 12px 30px rgba(0,33,61,.28); }
.fx-btile .s{
  position:absolute; left:3px; bottom:3px;
  font-family:var(--font-mono,monospace); font-size:8.5px; font-weight:700;
  padding:1px 5px; border-radius:4px; background:rgba(255,255,255,.92);
  border:1px solid var(--color-200,#e4e4e4); font-variant-numeric:tabular-nums;
}
@keyframes fxBleedPulse{ 0%,100%{opacity:.4} 50%{opacity:1} }
@keyframes fxHeal{ 0%{ box-shadow:inset 0 0 0 1px rgba(1,116,217,.6), 0 0 0 0 rgba(1,116,217,.6);} 100%{ box-shadow:inset 0 0 0 1px rgba(1,116,217,.6), 0 0 0 16px rgba(1,116,217,0);} }
.fx-bleed-drill{
  position:absolute; inset:0; z-index:12; display:none; align-items:center; justify-content:center;
  background:rgba(0,20,40,.4); backdrop-filter:blur(5px);
}
.fx-bleed-drill.open{ display:flex; }
.fx-bleed-drill .dcard{
  width:min(560px,88%); background:#fff; border:1px solid var(--color-200,#e4e4e4);
  padding:24px; display:flex; gap:22px;
  box-shadow:0 40px 90px -30px rgba(0,33,61,.5);
  transform:scale(.92); opacity:0; transition:.3s;
}
.fx-bleed-drill.open .dcard{ transform:scale(1); opacity:1; }
.fx-bleed-drill .pack{ width:132px; height:172px; flex:none; display:flex; align-items:center; justify-content:center; background:var(--color-50,#fafafa); border:1px solid var(--color-200,#e4e4e4); padding:10px; }
.fx-bleed-drill .pack img{ max-width:100%; max-height:100%; object-fit:contain; }
.fx-bleed-drill .info{ flex:1; min-width:0; }
.fx-bleed-drill .nm{ font-family:var(--font-display,serif); font-size:21px; color:var(--blue-1000,#00213d); letter-spacing:-.02em; }
.fx-bleed-drill .diag{ margin-top:10px; font-size:13px; color:var(--color-600,#525252); line-height:1.55; }
.fx-bleed-drill .diag b{ color:var(--risk-red,#c8453a); font-weight:600; }
.fx-bleed-drill .arc{ display:flex; align-items:flex-end; gap:12px; margin:16px 0 4px; }
.fx-bleed-drill .arc .n{ font-family:var(--font-mono,monospace); font-weight:700; font-size:30px; line-height:1; font-variant-numeric:tabular-nums; }
.fx-bleed-drill .arc .from{ color:var(--risk-red,#c8453a); }
.fx-bleed-drill .arc .to{ color:var(--accent,#0174d9); }
.fx-bleed-drill .arc .ar{ color:var(--muted,#737373); font-size:20px; }
.fx-bleed-drill .arc .cap{ color:var(--muted,#737373); font-size:11px; margin-bottom:4px; }
.fx-bleed-drill .rec{ font-family:var(--font-mono,monospace); font-size:12.5px; color:var(--accent,#0174d9); margin:6px 0 16px; }
.fx-bleed-drill .acts{ display:flex; gap:10px; flex-wrap:wrap; }
.fx-toast{
  position:absolute; left:50%; top:16px; transform:translateX(-50%); z-index:14;
  font-family:var(--font-mono,monospace); font-size:12.5px; color:var(--accent,#0174d9);
  background:#fff; border:1px solid var(--blue-200,#80c3fe);
  box-shadow:0 12px 30px -12px rgba(1,116,217,.4);
  padding:8px 16px; border-radius:999px; opacity:0; transition:.3s; pointer-events:none;
}
.fx-toast.show{ opacity:1; }
.fx-bleed-hint{
  text-align:center; padding:10px; font-family:var(--font-mono,monospace);
  font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted,#737373);
  border-top:1px solid var(--color-200,#e4e4e4); background:#fff;
}
@media (max-width:720px){
  .fx-car-row{ flex-wrap:wrap; }
  .fx-h2h-row{ flex-wrap:wrap; }
  .fx-h2h-row .h2c{ flex:1 1 40%; }
}
