/* ═══════════════════════════════════════════════════════════════════════════
   /case-studies/mrbeast-dont-pop-the-balloon — Deep Search case study
   (design artifact, 2026-10-14). Report layout: dark hero with a 136-cell
   evidence wall, then a sticky chapter rail beside a 700px reading column
   with wider evidence figures. Everything is scoped to .csx; the theme
   follows the site's [data-theme] switch.
   ═══════════════════════════════════════════════════════════════════════════ */

.csx {
    --bg: #ffffff; --paper: #f7f6fd; --ink: #15141c; --muted: #5f5d73; --line: #e6e4f2;
    --brand: #6d5ce6; --brand-ink: #4b3cc4; --brand-soft: #eeebfe;
    --copy: #d92d45; --copy-soft: #fdecef; --ok: #0f8f5a; --ok-soft: #e4f5ec;
    --hero: #16132b; --hero-ink: #f3f1ff; --hero-muted: #b6b0d9;
    --display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
    --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --top: calc(var(--nav-height, 72px) + 20px);
    background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.7;
    -webkit-font-smoothing: antialiased; overflow-x: clip;
}
[data-theme="dark"] .csx {
    --bg: #100f17; --paper: #191823; --ink: #ecebf6; --muted: #a4a1bb; --line: #2b2a3a;
    --brand: #9b8eff; --brand-ink: #b8aeff; --brand-soft: #221f3d; --copy: #ff6d82; --copy-soft: #3a1a22;
    --ok: #3dd394; --ok-soft: #14302a; --hero: #0b0a14; --hero-ink: #f3f1ff; --hero-muted: #a7a1cc;
}
/* #hv-root has overflow-x:hidden, which makes it a scroll container and stops
   the chapter rail from sticking. clip cuts the sideways overflow the same way
   without becoming a scroll container, so sticky works again. */
