/* Section "challenge": Ein Punkt für alles. Prefix: .ch-
   Accent: Yellow (--secondary), the colour of the one-point decision everywhere in the report.
   Baseline (no JS) = everything visible and readable. .ch--anim (JS, no reduced motion) arms the choreography. */

.ch { overflow: clip; isolation: isolate; } /* clip, not hidden: hidden would break the sticky video */
.ch::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40rem 26rem at 18% 6%, rgb(var(--secondary-rgb) / .06), transparent 70%),
    radial-gradient(36rem 30rem at 85% 62%, rgb(var(--secondary-rgb) / .035), transparent 70%);
}

/* ---------- Intro: the big 1 ---------- */
.ch-intro { display: grid; gap: 1.2rem; align-items: center; }
.ch-one { display: grid; justify-items: start; line-height: 1; }
.ch-one-n {
  font: 900 clamp(8rem, 40vw, 19rem)/.8 var(--font-display); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 2px var(--secondary);
  background-image: linear-gradient(to top, var(--secondary) 0 50%, transparent 50% 100%);
  background-size: 100% 200%; background-position: 0 100%;
  -webkit-background-clip: text; background-clip: text;
  text-shadow: 0 0 60px rgb(var(--secondary-rgb) / .12);
  padding-right: .06em;
}
.ch-one-l {
  margin-top: .4rem; font: 700 .8rem/1 var(--font-mono); letter-spacing: .5em; text-transform: uppercase; color: var(--secondary);
}
.ch-eyebrow { color: var(--secondary); }
.ch-intro .section-title em { color: var(--secondary); }
.ch-lead { margin: 0; max-width: 38rem; }
@media (min-width: 760px) {
  .ch-intro { grid-template-columns: auto minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); }
  .ch-one { justify-items: center; }
}

/* ---------- Acts ---------- */
.ch-act { margin-top: clamp(4rem, 11vw, 8rem); display: grid; gap: clamp(1.6rem, 4vw, 3rem); min-width: 0; }
.ch-act-copy { min-width: 0; max-width: 38rem; }
.ch-step {
  display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 .8rem;
  font: 700 .72rem/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--secondary);
}
.ch-step span {
  display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  border: 1px solid rgb(var(--secondary-rgb) / .55); font: 800 .8rem/1 var(--font); letter-spacing: 0;
}
.ch-h { margin: 0 0 .8rem; font: 900 clamp(1.8rem, 5vw, 2.8rem)/1.05 var(--font-display); letter-spacing: -.015em; color: var(--ink); }
.ch-h4 { margin: 0 0 .7rem; font: 700 italic clamp(1.3rem, 3.4vw, 1.7rem)/1.15 var(--font-display); color: var(--ink); }
.ch-p { margin: 0 0 1rem; color: var(--text); font-size: 1.02rem; line-height: 1.65; }
.ch-p strong { color: var(--ink); }
.ch-p .mono { color: var(--secondary); font-weight: 700; font-size: .95em; }
.ch-cap, .ch-photo figcaption, .ch-finale figcaption { margin-top: .65rem; font-size: .84rem; line-height: 1.45; color: var(--muted); }
.ch-cap .mono, .ch-photo figcaption .mono, .ch-finale figcaption .mono { color: var(--secondary); font-size: .76rem; margin-right: .35rem; }
.ch-note { margin: .7rem 0 0; font-size: .85rem; color: var(--muted); }

