/* ===== Case Study template — long-form, animated. Loads AFTER styles.css ===== */

.cs-main { overflow-x: clip; }

/* ---- scroll-reveal (JS adds .in) ---- */
.reveal-up { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal-up.in { opacity: 1; transform: none; }
.reveal-up[data-d="1"] { transition-delay: .08s; }
.reveal-up[data-d="2"] { transition-delay: .16s; }
.reveal-up[data-d="3"] { transition-delay: .24s; }
.reveal-up[data-d="4"] { transition-delay: .32s; }

/* ---- reading progress bar ---- */
.cs-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 200; transition: width .1s linear; }

/* ===== Hero ===== */
.cs-hero { position: relative; background: var(--dark); color: #fff; padding: 150px 0 90px; overflow: hidden; }
.cs-hero__glow { position: absolute; inset: 0; background:
  radial-gradient(60% 55% at 78% 20%, rgba(81,152,255,.28), transparent 70%),
  radial-gradient(45% 45% at 10% 90%, rgba(37,99,235,.20), transparent 70%); pointer-events: none; }
.cs-hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.cs-hero h1 { color: #fff; font-size: clamp(38px, 6vw, 68px); line-height: 1.02; letter-spacing: -1px; }
.cs-hero__deck { color: rgba(255,255,255,.72); font-size: clamp(17px, 2.2vw, 21px); margin-top: 22px; max-width: 46ch; }
.cs-hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.cs-hero__meta span { font-family: var(--font-head); font-weight: 600; font-size: 12.5px; letter-spacing: .5px; text-transform: uppercase; color: rgba(255,255,255,.82); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 8px 15px; }
.cs-hero__media { position: relative; }
.cs-hero__media img { border-radius: var(--radius); box-shadow: 0 40px 80px rgba(0,0,0,.5); }
.cs-scrollcue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); color: rgba(255,255,255,.5); font-size: 22px; animation: csBob 1.8s var(--ease) infinite; }
@keyframes csBob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* ===== Stat band ===== */
.cs-stats { background: var(--paper); border-bottom: 1px solid var(--line); }
.cs-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: clamp(48px,7vw,72px) 0; }
.cs-stat { text-align: center; }
.cs-stat__num { font-family: var(--font-head); font-weight: 900; color: var(--ink); font-size: clamp(40px, 6vw, 66px); line-height: 1; letter-spacing: -1px; }
.cs-stat__num b { color: var(--pop); font-weight: 900; }
.cs-stat__label { margin-top: 10px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.4; }
.cs-stat + .cs-stat { position: relative; }