#hv-root:has(.csx) { overflow-x: clip; }
.csx *, .csx *::before, .csx *::after { box-sizing: border-box; }
.csx .gut { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.csx a { color: var(--brand-ink); text-underline-offset: 3px; }
.csx a:focus-visible, .csx button:focus-visible, .csx summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.csx p { margin: 0 0 16px; }
.csx strong { font-weight: 700; }

/* hero */
.csx .hero { background: var(--hero); color: var(--hero-ink); position: relative; overflow: hidden; margin-top: calc(-1 * var(--nav-height, 72px)); padding-top: var(--nav-height, 72px); }
.csx .hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(circle, rgba(124,108,255,.35), transparent 62%); pointer-events: none; }
.csx .hero-in { max-width: 1180px; margin-inline: auto; padding-block: 36px 64px; position: relative; text-align: left; }   /* the site centres <header> text */
.csx .crumb { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--hero-muted); margin-bottom: 40px; }
.csx .crumb a { color: var(--hero-muted); text-decoration: none; }
.csx .crumb a:hover { color: var(--hero-ink); }
.csx .hero-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: 56px; align-items: center; }
.csx .kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: #cfc8ff; border: 1px solid rgba(169,157,255,.35); padding: 6px 12px; border-radius: 999px; }
.csx .kicker i { width: 7px; height: 7px; border-radius: 50%; background: #ff6d82; display: block; }
.csx h1 { font-family: var(--display); font-weight: 800; font-size: clamp(40px,5.8vw,72px); line-height: 1; letter-spacing: -.03em; margin: 22px 0; text-wrap: balance; color: var(--hero-ink); }
.csx h1 .num { color: #ff6d82; }
.csx .lede { font-size: clamp(18px,1.9vw,21px); line-height: 1.55; color: var(--hero-muted); max-width: 52ch; margin: 0; }
.csx .hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-size: 14px; color: var(--hero-muted); }
.csx .hero-meta b { color: var(--hero-ink); font-weight: 600; }
.csx .wall { background: rgba(255,255,255,.04); border: 1px solid rgba(169,157,255,.22); border-radius: 18px; padding: 22px; }
.csx .wall-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.csx .wall-head span { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--hero-muted); }
.csx .wall-head b { font-family: var(--mono); font-size: 13px; color: var(--hero-ink); }
.csx .cells { display: grid; grid-template-columns: repeat(17,minmax(0,1fr)); gap: 5px; }
.csx .cell { aspect-ratio: 1; border-radius: 4px; background: #ff6d82; max-width: 100%; }
.csx .cell.sim { background: transparent; border: 1.5px solid #8b84b8; }
@media (prefers-reduced-motion: no-preference) {
    .csx .cell { animation: csx-pop .5s both; animation-delay: calc(var(--i) * 6ms); }
}
@keyframes csx-pop { from { transform: scale(.6); } to { transform: scale(1); } }
.csx .legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 13.5px; color: var(--hero-muted); }
.csx .legend span { display: inline-flex; align-items: center; gap: 8px; }
.csx .legend i { width: 12px; height: 12px; border-radius: 3px; background: #ff6d82; display: block; }
.csx .legend i.s { background: transparent; border: 1.5px solid #8b84b8; }
.csx .wall-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(169,157,255,.2); display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.csx .wall-foot div { min-width: 0; }
.csx .wall-foot b { display: block; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; color: var(--hero-ink); font-variant-numeric: tabular-nums; }
.csx .wall-foot span { font-size: 12.5px; line-height: 1.35; color: var(--hero-muted); display: block; margin-top: 6px; }
@media (max-width: 900px) { .csx .hero-grid { grid-template-columns: 1fr; gap: 40px; } .csx .crumb { margin-bottom: 28px; } }

/* body layout */
.csx .shell { max-width: 1180px; margin-inline: auto; display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 56px; padding-block: 56px 40px; }
.csx .rail { position: sticky; top: var(--top); align-self: start; }
.csx .rail p { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.csx .rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: ch; }
.csx .rail a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 14px; line-height: 1.35; }
.csx .rail a::before { counter-increment: ch; content: counter(ch, decimal-leading-zero); font-family: var(--mono); font-size: 11.5px; padding-top: 2px; color: var(--muted); opacity: .7; }
.csx .rail a:hover { background: var(--paper); color: var(--ink); }
.csx .rail a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.csx .rail a.on::before { color: var(--brand-ink); opacity: 1; }
.csx .main { min-width: 0; }
.csx .read { max-width: 700px; }
@media (max-width: 1060px) { .csx .shell { grid-template-columns: 1fr; gap: 0; } .csx .rail { display: none; } .csx .read { margin-inline: auto; } .csx .main .wide { margin-inline: auto; } }

/* typography */
.csx .ch { scroll-margin-top: var(--top); padding-top: 56px; }
.csx .ch:first-child { padding-top: 0; }
.csx .chno { font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-ink); font-weight: 700; }
.csx h2 { font-family: var(--display); font-weight: 800; font-size: clamp(28px,3.6vw,38px); line-height: 1.1; letter-spacing: -.02em; margin: 8px 0 18px; text-wrap: balance; color: var(--ink); }
.csx h3 { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.25; margin: 30px 0 8px; color: var(--ink); }
.csx h4 { color: var(--ink); }
.csx .big { font-size: 20px; line-height: 1.6; color: var(--ink); }
.csx .muted { color: var(--muted); }
.csx .small { font-size: 15px; }
.csx .smaller { font-size: 14px; }

.csx .glance { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 6px 0 10px; }
.csx .glance-h { background: var(--paper); padding: 14px 20px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.csx .glance dl { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.csx .glance dl div { padding: 14px 20px; border-bottom: 1px solid var(--line); min-width: 0; }
.csx .glance dl div:nth-child(odd) { border-right: 1px solid var(--line); }
.csx .glance dl div:nth-last-child(-n+2) { border-bottom: 0; }
.csx .glance dt { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.csx .glance dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .csx .glance dl { grid-template-columns: 1fr; } .csx .glance dl div:nth-child(odd) { border-right: 0; } .csx .glance dl div:nth-last-child(2) { border-bottom: 1px solid var(--line); } }
.csx .callout { border-left: 3px solid var(--brand); background: var(--brand-soft); padding: 16px 20px; border-radius: 0 12px 12px 0; font-size: 15.5px; line-height: 1.6; margin: 22px 0; }
.csx .callout b { color: var(--brand-ink); }

.csx .orig { display: flex; gap: 18px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 20px 0; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.csx .orig:hover { border-color: var(--brand); color: var(--ink); }
.csx .play { width: 52px; height: 52px; border-radius: 12px; background: var(--copy); display: grid; place-items: center; flex: none; }
.csx .play svg { width: 20px; height: 20px; }
.csx .orig > div { min-width: 0; flex: 1; }
.csx .orig b { display: block; font-family: var(--display); font-size: 19px; }
.csx .orig span:not(.play) { font-size: 14px; color: var(--muted); }
.csx .orig em { font-style: normal; font-family: var(--mono); font-size: 12.5px; color: var(--brand-ink); font-weight: 700; }
@media (max-width: 560px) {
    .csx .orig { flex-direction: column; text-align: center; gap: 12px; padding: 20px 18px; }
    .csx .orig > div { flex: none; width: 100%; }
    .csx .orig b { line-height: 1.25; margin-bottom: 4px; }
}

.csx .chips { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(200px,100%),1fr)); gap: 12px; margin: 20px 0; }
.csx .chip { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.csx .chip b { display: block; font-family: var(--display); font-size: 17px; margin-bottom: 4px; }
.csx .chip span { font-size: 14.5px; line-height: 1.5; color: var(--muted); display: block; }

.csx .signals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 22px 0 8px; }
.csx .sig { border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; position: relative; }
.csx .sig.on { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: var(--ok-soft); }
.csx .sig-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.csx .sig code { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); background: none; padding: 0; }
.csx .sig.on code { color: var(--ok); }
.csx .st { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.csx .sig.on .st { background: var(--ok); color: var(--bg); border-color: var(--ok); }
.csx .sig h4 { margin: 0 0 4px; font-family: var(--display); font-size: 17px; line-height: 1.25; }
.csx .sig p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (max-width: 760px) { .csx .signals { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 460px) { .csx .signals { grid-template-columns: 1fr; } }

.csx .wide { max-width: 960px; }
.csx figure { margin: 30px 0 10px; }
.csx figure button { all: unset; display: block; cursor: zoom-in; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); max-width: 100%; box-shadow: 0 18px 40px -24px rgba(40,30,110,.35); }
.csx figure img { display: block; width: 100%; height: auto; }
.csx figcaption { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); margin-top: 12px; max-width: 720px; }
.csx figcaption b { flex: none; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); padding-top: 2px; }
@media (prefers-reduced-motion: no-preference) { .csx figure button img { transition: transform .3s; } .csx figure button:hover img { transform: scale(1.012); } }

