/* Case studies. The opening pairs the facts with the brand itself: its phone with the real lobby scrolling, its logo,
   and live panels built from the same components as the product pages (.panel, .odds, .live, .chip-t).
   One staged entrance when the stage comes into view; after that only the prices move, as on a live exchange. */

/* ---------- opening: facts on the left, the brand on the right ---------- */
.cs-open { padding-top: clamp(32px, 5vw, 72px); }
.glance { display: grid; gap: clamp(36px, 5vw, 80px); align-items: center; }
@media (min-width: 1000px) { .glance { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.glance-copy .answer { margin-bottom: 20px; }
.glance-copy table { margin: 0; }

/* ---------- the stage ---------- */
.cs-stage { --brand: var(--accent); position: relative; width: 100%; max-width: 640px; aspect-ratio: 1 / 1.02; justify-self: center; }
.cs-glow { position: absolute; inset: 12% 14%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 60%, transparent), transparent 75%); filter: blur(36px); opacity: .5; pointer-events: none; }
.cs-phone { position: absolute; left: 50%; top: 50%; z-index: 1; width: 41%; margin: 0; padding: 7px; border-radius: 30px; background: #0b0c0e; box-shadow: 0 40px 90px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.12); transform: translate(-50%, -50%); }
.cs-screen { position: relative; aspect-ratio: 9 / 19.5; border-radius: 23px; overflow: hidden; background: #1d1e20; }
.cs-screen picture { display: block; height: 100%; }
.cs-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
@keyframes shot-scroll { 0%, 6% { object-position: 50% 0; } 94%, 100% { object-position: 50% 100%; } }

/* floating panels around the phone */
.cs-card { position: absolute; z-index: 2; border: 1px solid rgba(255,255,255,.1); border-radius: var(--r); background: var(--ink-900); box-shadow: 0 24px 60px rgba(0,0,0,.5); font-size: 13px; }
.cs-card .panel-row { padding: 8px 12px; }
.cs-card .panel-bar { padding: 10px 12px; font-size: 11px; }
.cs-card .odds b { min-width: 46px; padding: 5px 3px; font-size: 13px; transition: background-color .5s ease-out; }
.odds b.tick-up { background: #fff3c4; }
.odds b.tick-down { background: #ffd9d3; }
.cs-logo { left: 0; top: 7%; display: flex; align-items: center; height: 62px; padding: 0 20px; }
.cs-logo img { display: block; width: auto; height: 24px; }
.cs-logo.icon img { height: 32px; }
.cs-logo span { margin-left: 10px; font: 700 15px/1 var(--f-text); }
.cs-market { left: -2%; top: 37%; width: 47%; }
.cs-games { right: 0; top: 12%; padding: 14px 18px 12px; }
.cs-games b { display: block; font: 700 clamp(30px, 3.4vw, 46px)/.9 var(--f-head); font-stretch: 75%; color: #fff; font-variant-numeric: tabular-nums; }
.cs-games small, .cs-sports small, .cs-2fa small { display: block; margin-top: 6px; font: 400 10px/1.3 var(--f-pixel); text-transform: uppercase; color: var(--sub); }
.cs-sports { right: -1%; bottom: 17%; width: 41%; padding: 12px 14px; }
.cs-sports ul { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.cs-2fa { left: 9%; bottom: 5%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.cs-2fa svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.cs-2fa small { margin: 0; color: #fff; }

/* the entrance: phone first, then the panels one by one, the logo drawing in left to right in pixel steps */
html.js .cs-stage .cs-phone { opacity: 0; transform: translate(-50%, calc(-50% + 40px)); transition: opacity .6s var(--e-out), transform .9s var(--e-out); }
html.js .cs-stage .cs-card { opacity: 0; transform: translateY(18px) scale(.96); transition: opacity .5s var(--e-out), transform .7s var(--e-out); transition-delay: calc(.45s + var(--i, 0) * .16s); }
html.js .cs-stage .cs-logo img { clip-path: inset(0 100% 0 0); }
html.js .cs-stage.in .cs-phone { opacity: 1; transform: translate(-50%, -50%); }
html.js .cs-stage.in .cs-card { opacity: 1; transform: none; }
html.js .cs-stage.in .cs-logo img { clip-path: inset(0 0 0 0); transition: clip-path .7s steps(8) .7s; }
html.js .cs-stage.in .cs-screen img { animation: shot-scroll 26s ease-in-out 2.5s infinite alternate; }

/* ---------- the exchange, taken apart: the real page dimmed behind live panels ---------- */
.cs-xray { position: relative; margin: 2.2em 0 1em; padding: 4% 0 0; }
.cs-xray-shot { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08); transform: perspective(1600px) rotateY(-9deg) rotateX(5deg) scale(.94); transform-origin: 60% 50%; }
.cs-xray-shot img { display: block; width: 100%; height: auto; opacity: .5; }
.cs-xray-shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, var(--ink-900)); }
.cs-xray .cs-card { font-size: 12.5px; }
.cs-x-live { left: -3%; top: 0; width: 46%; }
.cs-x-book { right: -3%; top: 24%; width: 52%; }
.cs-x-slip { left: 4%; bottom: calc(6% + 28px); width: 44%; }
.cs-x-slip .slip-go { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 6px 12px 12px; height: 36px; border-radius: var(--r); background: var(--accent); color: var(--on-accent, #111821); font-weight: 700; }
.slip-go .done { display: none; }
.cs-x-slip.matched .slip-go { background: #2bd17e; }
.cs-x-slip.matched .slip-go .todo { display: none; }
.cs-x-slip.matched .slip-go .done { display: inline; }
.cs-xray figcaption { position: relative; margin-top: 14px; font-size: 13px; color: var(--sub); }
html.js .cs-xray .cs-card { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--e-out), transform .7s var(--e-out); transition-delay: calc(.2s + var(--i, 0) * .18s); }
html.js .cs-xray.in .cs-card { opacity: 1; transform: none; }

/* live player counts (Bocce247): a green person before each count, the number drifting as players come and go */
.cs-pop .panel-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.viz .cs-pop .panel-row { grid-template-columns: 1fr auto 5.5em; }
.cs-pop [data-live] { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; font-variant-numeric: tabular-nums; transition: color .6s ease-out; }
.cs-pop [data-live]::before { content: ""; width: 10px; height: 11px; flex: none; background: radial-gradient(circle 2.6px at 50% 3px, #2bd17e 92%, transparent), radial-gradient(5px 4.6px at 50% 100%, #2bd17e 92%, transparent); }
.cs-pop [data-live].tick-up { color: #2bd17e; }
.cs-pop [data-live].tick-down { color: #ff8a7a; }
.cs-pop .cs-more { display: flex; color: var(--sub); font-size: 12px; }
.cs-save .slip-go .done::before { content: "\2665\FE0E\00a0"; }
.cs-logo.icon img { height: 34px; }

/* ---------- chapter visuals: panels built from the product pages' components ---------- */
.cs-settings .panel-row img { display: block; width: auto; height: 20px; }
.swatches { display: flex; gap: 6px; }
.swatches i { width: 22px; height: 22px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.cs-cats .panel-row { display: grid; grid-template-columns: 8.5em 1fr 4.5em; }
.cs-cats .panel-row b { text-align: right; }
.cs-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.cs-bar i { display: block; height: 100%; width: var(--w); background: var(--accent); transform-origin: left; }
html.js .rv .cs-bar i { transform: scaleX(0); transition: transform 1s var(--e-out) .35s; }
html.js .rv.in .cs-bar i { transform: none; }
.cs-cats .cs-more { display: flex; color: var(--sub); }
.cs-account .go { width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; }
.split .cs-xray { margin: 0; }
.cs-phone-viz { position: relative; display: grid; place-items: center; min-height: 520px; --brand: var(--accent); }
.cs-phone-viz .cs-phone { position: relative; left: auto; top: auto; width: min(270px, 64%); transform: none; }
.cs-phone-viz .cs-screen img { animation: shot-scroll 26s ease-in-out 1s infinite alternate; }

/* ---------- smaller screens ---------- */
@media (max-width: 999px) { .cs-stage { max-width: 560px; } }
@media (max-width: 599px) {
  .cs-stage { aspect-ratio: 1 / 1.15; }
  .cs-phone { width: 50%; padding: 5px; border-radius: 22px; }
  .cs-screen { border-radius: 17px; }
  .cs-card { font-size: 11px; }
  .cs-card .odds b { min-width: 38px; font-size: 11px; }
  .cs-market { width: 58%; top: 40%; left: 0; }
  .cs-sports, .cs-2fa { display: none; }
  .cs-logo { height: 50px; padding: 0 14px; }
  .cs-logo img { height: 18px; }
  .cs-xray { padding: 0; }
  .cs-xray-shot { transform: none; }
  .cs-xray .cs-card { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; margin-top: 8px; }
  .cs-cats .panel-row { grid-template-columns: 7em 1fr 4em; }
  .cs-phone-viz { min-height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .cs-stage .cs-phone, html.js .cs-stage .cs-card, html.js .cs-xray .cs-card { opacity: 1; transform: none; transition: none; }
  html.js .cs-stage .cs-phone { transform: translate(-50%, -50%); }
  html.js .cs-stage .cs-logo img { clip-path: none; }
  .cs-phone-viz .cs-screen img, html.js .rv .cs-bar i { animation: none; transform: none; }
}
