/* Preview cards on /research/ and /projects/: one card per entry, copy on one side and a live preview window on the
   other, sides alternating. Every card has the same window (a 40px bar over a 16:9 screen), so every card is the same
   size. Research windows draw the study's own heatmap (preview-cards.js); project windows play the product's home page. */
.pv-list { display:grid; gap:28px; margin:0 0 64px; }
.pv-card { position:relative; display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); align-items:center; gap:clamp(28px,4vw,56px); padding:clamp(22px,2.6vw,34px); background:#fff; border:1px solid var(--line); border-radius:22px; box-shadow:0 1px 0 rgba(20,37,54,.03),0 28px 60px -48px rgba(20,37,54,.45); transition:box-shadow 260ms ease,transform 260ms ease; }
.pv-card:hover { box-shadow:0 1px 0 rgba(20,37,54,.03),0 34px 70px -44px rgba(20,37,54,.5); }
.pv-card:nth-child(even) { grid-template-columns:minmax(0,7fr) minmax(0,5fr); }
.pv-card:nth-child(even) .pv-copy { order:2; }
.pv-copy { min-width:0; padding:4px 0; }
.pv-eyebrow { display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; margin:0 0 14px; color:var(--accent); font-size:11px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; }
.pv-copy h2 { margin:0 0 12px; font-size:clamp(28px,2.7vw,34px); font-weight:470; letter-spacing:-.038em; line-height:1.12; }
.pv-copy h2 a:hover { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:5px; }
.pv-copy>p { max-width:420px; color:var(--muted); font-size:15.5px; line-height:1.7; }
.pv-facts { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0 0; padding:0; list-style:none; }
.pv-facts li,.pv-facts div { display:inline-flex; align-items:baseline; gap:6px; padding:6px 11px; border:1px solid var(--line); border-radius:999px; background:#f8f8f4; color:var(--ink); font-size:12.5px; line-height:1.3; }
.pv-facts dt { color:var(--muted); }
.pv-facts dd { margin:0; font-weight:550; }
.pv-copy .intro-link { margin-top:18px; }
.pv-copy .entry-access { margin-top:12px; color:var(--muted); font-size:12px; }

/* The window. */
.pv-window { position:relative; display:flex; flex-direction:column; min-width:0; overflow:hidden; color:var(--ink); background:#fff; border:1px solid #d3d9de; border-radius:14px; box-shadow:0 30px 60px -36px rgba(20,37,54,.42),0 10px 22px -18px rgba(20,37,54,.3); transform:translateZ(0); transition:transform 320ms cubic-bezier(.2,.7,.2,1),box-shadow 320ms ease; }
.pv-card:hover .pv-window { transform:translateY(-3px); box-shadow:0 40px 70px -36px rgba(20,37,54,.5),0 12px 26px -18px rgba(20,37,54,.32); }
.pv-bar { display:flex; align-items:center; gap:12px; height:40px; padding:0 14px; border-bottom:1px solid #e3e7ea; background:linear-gradient(#fbfbfa,#f3f5f6); font-size:12px; }
.pv-dots { display:inline-flex; gap:6px; flex:none; }
.pv-dots i { width:9px; height:9px; border-radius:50%; background:#dde2e6; }
.pv-title { min-width:0; overflow:hidden; color:var(--ink); font-weight:550; white-space:nowrap; text-overflow:ellipsis; }
.pv-bar .pv-open { margin-left:auto; flex:none; display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border:1px solid #d3d9de; border-radius:999px; background:#fff; color:var(--accent); font-size:11.5px; font-weight:550; }
.pv-bar .pv-open:hover { border-color:var(--accent); }
.pv-url { display:flex; align-items:center; justify-content:center; gap:7px; flex:1; min-width:0; max-width:340px; margin:0 auto; padding:5px 12px; border-radius:8px; background:#e9edf0; color:#46525c; font-size:12px; white-space:nowrap; }
.pv-url svg { flex:none; width:11px; height:11px; }
.pv-url span { overflow:hidden; text-overflow:ellipsis; }
.pv-screen { position:relative; aspect-ratio:16/9; background:#f4f6f7; overflow:hidden; }

/* Project windows: the product's own home page, poster first, the hero's tour as a muted loop once in view. */
.pv-site .pv-screen img,.pv-site .pv-screen video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:top center; }
.pv-site .pv-screen video { opacity:0; transition:opacity 500ms ease; }
.pv-site .pv-screen video.is-playing { opacity:1; }
.pv-visit { position:absolute; right:14px; bottom:14px; display:inline-flex; align-items:center; gap:8px; padding:9px 14px; border-radius:999px; background:rgba(20,37,54,.92); color:#fff; font-size:12.5px; font-weight:550; box-shadow:0 10px 24px -10px rgba(0,0,0,.5); opacity:0; transform:translateY(6px); transition:opacity 220ms ease,transform 220ms ease; pointer-events:none; }
.pv-site:hover .pv-visit,.pv-site:focus-visible .pv-visit { opacity:1; transform:none; }
a.pv-site:hover { color:var(--ink); }
a.pv-site:focus-visible { outline:2px solid #3f78aa; outline-offset:4px; }

/* Research windows: the study's heatmap, days down, start times across. */
.pv-heat { position:absolute; inset:0; display:flex; flex-direction:column; padding:16px 18px 12px; --c0:#e8f2fd; --c1:#cde2fb; --c2:#9ec5f4; --c3:#6da7ec; --c4:#3987e5; --c5:#256abf; --c6:#184f95; }
.pv-head { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:24px; margin-bottom:10px; font-size:11px; color:var(--muted); }
.pv-legend { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; }
.pv-legend b { display:block; width:72px; height:7px; border-radius:4px; background:linear-gradient(90deg,var(--c0),var(--c2),var(--c4),var(--c6)); }
.pv-legend .pv-key { display:inline-flex; align-items:center; gap:5px; }
.pv-legend .pv-key i { width:10px; height:10px; border-radius:3px; }
.pv-switch { display:inline-flex; align-items:center; gap:2px; min-width:0; padding:2px; border:1px solid #dfe4e8; border-radius:999px; background:#fff; }
.pv-switch button { display:grid; place-items:center; width:24px; height:22px; padding:0; border:0; border-radius:999px; background:transparent; color:var(--accent); cursor:pointer; }
.pv-switch button:hover { background:#eef3f8; }
.pv-switch output { min-width:108px; padding:0 4px; overflow:hidden; color:var(--ink); font-size:11.5px; font-weight:550; text-align:center; white-space:nowrap; text-overflow:ellipsis; }
.pv-grid { flex:1; min-height:0; display:grid; grid-template-columns:30px minmax(0,1fr); grid-template-rows:minmax(0,1fr) 16px; column-gap:6px; }
.pv-rows { display:grid; grid-template-rows:repeat(var(--rows),minmax(0,1fr)); gap:var(--gap,3px); font-size:10.5px; color:var(--muted); }
.pv-rows span { display:flex; align-items:center; }
.pv-cells { position:relative; display:grid; grid-template-columns:repeat(var(--cols),minmax(0,1fr)); grid-template-rows:repeat(var(--rows),minmax(0,1fr)); gap:var(--gap,3px); touch-action:pan-y; }
.pv-cells i { display:block; min-width:0; border-radius:var(--r,4px); background:var(--c0); transform-origin:50% 50%; transition:background-color 380ms ease,box-shadow 160ms ease,transform 160ms ease; }
.pv-cells i.v1 { background:var(--c1); } .pv-cells i.v2 { background:var(--c2); } .pv-cells i.v3 { background:var(--c3); }
.pv-cells i.v4 { background:var(--c4); } .pv-cells i.v5 { background:var(--c5); } .pv-cells i.v6 { background:var(--c6); }
.pv-cells i.vn { background:repeating-linear-gradient(135deg,#eef0f2 0 3px,#f8f9fa 3px 6px); }
.pv-cells i.vx { background:transparent; box-shadow:inset 0 0 0 1px #e9ecef; }
.pv-cells i.sb { background:var(--c5); } .pv-cells i.so { background:var(--c0); box-shadow:inset 0 0 0 1px var(--c1); }
.pv-cells i.on { position:relative; z-index:1; transform:scale(1.18); box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--ink),0 6px 14px -4px rgba(20,37,54,.45); }
.pv-heat.is-intro .pv-cells i { animation:pv-in 620ms cubic-bezier(.2,.7,.2,1) both; animation-delay:calc(var(--x,0) * var(--step,18ms) + var(--y,0) * 26ms); }
@keyframes pv-in { from { opacity:0; transform:scale(.4); } to { opacity:1; transform:none; } }
.pv-cols { position:relative; grid-column:2; font-size:10px; color:var(--muted); }
.pv-cols span { position:absolute; top:3px; transform:translateX(-50%); white-space:nowrap; }
.pv-cols span:first-child { transform:none; }
.pv-read { display:flex; align-items:baseline; gap:10px; min-height:22px; margin-top:8px; padding-top:8px; border-top:1px solid #edf0f2; font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; }
.pv-read b { color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; }
.pv-read strong { color:var(--accent); font-size:13px; font-weight:650; font-variant-numeric:tabular-nums; }
.pv-read span { overflow:hidden; text-overflow:ellipsis; }

@media(max-width:900px) {
  .pv-card,.pv-card:nth-child(even) { grid-template-columns:1fr; gap:22px; }
  .pv-card:nth-child(even) .pv-copy { order:0; }
  .pv-card .pv-window { order:-1; }
  .pv-copy>p { max-width:none; }
}
@media(max-width:700px) {
  .pv-list { gap:20px; margin-bottom:40px; }
  .pv-card { padding:14px 14px 22px; border-radius:18px; }
  .pv-copy { padding:0 6px; }
  .pv-bar { height:34px; padding:0 10px; gap:8px; }
  .pv-dots i { width:7px; height:7px; }
  .pv-study .pv-screen { aspect-ratio:4/3; }
  .pv-heat { padding:10px 10px 8px; }
  .pv-head { margin-bottom:6px; min-height:22px; }
  .pv-legend b { width:44px; }
  .pv-head .pv-label { display:none; }
  .pv-switch output { min-width:92px; }
  .pv-grid { grid-template-columns:24px minmax(0,1fr); grid-template-rows:minmax(0,1fr) 14px; column-gap:4px; }
  .pv-rows { font-size:9.5px; }
  .pv-cols { font-size:9px; }
  .pv-read { margin-top:5px; padding-top:5px; font-size:11px; }
  .pv-visit { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  .pv-card,.pv-window,.pv-cells i,.pv-visit,.pv-site .pv-screen video { transition:none; }
  .pv-card:hover .pv-window { transform:none; }
  .pv-heat.is-intro .pv-cells i { animation:none; }
}

/* The home page's slideshow (preview-cards.js): our five sites, then the API, then the research samples. One card
   per slide, the same card as /products/ and /research/; tabs above, each filling while its slide shows. Swipe, the
   arrows or a tab move it; any of them stops the autoplay. */
.pv-show { margin:0 0 40px; }
.pv-show-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 18px; }
.pv-arrows { display:inline-flex; flex:none; gap:8px; }
.pv-arrows button { display:grid; place-items:center; width:38px; height:38px; padding:0; border:1px solid var(--line); border-radius:50%; background:#fff; color:var(--ink); font-size:18px; line-height:1; cursor:pointer; transition:border-color 160ms ease; }
.pv-arrows button:hover { border-color:var(--ink); }
.pv-tabs { display:flex; gap:8px; min-width:0; overflow-x:auto; scrollbar-width:none; }
.pv-tabs::-webkit-scrollbar { display:none; }
.pv-tabs button { position:relative; flex:none; overflow:hidden; padding:8px 14px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--muted); font:inherit; font-size:12.5px; font-weight:500; line-height:1.3; cursor:pointer; transition:color 160ms ease,border-color 160ms ease; }
.pv-tabs button:hover { color:var(--ink); }
.pv-tabs button[aria-selected="true"] { color:var(--ink); border-color:var(--ink); }
.pv-tabs button i { position:absolute; left:0; right:0; bottom:0; height:2px; background:var(--accent); transform:scaleX(0); transform-origin:left; }
.pv-tabs button.is-timing i { animation:pv-fill var(--dwell,7s) linear both; }
.pv-show.is-paused .pv-tabs button.is-timing i { animation-play-state:paused; }
@keyframes pv-fill { to { transform:scaleX(1); } }
.pv-track { position:relative; display:grid; grid-auto-flow:column; grid-auto-columns:100%; gap:24px; margin:0 -24px -40px; padding:0 24px 40px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; scroll-padding:0 24px; scrollbar-width:none; }
.pv-track::-webkit-scrollbar { display:none; }
.pv-track .pv-slide { scroll-snap-align:start; scroll-snap-stop:always; }
.pv-track .pv-card:nth-child(even) { grid-template-columns:minmax(0,5fr) minmax(0,7fr); }
.pv-track .pv-card:nth-child(even) .pv-copy { order:0; }

/* The API slide's window: one /v1/demand answer as the API writes it. */
.pv-title .pv-verb { margin-right:6px; color:var(--accent); font-weight:650; letter-spacing:.04em; }
.pv-ok { margin-left:auto; display:inline-flex; align-items:center; gap:6px; color:#2f6b4f; font-size:11.5px; font-weight:600; font-variant-numeric:tabular-nums; }
.pv-ok::before { content:""; width:6px; height:6px; border-radius:50%; background:#2f6b4f; }
.pv-codewin .pv-screen { display:flex; background:#0f1b28; container-type:size; }
.pv-json { flex:1; min-width:0; margin:0; display:flex; align-items:center; padding:0 4.5cqw; overflow:hidden; white-space:pre; background:#0f1b28; color:#e4e9ee; font:min(4.4cqh,2.55cqw)/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; }
.pv-json code { font:inherit; }
.pv-json .k { color:#9fc5e8; } .pv-json .s { color:#dccb9f; } .pv-json .n { color:#eba983; }
a.pv-codewin:hover { color:var(--ink); }

@media(max-width:900px) {
  .pv-track .pv-card:nth-child(even) { grid-template-columns:1fr; }
}
@media(max-width:700px) {
  .pv-show-head { margin:0 -20px 14px; }
  .pv-arrows { display:none; }
  .pv-tabs { padding:0 20px; }
  .pv-track .pv-card { align-content:start; }
  .pv-track { gap:14px; margin:0 -20px -32px; padding:0 20px 32px; scroll-padding:0 20px; }
}
@media(prefers-reduced-motion:reduce) {
  .pv-tabs button.is-timing i { animation:none; }
}
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