.csx .kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.csx .kpi { background: var(--paper); border-radius: 14px; padding: 18px; min-width: 0; }
.csx .kpi b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(30px,3.6vw,40px); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.csx .kpi b.r { color: var(--copy); }
.csx .kpi span { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
@media (max-width: 640px) { .csx .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.csx .bars { display: grid; gap: 12px; margin: 18px 0 8px; }
.csx .brow { display: grid; grid-template-columns: 92px minmax(0,1fr) 72px; align-items: center; gap: 12px; font-size: 15px; }
.csx .track { height: 16px; background: var(--paper); border-radius: 999px; overflow: hidden; }
.csx .fill { height: 100%; background: var(--brand); border-radius: 999px; }
.csx .brow .n { font-family: var(--mono); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.csx .brow .n small { font-weight: 500; color: var(--muted); }
@media (max-width: 420px) { .csx .brow { grid-template-columns: 74px minmax(0,1fr) 64px; gap: 8px; font-size: 14px; } }

.csx .tl { list-style: none; padding: 0; margin: 20px 0 0; position: relative; }
.csx .tl::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.csx .tl li { position: relative; padding: 0 0 22px 32px; }
.csx .tl li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--brand); }
.csx .tl li.r::before { border-color: var(--copy); background: var(--copy); }
.csx .tl time { display: block; font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--brand-ink); }
.csx .tl li.r time { color: var(--copy); }

