/* The ByteStack case study: the rules the shared case-study*.css does not cover. Scoped under .cs-bytestack (data 'class'). */
.cs-bytestack { --kit-a: #7F8FFF; --kit-b: #3A479E; --kit-ink: #262D54; }   /* the periwinkle and navy of ByteStack's mark */
.cs-bytestack .tw3-client img.bs-logo { width: 44px; height: 44px; }   /* the square mark from bytestack.com */
/* A short headline: the text starts level with the chips and the buttons follow it; the AI models fill the rest of the column. */
.cs-bytestack .bs-models { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); }
.cs-bytestack .bs-models p:first-child { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }
.cs-bytestack .bs-models ul { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 12px 0 0; padding: 0; list-style: none; }
.cs-bytestack .bs-models li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: #fff; }
.cs-bytestack .bs-models img { width: 26px; height: 26px; padding: 4px; border-radius: 7px; background: #fff; }
@media (min-width: 1280px) {   /* below this the shared CSS stacks the hero in one column */
  .cs-bytestack .tw7-hero > .grid { grid-template-rows: auto 1fr; }
  .cs-bytestack .tw7-hero > .grid > :nth-child(3) { align-self: stretch; display: flex; flex-direction: column; }
  .cs-bytestack .tw7-hero > .grid > :nth-child(3) > :first-child { margin-bottom: 24px; }
  .cs-bytestack .tw7-hero .bs-models { margin-top: auto; }
  .cs-bytestack .tw7-hero > .grid > .cs-stage { align-self: start; }
}

/* The AI band: TrueWholesale's "Claude on TrueWholesale" block (case-truewholesale.css), with ByteStack's periwinkle in place of Claude's orange. */
.cs-ai { position: relative; overflow: hidden; background: #040705; color: #fff; isolation: isolate; }
.cs-ai__glow { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(42% 38% at 50% 0%, rgba(0, 178, 107, .34), transparent 70%), radial-gradient(30% 40% at 0% 60%, rgba(0, 178, 107, .12), transparent 70%), radial-gradient(30% 40% at 100% 85%, rgba(127, 143, 255, .10), transparent 70%); }
.cs-ai__glow::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent 75%); mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent 75%); }