/* ---------- Act 1: the circle ---------- */
@media (min-width: 900px) {
  .ch-act--circle { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
.ch-mini { width: 100%; max-width: 26rem; border-collapse: collapse; margin-top: 1.2rem; font-size: .9rem; }
.ch-mini caption { caption-side: top; text-align: left; margin-bottom: .5rem; font: 700 .66rem/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ch-mini th, .ch-mini td { padding: .5rem .4rem; border-bottom: 1px solid var(--line); text-align: right; }
.ch-mini th:first-child { text-align: left; font-weight: 600; color: var(--ink); }
.ch-mini thead th { font: 700 .64rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); border-bottom-color: var(--line2); }
.ch-mini abbr { text-decoration: none; }
.ch-mini tbody td { color: var(--secondary); font-weight: 700; transition: background-color .6s; }
.ch-mini tbody tr:last-child > * { border-bottom: 0; }

.ch-cycle { margin: 0; min-width: 0; }
.ch-cycle-box { position: relative; width: 100%; max-width: 34rem; margin: 0 auto; aspect-ratio: 100 / 86; }
.ch-cycle-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch-edge { fill: none; stroke: var(--secondary); stroke-width: .55; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 4px rgb(var(--secondary-rgb) / .45)); }
.ch-head { fill: var(--secondary); }
.ch-node {
  position: absolute; transform: translate(-50%, -50%); z-index: 1;
  max-width: 42%; width: max-content; text-align: center;
  padding: .5rem .8rem; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--line2); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .9);
  font: 700 clamp(.74rem, 2.3vw, .95rem)/1.2 var(--font); color: var(--ink);
}
.ch-node.is-winner { border-color: var(--secondary); box-shadow: 0 0 0 1px rgb(var(--secondary-rgb) / .35), 0 0 34px -8px rgb(var(--secondary-rgb) / .45); }
.ch-score {
  position: absolute; transform: translate(-50%, -50%); z-index: 1;
  padding: .2rem .45rem; border-radius: .45rem; background: var(--bg);
  font: 700 clamp(.78rem, 2.2vw, .95rem)/1 var(--font-mono); color: var(--secondary); white-space: nowrap;
}
.ch-cycle .ch-cap { text-align: center; max-width: 30rem; margin-inline: auto; }