/* ===== Content sections ===== */
.cs-sec { padding: clamp(64px, 9vw, 110px) 0; }
.cs-sec--alt { background: var(--paper-2); }
.cs-sec--dark { background: var(--dark); color: #fff; }
.cs-hero .kicker, .cs-sec--dark .kicker { color: var(--pop-light); }   /* light amber for contrast on dark */
.cs-lede { max-width: 760px; }
.cs-lede h2 { font-size: clamp(28px, 4.4vw, 44px); margin-bottom: 20px; }
.cs-sec--dark h2 { color: #fff; }
.cs-lede p { font-size: clamp(17px, 2vw, 20px); margin-bottom: 18px; }
.cs-lede p strong { color: var(--ink); }
.cs-sec--dark .cs-lede p { color: rgba(255,255,255,.78); }
.cs-sec--dark .cs-lede p strong { color: #fff; }
.cs-figure-note { font-family: var(--font-head); font-size: 13px; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-soft); margin-top: 14px; }

/* ===== Newton's cradle (interactive) ===== */
.cradle-figure { position: relative; margin: 44px auto 0; }
.cradle { display: flex; justify-content: center; align-items: flex-start; gap: 2px; height: 180px; margin: 0 auto; position: relative; z-index: 1; }
.cradle__pend { width: 46px; display: flex; flex-direction: column; align-items: center; transform-origin: top center; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cradle__string { display: block; width: 2px; height: 108px; background: rgba(255,255,255,.35); transition: background .25s var(--ease); }
.cradle__ball { display: block; width: 42px; height: 42px; border-radius: 50%; margin-top: -1px;
  background: radial-gradient(circle at 34% 28%, #f3f6fb, #c3ccd9 48%, #808b9e);
  box-shadow: 0 8px 18px rgba(0,0,0,.4), inset 0 -4px 8px rgba(0,0,0,.28), inset 0 3px 7px rgba(255,255,255,.55);
  transition: transform .25s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease); }
.cradle__pend:not(.cradle__pend--end) .cradle__ball {
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.82), var(--bc) 58%, color-mix(in srgb, var(--bc) 60%, #000));
  box-shadow: 0 8px 18px rgba(0,0,0,.38), inset 0 -4px 8px rgba(0,0,0,.22), inset 0 3px 7px rgba(255,255,255,.4); }
.cradle__pend:not(.cradle__pend--end) { animation: swingMid 2.6s linear infinite; }
.cradle__pend:first-child { animation: swingL 2.6s linear infinite; }
.cradle__pend:last-child  { animation: swingR 2.6s linear infinite; }
.cradle:hover .cradle__pend, .cradle:focus-within .cradle__pend, .cradle.is-paused .cradle__pend { animation-play-state: paused; }
.cradle__pend:hover .cradle__ball, .cradle__pend:focus-visible .cradle__ball, .cradle__pend.is-active .cradle__ball, .cradle__pend.is-hint .cradle__ball {
  transform: scale(1.14);
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.92), var(--bc) 54%, color-mix(in srgb, var(--bc) 58%, #000));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--bc) 26%, transparent), 0 12px 26px color-mix(in srgb, var(--bc) 52%, transparent); }
.cradle__pend:hover .cradle__string, .cradle__pend:focus-visible .cradle__string, .cradle__pend.is-active .cradle__string, .cradle__pend.is-hint .cradle__string { background: var(--bc); }
.cradle__pend:focus-visible { outline: none; }
.cradle__zone { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); width: 162px; height: 68px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.04); border-radius: 16px; z-index: 0; }
.cradle__zone-label { position: absolute; top: 150px; left: 50%; transform: translateX(-50%); z-index: 3;
  font-family: var(--font-head); font-weight: 700; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: rgba(255,255,255,.9); background: #20242c; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
@keyframes swingL {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-2deg); }
  50%  { transform: rotate(0deg); animation-timing-function: ease-out; }
  75%  { transform: rotate(52deg); animation-timing-function: ease-in; }
  100% { transform: rotate(0deg); }
}
@keyframes swingR {
  0%   { transform: rotate(0deg); animation-timing-function: ease-out; }
  25%  { transform: rotate(-52deg); animation-timing-function: ease-in; }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}
@keyframes swingMid {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-2deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}
.cradle__reveal { text-align: center; max-width: 620px; margin: 20px auto 0; min-height: 104px; }
.cradle__seq { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 6px; font-family: var(--font-head); font-weight: 800; font-size: 19px; line-height: 1.3; margin-bottom: 12px; }
.cradle__seq-arr { color: rgba(255,255,255,.38); }
.cradle__seq-item { font: inherit; color: var(--bc); background: none; border: 0; padding: 0 1px 2px; cursor: pointer; border-bottom: 2px solid transparent; transition: border-color .2s var(--ease); }
.cradle__seq-item:hover, .cradle__seq-item:focus-visible, .cradle__seq-item.is-on { border-bottom-color: currentColor; outline: none; }
.cradle__reveal-tag { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.92); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 3px 11px; margin: 0 0 10px; }
.cradle__reveal-tag[hidden] { display: none; }
.cradle__reveal-desc { color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.55; }