/* head: lockup, tag, headline, lede, facts — centred */
.cs-ai__head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cs-ai__lockup { display: flex; align-items: center; gap: 10px; }
.cs-ai__tile { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: #fff; box-shadow: 0 16px 40px -14px rgba(0, 178, 107, .55), 0 0 0 1px rgba(255, 255, 255, .2); }
.cs-ai__tile img { width: 40px; height: 40px; border-radius: 10px; }
.cs-ai__wire { position: relative; width: 44px; height: 2px; overflow: hidden; border-radius: 2px; background: rgba(78, 211, 156, .25); }
.cs-ai__wire i { position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, #4ED39C, transparent); }
.cs-ai__mcp { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(78, 211, 156, .45); background: rgba(0, 178, 107, .14); font-size: 12px; font-weight: 700; letter-spacing: .14em; color: #4ED39C; }
@media (min-width: 768px) { .cs-ai__wire { width: 72px; } .cs-ai__tile { width: 68px; height: 68px; } .cs-ai__tile--claude img { width: 68px; height: 68px; } }
@media (prefers-reduced-motion: no-preference) {
  .cs-ai__wire i { animation: cs-ai-flow 2.4s linear infinite; }
  .cs-ai__wire + .cs-ai__mcp + .cs-ai__wire i { animation-delay: 1.2s; }
}
@keyframes cs-ai-flow { to { left: 100%; } }
.cs-ai__tag { margin-top: 26px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #4ED39C; }
.cs-ai__h2 { margin-top: 12px; max-width: 22ch; font-size: 32px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.cs-ai__h2 span { background: linear-gradient(90deg, #4ED39C, #A8F0CF 55%, #B4BEFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (min-width: 768px) { .cs-ai__h2 { max-width: none; font-size: 52px; } }
.cs-ai__lede { margin-top: 18px; max-width: 46rem; font-size: 17px; line-height: 1.65; color: rgba(255, 255, 255, .78); }
.cs-ai__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 32px 0 0; width: 100%; max-width: 560px; }
.cs-ai__facts > div { padding: 0 12px; border-left: 1px solid rgba(255, 255, 255, .14); }
.cs-ai__facts > div:first-child { border-left: 0; }
.cs-ai__facts dt { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.cs-ai__facts dd { margin-top: 8px; font-size: 13px; line-height: 1.35; color: #8FE3BF; }
@media (min-width: 768px) { .cs-ai__facts dt { font-size: 52px; } .cs-ai__facts dd { font-size: 14px; } }

/* demo: question tabs + Claude chat window */
.cs-ai__demo { display: grid; gap: 16px; margin-top: 44px; padding: 10px; border-radius: 28px; border: 1px solid rgba(255, 255, 255, .1); background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9); }
@media (min-width: 1024px) { .cs-ai__demo { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 10px; margin-top: 64px; } }
.cs-ai__qs { display: flex; gap: 8px; overflow-x: auto; padding: 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cs-ai__qs::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .cs-ai__qs { flex-direction: column; overflow: visible; padding: 8px; } }
.cs-ai__q { position: relative; display: flex; align-items: center; gap: 12px; flex: 0 0 78%; scroll-snap-align: start; overflow: hidden; padding: 14px; border-radius: 16px; border: 1px solid transparent; background: rgba(255, 255, 255, .03); text-align: left; color: #fff; cursor: pointer; transition: background-color .25s, border-color .25s; }
@media (min-width: 640px) { .cs-ai__q { flex-basis: 46%; } }
@media (min-width: 1024px) { .cs-ai__q { flex: none; } }
.cs-ai__q:hover { background: rgba(255, 255, 255, .06); }
.cs-ai__q[aria-selected="true"] { border-color: rgba(78, 211, 156, .45); background: rgba(0, 178, 107, .12); }
.cs-ai__q:focus-visible { outline: 2px solid #4ED39C; outline-offset: 2px; }
.cs-ai__qicon { position: relative; flex: none; width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.cs-ai__qicon::after { content: ""; position: absolute; inset: 9px; background: rgba(255, 255, 255, .75); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.cs-ai__q[aria-selected="true"] .cs-ai__qicon { background: #00B26B; border-color: #00B26B; }
.cs-ai__q[aria-selected="true"] .cs-ai__qicon::after { background: #04150D; }
.cs-ai__qtext { display: flex; flex-direction: column; min-width: 0; }
.cs-ai__qtext b { font-size: 15px; font-weight: 600; line-height: 1.35; }
.cs-ai__qtext small { margin-top: 3px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.cs-ai__q[aria-selected="true"] .cs-ai__qtext small { color: #4ED39C; }
/* autoplay progress along the bottom of the active question */
.cs-ai__qbar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: #4ED39C; }
.cs-ai__demo.is-playing .cs-ai__q[aria-selected="true"] .cs-ai__qbar { animation: cs-ai-bar var(--cs-ai-dur, 7s) linear forwards; }
@keyframes cs-ai-bar { to { width: 100%; } }

.cs-ai__chat { position: relative; display: flex; flex-direction: column; min-height: 440px; overflow: hidden; border-radius: 20px; background: #FAF9F5; color: #1F1E1C; }
.cs-ai__chatbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(0, 0, 0, .07); font-size: 14px; }
.cs-ai__chatbar img { width: 20px; height: 20px; border-radius: 5px; }
.cs-ai__conn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(0, 0, 0, .1); background: #fff; font-size: 12px; color: rgba(0, 0, 0, .65); }
.cs-ai__conn i { width: 7px; height: 7px; border-radius: 50%; background: #00B26B; box-shadow: 0 0 0 3px rgba(0, 178, 107, .2); }
@media (max-width: 479px) { .cs-ai__conn { font-size: 11px; padding: 3px 8px; } }
.cs-ai__panel { flex: 1; padding: 18px 16px 8px; }
@media (min-width: 768px) { .cs-ai__panel { padding: 24px 28px 8px; } }
.cs-ai__ask { margin-left: auto; max-width: 85%; width: fit-content; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: #EDEAE2; font-size: 15px; line-height: 1.45; }
.cs-ai__call { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .1); background: #fff; font-size: 13px; color: rgba(0, 0, 0, .7); }
.cs-ai__call code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #111; }
.cs-ai__callicon { width: 14px; height: 14px; background: #00A060; -webkit-mask: url("../../img/mvp-estimate/check.svg") center / contain no-repeat; mask: url("../../img/mvp-estimate/check.svg") center / contain no-repeat; }
.cs-ai__ok { padding: 1px 6px; border-radius: 5px; background: #EAF7F0; font-size: 11px; font-weight: 600; color: #007A4A; }
.cs-ai__answer { margin-top: 14px; }
.cs-ai__lead { font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.5; color: #1F1E1C; }
.cs-ai__foot { margin-top: 12px; font-size: 13px; line-height: 1.5; color: rgba(0, 0, 0, .6); }
.cs-ai__note { margin: 0; padding: 10px 16px 14px; font-size: 12px; color: rgba(0, 0, 0, .5); }
@media (min-width: 768px) { .cs-ai__note { padding: 10px 28px 18px; } }
/* answer: KPI tiles */
.cs-ai__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.cs-ai__kpis li { display: flex; flex-direction: column; padding: 12px; border-radius: 12px; border: 1px solid rgba(0, 0, 0, .08); background: #fff; }
.cs-ai__kpis span { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(0, 0, 0, .5); }
.cs-ai__kpis b { margin-top: 6px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: #111; }
.cs-ai__kpis em { margin-top: 2px; font-style: normal; font-size: 13px; font-weight: 600; color: #007A4A; }
@media (max-width: 479px) { .cs-ai__kpis b { font-size: 17px; } }
/* answer: ranked rows */
.cs-ai__rows { margin: 12px 0 0; padding: 0; list-style: none; border-radius: 12px; border: 1px solid rgba(0, 0, 0, .08); background: #fff; overflow: hidden; counter-reset: r; }
.cs-ai__rows li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; padding: 10px 14px; border-top: 1px solid rgba(0, 0, 0, .06); counter-increment: r; }
.cs-ai__rows li:first-child { border-top: 0; }
.cs-ai__rows li::before { content: counter(r); grid-row: span 2; align-self: center; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #EAF7F0; font-size: 12px; font-weight: 700; color: #007A4A; }
.cs-ai__rows b { font-size: 14px; font-weight: 600; color: #111; }
.cs-ai__rows span { grid-row: span 2; align-self: center; font-size: 13px; font-weight: 600; color: #111; white-space: nowrap; }
.cs-ai__rows em { font-style: normal; font-size: 12px; color: rgba(0, 0, 0, .55); }
/* answer: funnel bars */
.cs-ai__funnel { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.cs-ai__funnel li { display: grid; grid-template-columns: 128px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 13px; }
.cs-ai__funnel li > span { color: rgba(0, 0, 0, .75); }
.cs-ai__funnel i { display: block; height: 14px; width: var(--w); border-radius: 4px; background: linear-gradient(90deg, #00B26B, #4ED39C); }
.cs-ai__funnel b { text-align: right; font-weight: 700; color: #111; }
.cs-ai__funnel em { grid-column: 2 / -1; margin-top: -4px; font-style: normal; font-size: 12px; font-weight: 600; color: #B42318; }
.cs-ai__funnel li.is-drop i { background: linear-gradient(90deg, #DE4B47, #F28B82); }
@media (max-width: 479px) { .cs-ai__funnel li { grid-template-columns: 104px minmax(0, 1fr) 38px; } }
/* staged reveal when a question is chosen */
@media (prefers-reduced-motion: no-preference) {
  .cs-ai__panel.is-run .cs-ai__ask { animation: cs-ai-in .35s ease-out both; }
  .cs-ai__panel.is-run .cs-ai__call { animation: cs-ai-in .35s ease-out .45s both; }
  .cs-ai__panel.is-run .cs-ai__answer { animation: cs-ai-in .45s ease-out 1s both; }
  .cs-ai__panel.is-run .cs-ai__funnel i { animation: cs-ai-grow .7s ease-out 1.2s both; }
}
@keyframes cs-ai-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes cs-ai-grow { from { width: 0; } }

/* how it connects */
.cs-ai__h3 { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.cs-ai__flowwrap { margin-top: 56px; }
.cs-ai__flow { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
@media (min-width: 1024px) { .cs-ai__flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; } }
.cs-ai__node { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); }
.cs-ai__node b { align-self: end; font-size: 15px; font-weight: 600; }
.cs-ai__node > span:last-child { grid-column: 2; font-size: 13px; line-height: 1.4; color: rgba(255, 255, 255, .6); }
.cs-ai__nicon { grid-row: span 2; position: relative; width: 40px; height: 40px; border-radius: 11px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.cs-ai__nicon::after { content: ""; position: absolute; inset: 10px; background: #4ED39C; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.cs-ai__nicon--img::after, .cs-ai__nicon--mcp::after { content: none; }
.cs-ai__nicon--img { display: grid; place-items: center; overflow: hidden; background: #D77655; border-color: transparent; }
.cs-ai__nicon--img img { width: 40px; height: 40px; }
.cs-ai__nicon--mcp { display: grid; place-items: center; background: #00B26B; border-color: #00B26B; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #04150D; }
.cs-ai__node--mcp { border-color: rgba(78, 211, 156, .5); background: rgba(0, 178, 107, .12); box-shadow: 0 0 40px -10px rgba(0, 178, 107, .5); }
/* arrows between nodes: down on phones, right on desktop */
.cs-ai__node:not(:last-child)::after { content: ""; position: absolute; left: 33px; bottom: -11px; width: 2px; height: 10px; background: rgba(78, 211, 156, .5); }
@media (min-width: 1024px) {
  .cs-ai__node { grid-template-columns: 1fr; row-gap: 4px; padding: 18px; }
  .cs-ai__nicon { grid-row: auto; margin-bottom: 10px; }
  .cs-ai__node > span:last-child { grid-column: 1; }
  .cs-ai__node:not(:last-child)::after { left: auto; right: -26px; top: 50%; bottom: auto; width: 24px; height: 2px; background: linear-gradient(90deg, rgba(78, 211, 156, .2), #4ED39C); }
}

.cs-ai__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 15px; font-weight: 600; color: #4ED39C; text-decoration: none; }
.cs-ai__link:hover { color: #8FE3BF; }
.cs-ai__link:hover .cs-mcp__go { background: #00B26B; border-color: #00B26B; }
.cs-ai__link:hover .cs-mcp__go::after { background: #04150D; }
.cs-ai__link:focus-visible { outline: 2px solid #4ED39C; outline-offset: 3px; border-radius: 4px; }

/* ByteStack: the model row under the lede, and the mark in the chat bar */
.cs-ai__models { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 30px 0 0; padding: 0; list-style: none; }
.cs-ai__models li { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); font-size: 15px; font-weight: 600; }
.cs-ai__models span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #fff; }
.cs-ai__models img { width: 22px; height: 22px; }
.cs-bytestack .cs-ai__tile--mark { background: #030712; box-shadow: 0 16px 40px -14px rgba(127, 143, 255, .6), 0 0 0 1px rgba(127, 143, 255, .4); }
.cs-bytestack .cs-ai__tile--mark img { width: 44px; height: 44px; }
.cs-bytestack .cs-ai { margin-top: 56px; }
@media (min-width: 768px) { .cs-bytestack .cs-ai { margin-top: 96px; } }
.cs-bytestack .cs-ai__call b { font-weight: 600; color: #111; }