/* ---------- Act 2: equal in every value ---------- */
@media (min-width: 900px) {
  .ch-act--equal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
.ch-board-wrap {
  min-width: 0; padding: clamp(.8rem, 2.5vw, 1.4rem); border-radius: var(--r-lg);
  background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.ch-board { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ch-board thead th {
  padding: 0 .3rem .8rem; vertical-align: bottom; text-align: center;
  font: 800 clamp(.82rem, 2.4vw, 1rem)/1.2 var(--font); color: var(--ink); overflow-wrap: anywhere;
}
.ch-board thead td:first-child { width: 36%; }
.ch-board .ch-eq-h { width: 2.2rem; }
.ch-board tbody th {
  padding: .75rem .3rem .75rem 0; text-align: left;
  font: 600 clamp(.7rem, 2vw, .78rem)/1.3 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.ch-board tbody td { padding: .75rem .3rem; text-align: center; font-size: clamp(1.05rem, 3.4vw, 1.4rem); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ch-board tbody tr + tr > * { border-top: 1px solid var(--line); }
.ch-eq { color: var(--secondary) !important; font: 900 1.5rem/1 var(--font) !important; }
.ch-row--q th { color: var(--secondary); }
.ch-row--q td.mono { color: var(--secondary); font-family: var(--font-display); font-weight: 900; font-size: clamp(1.4rem, 4vw, 1.9rem); }

/* ---------- Act 3: the point ---------- */
.ch-act--point { grid-template-areas: "head" "stage" "steps"; }
.ch-point-head { grid-area: head; }
.ch-stage { grid-area: stage; margin: 0; min-width: 0; display: grid; justify-items: center; align-content: start; }
.ch-steps { grid-area: steps; list-style: none; margin: 0; padding: 0; width: 100%; max-width: 40rem; justify-self: center; display: grid; gap: clamp(2.5rem, 7vw, 4rem); min-width: 0; }
.ch-phone {
  position: relative; width: min(100%, 19rem); aspect-ratio: 9 / 16; border-radius: 1.6rem; overflow: hidden;
  background: #000; border: 5px solid #1c1c1c;
  box-shadow: 0 0 0 1px var(--line2), 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 80px -30px rgb(var(--secondary-rgb) / .3);
}
.ch-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-hint {
  position: absolute; left: .6rem; right: .6rem; bottom: .6rem; margin: 0; z-index: 1;
  display: flex; align-items: flex-start; gap: .55rem; padding: .6rem .75rem; border-radius: .9rem;
  background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font: 600 .82rem/1.35 var(--font); color: #fff;
}
.ch-hint-dot { flex: none; width: .6rem; height: .6rem; margin-top: .3rem; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgb(var(--secondary-rgb) / .9); }
.ch-hint-t { transition: opacity .35s var(--ease); }
.ch-hint.is-swap .ch-hint-t { opacity: 0; }
.ch-play {
  position: absolute; top: .6rem; right: .6rem; z-index: 1; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  border: 0; cursor: pointer; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center;
}
.ch-play[hidden] { display: none; }
.ch-play-i { width: .7rem; height: .8rem; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.ch-play.is-paused .ch-play-i { width: 0; height: 0; border-style: solid; border-width: .45rem 0 .45rem .75rem; border-color: transparent transparent transparent currentColor; margin-left: .2rem; }
.ch-stage-in { display: grid; justify-items: center; min-width: 0; width: 100%; }
.ch-stage .ch-cap { text-align: center; max-width: 19rem; }

.ch-beat { min-width: 0; }
.ch-photo { margin: 0; }
.ch-photo img, .ch-duo img, .ch-finale img { width: 100%; height: auto; border-radius: var(--r); }
.ch-photo > img, .ch-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: 1rem; }
.ch-duo-item { margin: 0; position: relative; }
.ch-duo-item img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 62%; border: 1px solid var(--line); }
.ch-duo-item figcaption {
  position: absolute; left: .5rem; bottom: .5rem; padding: .3rem .6rem; border-radius: 999px;
  background: rgba(0, 0, 0, .65); font: 700 .78rem/1 var(--font); color: #fff;
}

/* The reveal */
.ch-beat--reveal {
  position: relative; padding: clamp(1.4rem, 4vw, 2.2rem); border-radius: var(--r-lg);
  border: 1px solid rgb(var(--secondary-rgb) / .45);
  background: radial-gradient(120% 120% at 0% 0%, rgb(var(--secondary-rgb) / .12), transparent 60%), var(--bg2);
  box-shadow: 0 0 80px -30px rgb(var(--secondary-rgb) / .45);
}
.ch-reveal { margin: 0 0 1rem; display: grid; gap: .5rem; }
.ch-reveal-k { font: 700 .74rem/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ch-reveal-name {
  font: 900 clamp(2.4rem, 9vw, 4.4rem)/.98 var(--font-display); letter-spacing: -.03em; color: var(--secondary);
  text-shadow: 0 0 40px rgb(var(--secondary-rgb) / .25);
}
.ch-beat--reveal .ch-p { margin: 0; }

@media (min-width: 960px) {
  .ch-act--point {
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    grid-template-areas: "stage head" "stage steps";
    column-gap: clamp(2.5rem, 5vw, 5rem); align-items: start;
  }
  .ch-stage { grid-row: 1 / span 2; align-self: stretch; }
  .ch-stage { justify-items: stretch; }
  .ch-stage-in { position: sticky; top: calc(var(--chrome-h, 0px) + 1.5rem); display: grid; justify-items: center; }
  .ch-stage-in > .ch-phone { width: min(100%, calc((100vh - var(--chrome-h, 0px) - 8rem) * 9 / 16)); }
  .ch-steps { max-width: 38rem; gap: 0; justify-self: start; }
  .ch-beat { padding-block: 0 clamp(5rem, 14vh, 9rem); }
  .ch-beat--reveal { padding: 2.2rem; margin-bottom: 2rem; }
}

/* ---------- Act 4: the arc ---------- */
.ch-act--arc { grid-template-areas: "copy" "arc" "photo"; }
.ch-arc-media { grid-area: photo; display: grid; gap: 0; justify-items: center; min-width: 0; }
.ch-arc-media .ch-duo { width: min(100%, 24rem); }
.ch-act--arc > .ch-act-copy { grid-area: copy; }
.ch-arc { grid-area: arc; list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: .55rem; min-width: 0; max-width: 38rem; }
.ch-arc::before {
  content: ''; position: absolute; left: 1.05rem; top: 1.3rem; bottom: 1.3rem; width: 2px;
  background: linear-gradient(var(--line2), var(--secondary) 30%, var(--secondary) 70%, var(--bronze));
}
.ch-arc-step {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .8rem; row-gap: .15rem;
  padding: .75rem .9rem .75rem 2.9rem; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line);
}
.ch-arc-step::before {
  content: ''; position: absolute; left: .72rem; top: 1.05rem; width: .75rem; height: .75rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line2);
}
.ch-arc-step.is-win::before { border-color: var(--secondary); }
.ch-arc-step.is-point::before { background: var(--secondary); border-color: var(--secondary); box-shadow: 0 0 12px rgb(var(--secondary-rgb) / .6); }
.ch-arc-step:last-child.is-win::before { border-color: var(--bronze); background: var(--bronze); }
.ch-arc-k { font: 700 .68rem/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ch-arc-v { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 1.15rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.ch-arc-step.is-win .ch-arc-v { color: var(--secondary); }
.ch-arc-step.is-loss .ch-arc-v { color: var(--muted); font-weight: 600; }
.ch-arc-o { font-size: .9rem; color: var(--text); min-width: 0; }
.ch-arc-badge {
  justify-self: start; margin-top: .25rem; padding: .2rem .5rem; border-radius: 999px;
  border: 1px solid rgb(var(--secondary-rgb) / .5); color: var(--secondary);
  font: 700 .62rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
}
.ch-arc-step.is-point { border-color: rgb(var(--secondary-rgb) / .45); background: linear-gradient(90deg, rgb(var(--secondary-rgb) / .1), var(--panel) 70%); }
.ch-finale { margin: 0; width: min(100%, 24rem); }
.ch-finale img { border: 1px solid rgb(var(--bronze-rgb) / .4); box-shadow: var(--shadow), 0 0 60px -24px rgb(var(--bronze-rgb) / .35); }
@media (min-width: 900px) {
  .ch-act--arc {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    grid-template-areas: "copy photo" "arc photo"; column-gap: clamp(2.5rem, 5vw, 5rem); align-items: start;
  }
  .ch-arc-media { align-self: center; justify-self: end; }
}

/* ---------- Choreography (JS adds .ch--anim; never without JS or under reduced motion) ---------- */
.ch--anim .ch-one-n { background-position: 0 0; transition: background-position 1.6s .25s cubic-bezier(.6, 0, .2, 1); }
.ch--anim .ch-intro.is-in .ch-one-n { background-position: 0 100%; }
.ch--anim .ch-intro-copy > * { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.ch--anim .ch-intro:not(.is-in) .ch-intro-copy > * { opacity: 0; transform: translateY(18px); }
.ch--anim .ch-intro-copy > :nth-child(2) { transition-delay: .15s; }
.ch--anim .ch-intro-copy > :nth-child(3) { transition-delay: .3s; }

.ch--anim .ch-edge { transition: stroke-dashoffset .9s cubic-bezier(.5, 0, .2, 1) calc(var(--i) * .75s + .3s); }
.ch--anim .ch-head, .ch--anim .ch-score { transition: opacity .4s var(--ease) calc(var(--i) * .75s + 1.05s), transform .4s var(--ease) calc(var(--i) * .75s + 1.05s); }
.ch--anim .ch-cycle:not(.is-in) .ch-edge { stroke-dashoffset: 1; }
.ch--anim .ch-cycle:not(.is-in) .ch-head { opacity: 0; }
.ch--anim .ch-cycle:not(.is-in) .ch-score { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
.ch--anim .ch-node { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.ch--anim .ch-cycle:not(.is-in) .ch-node { opacity: 0; transform: translate(-50%, -40%); }

.ch--anim .ch-eq { transition: opacity .35s var(--ease) calc(var(--i) * .45s + .3s), transform .5s cubic-bezier(.2, 1.6, .4, 1) calc(var(--i) * .45s + .3s); }
.ch--anim .ch-board-wrap:not(.is-in) .ch-eq { opacity: 0; transform: scale(.2); }
.ch--anim .ch-board tbody td.mono { transition: color .5s var(--ease) calc(var(--i) * .45s + .3s); }
.ch--anim .ch-board-wrap:not(.is-in) tbody td.mono { color: var(--dim); }
.ch--anim .ch-board-wrap.is-in .ch-row--q td.mono { animation: ch-q 1.6s ease-in-out 2.4s 2; }
@keyframes ch-q { 50% { opacity: .35; } }

.ch--anim .ch-beat--reveal { transition: opacity 1s var(--ease), transform 1s var(--ease), box-shadow 1.2s var(--ease); }
.ch--anim .ch-beat--reveal:not(.is-in) { opacity: 0; transform: translateY(30px) scale(.97); box-shadow: none; }
.ch--anim .ch-reveal-name { transition: opacity 1s var(--ease) .35s, filter 1.2s var(--ease) .35s, letter-spacing 1.4s var(--ease) .35s; }
.ch--anim .ch-beat--reveal:not(.is-in) .ch-reveal-name { opacity: 0; filter: blur(12px); letter-spacing: .04em; }

.ch--anim .ch-arc-step { transition: opacity .7s var(--ease) calc(var(--i) * .16s), transform .7s var(--ease) calc(var(--i) * .16s); }
.ch--anim .ch-arc:not(.is-in) .ch-arc-step { opacity: 0; transform: translateX(-14px); }

/* Team highlight (sp:team) */
.ch-node.is-sel, .ch-mini tr.is-sel th { outline: 2px solid var(--primary); outline-offset: 2px; }

.ch-nw { white-space: nowrap; }