/* ===== Slideshow ===== */
.cs-slides { margin-top: 44px; }
.cs-slides__stage { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); aspect-ratio: 16 / 10; }
.cs-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--ease); display: flex; align-items: center; justify-content: center; }
.cs-slide.is-active { opacity: 1; }
.cs-slide img { width: 100%; height: 100%; object-fit: cover; }
.cs-slide__ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #aeb6c2; background:
  repeating-linear-gradient(45deg, #eef0f3, #eef0f3 14px, #e9ebef 14px, #e9ebef 28px); }
.cs-slide__ph svg { width: 54px; height: 54px; opacity: .6; }
.cs-slide__ph span { font-family: var(--font-head); font-weight: 700; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; }
.cs-slides__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(27,29,34,.6); color: #fff; font-size: 22px; cursor: pointer; display: grid; place-items: center; transition: background .2s var(--ease); }
.cs-slides__arrow:hover { background: var(--accent); }
.cs-slides__arrow--prev { left: 14px; } .cs-slides__arrow--next { right: 14px; }
.cs-slides__cap { display: flex; align-items: center; justify-content: center; margin-top: 16px; }
.cs-slides__caption { font-size: 15px; color: var(--ink-soft); }
.cs-slides__dots { display: flex; gap: 8px; }
.cs-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; padding: 0; transition: all .2s var(--ease); }
.cs-dot.is-active { background: var(--accent); transform: scale(1.25); }