.csx .types { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 22px 0 8px; }
.csx .type { border: 1px solid var(--line); border-radius: 14px; padding: 18px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.csx .type h4 { margin: 0; font-family: var(--display); font-size: 18px; }
.csx .type p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.csx .badge { align-self: flex-start; white-space: nowrap; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; }
.csx .badge.seen { background: var(--copy-soft); color: var(--copy); }
.csx .badge.cap { background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
@media (max-width: 600px) { .csx .types { grid-template-columns: 1fr; } }

.csx .readout { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 20px 0 4px; }
.csx .ro { background: var(--ok-soft); border-radius: 12px; padding: 14px; min-width: 0; }
.csx .ro b { display: block; font-family: var(--mono); font-size: 21px; color: var(--ok); font-variant-numeric: tabular-nums; }
.csx .ro span { font-size: 13px; color: var(--muted); line-height: 1.4; display: block; margin-top: 4px; }
@media (max-width: 640px) { .csx .readout { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.csx .verdict { display: flex; gap: 12px; align-items: flex-start; background: var(--ok-soft); border-radius: 12px; padding: 14px 16px; margin: 14px 0; font-size: 15px; }
.csx .verdict svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--ok); }

.csx .vs { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; margin: 22px 0; }
.csx .vs div { border-radius: 14px; padding: 18px; min-width: 0; }
.csx .vs .a { background: var(--copy-soft); }
.csx .vs .b { background: var(--paper); }
.csx .vs b { display: block; font-family: var(--display); font-size: 24px; line-height: 1.1; margin-bottom: 6px; }
.csx .vs .a b { color: var(--copy); }
.csx .vs span { font-size: 14.5px; line-height: 1.5; color: var(--muted); display: block; }
@media (max-width: 520px) { .csx .vs { grid-template-columns: 1fr; } }

.csx .caps { display: grid; gap: 0; margin: 20px 0; border-top: 1px solid var(--line); }
/* .caps > .cap only: the "Built to catch" pill is also class="badge cap" and
   picked up this 44px grid, which broke its text one word per line */
.csx .caps > .cap { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.csx .caps .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; }
.csx .caps .ic svg { width: 22px; height: 22px; stroke: var(--brand-ink); }
.csx .caps h4 { margin: 0 0 4px; font-family: var(--display); font-size: 18px; }
.csx .caps > .cap p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

.csx .aud { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.csx .aud a { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--ink); min-width: 0; }
.csx .aud a:hover { border-color: var(--brand); background: var(--paper); color: var(--ink); }
.csx .aud b { display: flex; justify-content: space-between; gap: 8px; font-family: var(--display); font-size: 18px; margin-bottom: 6px; }
.csx .aud b::after { content: "→"; color: var(--brand-ink); }
.csx .aud span { font-size: 14.5px; line-height: 1.55; color: var(--muted); display: block; }
@media (max-width: 560px) { .csx .aud { grid-template-columns: 1fr; } }

.csx details { border: 1px solid var(--line); border-radius: 14px; margin: 18px 0; background: var(--bg); }
.csx summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.csx summary::-webkit-details-marker { display: none; }
.csx summary::after { content: "+"; font-family: var(--mono); font-size: 20px; color: var(--brand-ink); }
.csx details[open] summary::after { content: "−"; }
.csx details .inner { padding: 0 20px 18px; font-size: 15.5px; }
.csx details ul { margin: 0; padding-left: 20px; }
.csx details li { margin-bottom: 8px; }

.csx .pull { font-family: var(--display); font-weight: 600; font-size: clamp(22px,2.6vw,28px); line-height: 1.3; letter-spacing: -.01em; margin: 24px 0; text-wrap: balance; }
.csx .cta { background: var(--hero); color: var(--hero-ink); position: relative; overflow: hidden; }
.csx .cta::before { content: ""; position: absolute; right: -160px; top: -200px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(124,108,255,.38), transparent 62%); pointer-events: none; }
.csx .cta-in { max-width: 1180px; margin-inline: auto; padding-block: 64px; display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; position: relative; }
.csx .cta h2 { color: var(--hero-ink); margin: 0 0 10px; }
.csx .cta p { margin: 0; color: var(--hero-muted); max-width: 52ch; }
.csx .btns { display: flex; gap: 12px; flex-wrap: wrap; }
.csx .btn { display: inline-block; background: #ffffff; color: #16132b; font-weight: 700; text-decoration: none; padding: 14px 22px; border-radius: 999px; white-space: nowrap; line-height: 1.2; }
.csx .btn:hover { color: #16132b; }
.csx .btn.ghost { background: transparent; color: var(--hero-ink); border: 1px solid rgba(243,241,255,.45); }
.csx .btn.ghost:hover { color: var(--hero-ink); border-color: var(--hero-ink); }
.csx .btn:focus-visible { outline-color: #ffffff; }
/* phones: the two CTA buttons share one row, smaller, equal width */
@media (max-width: 560px) {
    .csx .cta-in { padding-block: 44px; gap: 22px; }
    .csx .btns { width: 100%; flex-wrap: nowrap; gap: 10px; }
    .csx .btn { flex: 1 1 0; min-width: 0; text-align: center; white-space: normal; padding: 11px 12px; font-size: 14px; }
}
@media (max-width: 360px) {
    .csx .btns { gap: 8px; }
    .csx .btn { padding: 10px 8px; font-size: 12.5px; }
}
.csx .note-foot { max-width: 1180px; margin-inline: auto; padding-block: 28px 48px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.csx .note-foot p { margin: 0; }

.csx-lb { position: fixed; inset: 0; background: rgba(9,8,18,.9); display: flex; align-items: center; justify-content: center; z-index: 10050; cursor: zoom-out;
    padding: calc(24px + env(safe-area-inset-top,0px)) max(16px, env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(16px, env(safe-area-inset-left,0px)); }
.csx-lb[hidden] { display: none; }
.csx-lb img { max-width: 100%; max-height: 100%; border-radius: 10px; background: #fff; }
html.csx-lb-open { overflow: hidden; }