/* ===== Results: big stats + chart ===== */
.cs-results__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 48px; }
.cs-bigstats { display: grid; gap: 28px; }
.cs-bigstat { display: flex; align-items: baseline; gap: 16px; border-left: 3px solid var(--pop-light); padding-left: 20px; }
.cs-bigstat__num { font-family: var(--font-head); font-weight: 900; color: #fff; font-size: clamp(40px,6vw,60px); line-height: 1; letter-spacing: -1px; }
.cs-bigstat__label { color: rgba(255,255,255,.72); font-size: 15.5px; }
/* bar chart */
.cs-chart { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 28px 26px; }
.cs-chart__title { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.65); margin-bottom: 22px; }
.cs-bars { display: flex; align-items: flex-end; gap: 20px; height: 210px; margin-bottom: 30px; }
.cs-bar { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; }
.cs-bar__fill { position: relative; width: 100%; height: 0; border-radius: 10px 10px 0 0; background: linear-gradient(var(--pop-light), var(--pop)); transition: height 1.2s var(--ease); }
.cs-chart.in .cs-bar__fill { height: var(--h); }
.cs-bar__val { position: absolute; top: -30px; left: 0; right: 0; text-align: center; font-family: var(--font-head); font-weight: 800; color: #fff; font-size: 19px; opacity: 0; transition: opacity .4s var(--ease) .8s; }
.cs-chart.in .cs-bar__val { opacity: 1; }
.cs-bar__yr { position: absolute; top: 100%; left: 0; right: 0; text-align: center; margin-top: 10px; font-size: 12.5px; color: rgba(255,255,255,.55); }

/* ===== Pull quote ===== */
.cs-quote { background: var(--accent); color: #fff; --fx: rgba(255,255,255,.3); }
.cs-quote__inner { max-width: 880px; text-align: center; }
.cs-quote blockquote { font-family: var(--font-head); font-weight: 700; font-size: clamp(22px, 3.4vw, 34px); line-height: 1.3; letter-spacing: -.5px; }
.cs-quote__mark { font-size: 64px; line-height: 0; opacity: .5; display: block; margin-bottom: 10px; }
.cs-quote figcaption { margin-top: 26px; font-family: var(--font-body); }
.cs-quote figcaption strong { display: block; font-size: 17px; }
.cs-quote figcaption span { font-size: 14px; color: rgba(255,255,255,.85); }

/* ===== CTA / footer-of-study ===== */
.cs-end { text-align: center; position: relative; isolation: isolate; overflow: hidden; }
.cs-end__dots { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cs-end .wrap { position: relative; z-index: 1; }
.cs-end h2 { font-size: clamp(28px, 4.5vw, 44px); margin-bottom: 10px; }
.cs-end p { margin-bottom: 26px; }
.cs-end__links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== WIW: approach "snowball" flow ===== */
.cs-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 8px; margin: 40px auto 0; max-width: 1000px; }
.cs-flow__item { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: #fff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.17); border-radius: 999px; padding: 8px 14px; white-space: nowrap; }
.cs-flow__item--seed { color: var(--pop-light); background: rgba(251,191,36,.14); border-color: rgba(251,191,36,.5); }
.cs-flow__arr { color: rgba(255,255,255,.35); font-weight: 700; font-size: 13px; }

/* ===== WIW: invented-elements grid ===== */
.cs-invented { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 26px 24px; }
.cs-invented__title { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.65); margin-bottom: 18px; }
.cs-invented__list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cs-invented__list li { font-family: var(--font-head); font-weight: 600; font-size: 14px; line-height: 1.3; color: #fff; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 11px 13px 11px 34px; position: relative; display: flex; align-items: center; }
.cs-invented__list li::before { content: "\2605"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--pop-light); font-size: 11px; }
.cs-invented__add { color: rgba(255,255,255,.42) !important; border-style: dashed !important; }
.cs-invented__add::before { content: "+" !important; color: rgba(255,255,255,.45) !important; font-size: 15px !important; }

/* ===== WIW: credit line ===== */
.cs-credit { font-size: 14px; color: var(--ink-soft); margin-top: 22px; max-width: 72ch; line-height: 1.65; }
.cs-credit a { color: var(--pop-light); border-bottom: 1px solid rgba(251,191,36,.45); }
.cs-credit a:hover { color: #fff; border-bottom-color: #fff; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .cs-hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .cs-hero__media { order: -1; max-width: 460px; }
  .cs-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 36px 16px; }
  .cs-results__grid { grid-template-columns: 1fr; gap: 36px; }
  .cs-invented__list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-up { opacity: 1 !important; transform: none !important; transition: none; }
  .cradle__pend { animation: none !important; }
  .cs-scrollcue { animation: none; }
  .cs-bar__fill { transition: none; }
}

/* ---- Forstall Scanner intro (inside the dark Approach band) ---------- */
.cs-try { max-width: 620px; margin: 30px auto 0; text-align: center; }
.cs-try__hed { font-family: var(--font-head); font-weight: 800; font-size: clamp(18px, 3vw, 22px); color: #fff; margin: 0 0 8px; }
.cs-try__hed span { color: var(--pop-light); }
.cs-try__sub { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.7); margin: 0 auto; max-width: 56ch; }
.cs-try__sub b { color: #fff; font-weight: 700; }
.cs-flow__lead { text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.5); margin: 40px 0 -6px; }

/* ===== WIW: hero logo title-card ===== */
.wiw-card {
  --fx: rgba(201,164,92,.55);
  position: relative; aspect-ratio: 5 / 4; border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 12% 12% 11%;
  background:
    radial-gradient(130% 78% at 50% 15%, rgba(216,142,76,.42), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, #3b2518 0%, #24170f 46%, #130d0a 100%);
  border: 1px solid rgba(201,164,92,.32);
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}
.wiw-card::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 50% 128%, rgba(0,0,0,.55), rgba(0,0,0,0) 58%); }
.wiw-card__logo { position: relative; z-index: 1; width: min(80%, 340px); height: auto; filter: drop-shadow(0 6px 16px rgba(0,0,0,.55)); }
/* beat the generic .cs-hero__media img box-shadow/radius so the transparent logo has no ghost box */
.cs-hero__media .wiw-card__logo { box-shadow: none; border-radius: 0; }
.wiw-card__sub { position: relative; z-index: 1; font-family: var(--font-body); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(244,234,214,.72); text-align: center; max-width: 30ch; line-height: 1.5; }

/* Petri hero card — the full-colour logo is dark-on-transparent, so it rides a
   clean light gradient (a dark card would swallow the charcoal "Petri"). */
.petri-card {
  position: relative; aspect-ratio: 5 / 4; border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 12%;
  background:
    radial-gradient(130% 82% at 50% 12%, rgba(14,150,195,.34), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, #0e303d 0%, #0a222c 46%, #06151b 100%);
  border: 1px solid rgba(14,150,195,.28);
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}
.petri-card::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 50% 128%, rgba(0,0,0,.5), rgba(0,0,0,0) 58%); }
.petri-card__logo { position: relative; z-index: 1; width: min(86%, 410px); height: auto; filter: drop-shadow(0 5px 16px rgba(0,0,0,.4)); }
.cs-hero__media .petri-card__logo { box-shadow: none; border-radius: 0; }

/* ===== Case-study diagram / pipeline (how-it-works flows) =====
   Per-diagram accent via --dg / --dg-soft / --dg-line on the .cs-diagram. */
.cs-diagram { margin-top: 42px; }
.cs-pipe { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 12px; }
.cs-pipe__node {
  flex: 1 1 190px; max-width: 250px; min-width: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 18px; display: flex; flex-direction: column; gap: 9px;
  box-shadow: 0 12px 30px rgba(20,28,45,.07);
}
.cs-pipe__node--key { border-color: var(--dg, var(--accent)); box-shadow: 0 14px 34px var(--dg-soft, rgba(81,152,255,.16)); }
.cs-pipe__step { font-family: var(--font-head); font-weight: 700; font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--dg, var(--accent)); }
.cs-pipe__title { font-family: var(--font-head); font-weight: 800; font-size: 16px; line-height: 1.18; color: var(--ink); }
.cs-pipe__desc { font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.cs-pipe__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.cs-pipe__chips span { font-family: var(--font-head); font-weight: 600; font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--dg-soft, rgba(81,152,255,.1)); color: var(--ink); border: 1px solid var(--dg-line, rgba(81,152,255,.34)); }
.cs-pipe__arrow { flex: 0 0 auto; align-self: center; width: 30px; display: grid; place-items: center; color: var(--dg, var(--accent)); }
.cs-pipe__arrow svg { width: 24px; height: 24px; }
@media (max-width: 760px) {
  .cs-pipe { flex-direction: column; align-items: stretch; }
  .cs-pipe__node { max-width: none; }
  .cs-pipe__arrow { transform: rotate(90deg); width: auto; height: 26px; }
}

/* ===== Next case study band ===== */
.cs-next { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; padding: clamp(52px,8vw,88px) 20px; background: var(--dark); color: #fff; text-decoration: none; border-top: 1px solid rgba(255,255,255,.08); overflow: hidden; }
.cs-next::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(62% 120% at 50% 0%, rgba(81,152,255,.16), rgba(0,0,0,0) 60%); }
.cs-next > * { position: relative; }
.cs-next__label { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.cs-next__title { font-family: var(--font-head); font-weight: 900; font-size: clamp(26px,4.4vw,42px); letter-spacing: -.5px; display: inline-flex; align-items: center; gap: .35em; }
.cs-next__arrow { display: inline-block; transition: transform .25s var(--ease); }
.cs-next:hover .cs-next__arrow { transform: translateX(10px); }

/* ===== Build timeline (works on light or dark sections; accent via --dg) ===== */
.cs-timeline { margin-top: 40px; max-width: 720px; }
.cs-timeline__item { position: relative; padding: 0 0 30px 32px; border-left: 2px solid var(--dg-line, rgba(81,152,255,.4)); }
.cs-timeline__item:last-child { padding-bottom: 0; border-left-color: transparent; }
.cs-timeline__dot { position: absolute; left: -9px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--dg, var(--accent)); }
.cs-timeline__meta { font-family: var(--font-head); font-weight: 700; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dg, var(--accent)); }
.cs-timeline__head { font-family: var(--font-head); font-weight: 800; font-size: clamp(17px,2.4vw,20px); color: inherit; margin: 5px 0 6px; line-height: 1.2; }
.cs-timeline__body { font-size: 14px; line-height: 1.55; color: inherit; opacity: .8; margin: 0; }

/* ===== Horizontal bar chart (e.g. "who won"); animates in on reveal ===== */
.cs-wins { margin: 34px 0 6px; }
.cs-wins__title { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: inherit; margin-bottom: 16px; }
.cs-wins__title span { font-weight: 600; opacity: .55; }
.cs-wbars { display: grid; gap: 11px; max-width: 580px; }
.cs-wbar { display: grid; grid-template-columns: minmax(92px, 118px) 1fr 26px; align-items: center; gap: 12px; }
.cs-wbar__name { font-size: 13px; color: inherit; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-wbar__track { height: 13px; border-radius: 7px; background: rgba(255,255,255,.08); overflow: hidden; }
.cs-wbar__fill { display: block; height: 100%; width: 0; border-radius: 7px; background: var(--c, var(--accent)); transition: width 1.1s var(--ease); }
.reveal-up.in .cs-wbar__fill { width: var(--w); }
.cs-wbar__val { font-family: var(--font-head); font-weight: 800; font-size: 14px; color: inherit; text-align: right; }
@media (prefers-reduced-motion: reduce) { .cs-wbar__fill { transition: none; } }

/* ===== Process gallery placeholders (swap frames for images when ready) ===== */
.cs-proc { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 38px; }
.cs-proc__frame { aspect-ratio: 4 / 3; border-radius: var(--radius); border: 1.5px dashed var(--line); background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; text-align: center; padding: 18px; }
.cs-proc__frame svg { width: 36px; height: 36px; color: #b8c0cd; }
.cs-proc__frame b { font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--ink-soft); }
.cs-proc__frame span { font-family: var(--font-head); font-weight: 700; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #aab2c0; }
.cs-proc__frame img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* ===== Petri logo pile — shuffle the concepts to the final mark ===== */
#petri-pile { max-width: 540px; margin: 44px auto 0; }
.pp-stage { position: relative; width: 100%; aspect-ratio: 1 / 1.2; }
.pp-paper {
  position: absolute; left: 50%; top: 50%; width: 74%; aspect-ratio: 1000 / 1403;
  background: #fff; border-radius: 7px; overflow: hidden;
  box-shadow: 0 20px 44px rgba(20,30,50,.22), 0 2px 8px rgba(0,0,0,.09);
  transform: translate(-50%,-50%); transform-origin: center;
  transition: transform .5s var(--ease), opacity .5s var(--ease); will-change: transform;
}
.pp-paper img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; padding: 8%; box-sizing: border-box; }
.pp-paper.is-front { cursor: pointer; }
.pp-paper.is-final { aspect-ratio: 1000 / 1593; }   /* the final sheet is taller — fill its own proportions */
/* a drawn checkmark in the corner marks the final — clear of the artwork */
.pp-check { position: absolute; top: 3%; right: 4%; width: 13%; overflow: visible; pointer-events: none; opacity: 0; }
.pp-check path { fill: none; stroke: #0A7197; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.pp-paper.is-final .pp-check { opacity: 1; }
.pp-paper.is-final .pp-check path { animation: pp-draw .5s ease forwards .35s; }
@keyframes pp-draw { to { stroke-dashoffset: 0; } }

.pp-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.pp-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-name { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--ink); }
.pp-name.is-final { color: #0A7197; }
.pp-count { font-family: var(--font-head); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.pp-btn { flex: none; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: #fff; background: var(--ink); border: 0; border-radius: 999px; padding: 11px 20px; cursor: pointer; transition: background .2s var(--ease), transform .1s; }
.pp-btn:hover { background: #000; }
.pp-btn:active { transform: translateY(1px); }
.pp-btn.is-restart { background: #0A7197; }
@media (prefers-reduced-motion: reduce) { .pp-paper { transition: none; } .pp-paper.is-final .pp-circle path { animation: none; stroke-dashoffset: 0; } }

/* ===== WIW: split text + photo (Challenge) ===== */
.cs-split { display: grid; grid-template-columns: 1.08fr .92fr; gap: 50px; align-items: center; }
.cs-split .cs-lede { max-width: none; }
.cs-split__media { margin: 0; }
.cs-split__media img { width: 100%; border-radius: var(--radius); box-shadow: 0 26px 54px rgba(0,0,0,.26); display: block; }

@media (max-width: 860px) {
  .cs-split { grid-template-columns: 1fr; gap: 30px; }
  .cs-split__media { max-width: 520px; }
}
