/* Leadership challenges: the dilemma-first entry layer over the live map. */
#cx { position: fixed; inset: 0; z-index: 30; display: none; overflow-y: auto; overscroll-behavior: contain; }
#cx.on { display: block; animation: cxfade .5s var(--ease) both; }
#cx.landing { background: linear-gradient(90deg, rgba(8,9,10,.96) 0%, rgba(8,9,10,.9) 38%, rgba(8,9,10,.35) 70%, rgba(8,9,10,.15) 100%); }
#cx.dilemma, #cx.reveal, #cx.takeaway { background: rgba(8,9,10,.72); backdrop-filter: blur(6px) saturate(1.1); -webkit-backdrop-filter: blur(6px) saturate(1.1); }
@keyframes cxfade { from { opacity: 0; } }
@keyframes cxrise { from { opacity: 0; transform: translateY(14px); } }
body.cx-on .hero, body.cx-on .legend, body.cx-on .zoom, body.cx-on .note, body.cx-on .tour { opacity: 0; pointer-events: none; }
.cx-screen { min-height: 100%; display: flex; align-items: center; padding: 96px 28px 48px; }
.cx-screen > * { animation: cxrise .6s var(--ease) both; }

/* landing */
.cx-landing { align-items: center; }
.cx-copy { max-width: 640px; margin-left: max(0px, calc((100vw - 1320px) / 2)); }
.cx-landing h1 { font: 600 clamp(38px, 4.6vw, 64px)/1.03 var(--display); letter-spacing: -.035em; margin: 16px 0 18px; }
.cx-landing h1 em { font-style: normal; color: var(--lime); }
.cx-sub { font-size: 19px; line-height: 1.55; color: var(--muted); margin: 0 0 30px; max-width: 560px; }
.cx-entries { display: grid; gap: 12px; }
.cx-entry { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 20px 56px 20px 22px; border-radius: 18px; border: 1px solid var(--line); background: rgba(17,18,20,.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .2s, background .2s, transform .2s var(--ease); }
.cx-entry:hover { border-color: rgba(244,245,240,.3); transform: translateY(-1px); }
.cx-entry.primary { border-color: rgba(199,255,53,.55); background: linear-gradient(135deg, rgba(199,255,53,.13), rgba(17,18,20,.85) 60%); }
.cx-entry.primary:hover { border-color: var(--lime); }
.cx-entry b { font: 600 20px/1.2 var(--display); letter-spacing: -.015em; color: var(--text); }
.cx-entry > span:not(.cx-tag) { font-size: 15px; line-height: 1.5; color: var(--muted); }
.cx-entry .cx-arrow { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted); font-style: normal; transition: transform .2s; }
.cx-entry.primary .cx-arrow { color: var(--lime); }
.cx-entry:hover .cx-arrow { transform: translate(3px, -50%); }
.cx-tag { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }
.cx-entry.primary .cx-tag { color: var(--lime); }
.cx-for { margin: 22px 0 6px; font-size: 14px; color: var(--muted); }
.cx-fine { font: 11.5px/1.6 var(--mono); color: var(--subtle); letter-spacing: .02em; margin: 10px 0 0; }

/* cards */
.cx-card { width: min(860px, 100%); margin: 0 auto; padding: 34px 38px 30px; border-radius: 26px; border: 1px solid var(--line); background: rgba(14,15,17,.9); box-shadow: 0 40px 100px rgba(0,0,0,.55); }
.cx-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 500 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }
.cx-meta span:last-child { color: var(--lime); }
.cx-card h2 { font: 600 clamp(26px, 3vw, 36px)/1.12 var(--display); letter-spacing: -.028em; margin: 16px 0 14px; }
.cx-story { font-size: 17.5px; line-height: 1.62; color: var(--text); margin: 0; opacity: .9; }
.cx-q { margin: 28px 0 14px; font: 600 15px var(--display); letter-spacing: .01em; color: var(--lime); }
.cx-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cx-option { position: relative; display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px 46px 18px 18px; border-radius: 16px; border: 1px solid rgba(178,140,255,.32); background: rgba(127,58,237,.09); font: 600 16.5px/1.35 var(--display); letter-spacing: -.01em; color: var(--text); transition: border-color .2s, background .2s, transform .2s var(--ease); }
.cx-option:hover { border-color: rgba(199,255,53,.7); background: rgba(199,255,53,.07); transform: translateY(-1px); }
.cx-option .cx-arrow { position: absolute; right: 16px; font-style: normal; color: var(--muted); }
.cx-letter { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 14px var(--mono); color: var(--lav); border: 1.5px solid var(--lav); background: rgba(127,58,237,.22); }
.cx-letter.on { color: #0B0C08; background: var(--lime); border-color: var(--lime); }
.cx-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.cx-link { background: none; border: 0; padding: 4px 0; color: var(--muted); font: 500 14px var(--body); }
.cx-link:hover { color: var(--text); }

/* reveal */
.cx-chosen { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.cx-chosen h2 { margin: 0; }
.cx-lede { margin: 10px 0 22px; color: var(--muted); font-size: 15px; }
.cx-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cx-col { border-radius: 16px; padding: 18px 20px; border: 1px solid var(--line); background: rgba(244,245,240,.03); }
.cx-col h4 { margin: 0 0 10px; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.cx-col.good h4 { color: var(--lime); } .cx-col.risk h4 { color: var(--lav); }
.cx-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.cx-col li { position: relative; padding-left: 18px; font-size: 15.5px; line-height: 1.45; color: var(--text); }
.cx-col li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; }
.cx-col.good li::before { background: var(--lime); } .cx-col.risk li::before { border: 1.5px solid var(--lav); }
.cx-h3 { margin: 28px 0 12px; font: 500 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.cx-factors { display: grid; gap: 6px; }
.cx-fhead, .cx-factor { display: grid; grid-template-columns: 1fr 150px 1fr; gap: 10px; align-items: center; }
.cx-fhead { grid-template-columns: 1fr 1fr; font: 500 11px var(--mono); letter-spacing: .06em; color: var(--subtle); margin-bottom: 4px; }
.cx-fhead span:last-child { text-align: right; }
.cx-fhead span.on { color: var(--lime); }
.cx-factor { padding: 10px 12px; border-radius: 12px; background: rgba(244,245,240,.03); border: 1px solid rgba(244,245,240,.06); }
.cx-fname { position: relative; text-align: center; font: 600 13px var(--display); color: var(--text); padding: 4px 0; }
.cx-fname::before { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 1px; background: linear-gradient(90deg, rgba(199,255,53,.0), rgba(244,245,240,.18), rgba(199,255,53,.0)); z-index: -1; }
.cx-fa, .cx-fb { font-size: 14px; line-height: 1.4; color: var(--subtle); }
.cx-fb { text-align: right; }
.cx-fa.on, .cx-fb.on { color: var(--text); }
.cx-neutral { margin: 16px 0 0; font-size: 14.5px; color: var(--muted); }
.cx-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.cx-btn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font: 600 15px var(--body); color: var(--text); transition: background .2s, border-color .2s; }
.cx-btn:hover { border-color: rgba(244,245,240,.32); }
.cx-btn.primary { background: var(--lime); border-color: var(--lime); color: #0B0C08; }
.cx-btn.primary:hover { background: #d6ff6e; }
.cx-btn .cx-arrow { font-style: normal; }
.cx-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.cx-btn.block { width: 100%; justify-content: center; }

/* takeaway */
.cx-insight { margin: 18px 0 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--lime); font: 600 clamp(21px, 2.3vw, 27px)/1.32 var(--display); letter-spacing: -.02em; color: var(--text); }
.cx-qs { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.cx-qs li { font-size: 16.5px; line-height: 1.5; color: var(--text); padding-left: 4px; }
.cx-qs li::marker { color: var(--lime); font: 600 14px var(--mono); }
.cx-share { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding: 16px 18px; border-radius: 16px; background: rgba(199,255,53,.06); border: 1px solid rgba(199,255,53,.22); }
.cx-share span { font-size: 14.5px; color: var(--muted); }
.cx-next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cx-nextcard { position: relative; display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 16px 16px 40px; border-radius: 16px; border: 1px solid rgba(178,140,255,.28); background: rgba(127,58,237,.07); transition: border-color .2s; }
.cx-nextcard:hover { border-color: rgba(178,140,255,.7); }
.cx-nextcard.map { border-color: var(--line); background: rgba(244,245,240,.03); }
.cx-nextcard b { font: 600 15.5px/1.3 var(--display); color: var(--text); }
.cx-nextcard .cx-tag { color: var(--lav); font-size: 10.5px; }
.cx-nextcard.map .cx-tag { color: var(--subtle); }
.cx-nextcard .cx-arrow { position: absolute; left: 16px; bottom: 12px; font-style: normal; color: var(--muted); }
.cx-leadersim { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.cx-leadersim p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--subtle); max-width: 560px; }
.cx-leadersim p b { color: var(--muted); font-weight: 600; }
.cx-leadersim a { flex: none; color: var(--lav); text-decoration: none; font: 600 14.5px var(--body); border-bottom: 1px solid rgba(178,140,255,.4); padding-bottom: 2px; }
.cx-leadersim a:hover { color: #d2bcff; border-color: var(--lav); }
.cx-leadersim a .cx-arrow { font-style: normal; }

/* rail: the challenge stays with the visitor inside the live map */
#cxRail { position: fixed; left: 28px; bottom: 86px; z-index: 12; width: 360px; padding: 16px; border-radius: 20px; background: rgba(14,15,17,.9); border: 1px solid rgba(199,255,53,.3); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: cxrise .5s var(--ease) both; }
#cxRail[hidden] { display: none; }
.cx-rail-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lime); }
.cx-x { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 15px; display: grid; place-items: center; }
.cx-x:hover { color: var(--text); }
.cx-rail-choice { display: flex; align-items: center; gap: 10px; margin: 10px 0 12px; }
.cx-rail-choice .cx-letter { width: 28px; height: 28px; font-size: 12px; }
.cx-rail-choice b { font: 600 16px/1.25 var(--display); letter-spacing: -.01em; }
.cx-steps { display: grid; gap: 6px; margin-bottom: 12px; }
.cx-step { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px; border-radius: 12px; border: 1px solid transparent; background: rgba(244,245,240,.03); transition: border-color .2s, background .2s; }
.cx-step:hover { background: rgba(244,245,240,.06); }
.cx-step.on { border-color: rgba(199,255,53,.45); background: rgba(199,255,53,.07); }
.cx-step .n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--mono); color: var(--subtle); border: 1px solid var(--line); }
.cx-step.on .n { color: #0B0C08; background: var(--lime); border-color: var(--lime); }
.cx-step b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.cx-step small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
body.cx-railing .legend, body.cx-railing .hero { opacity: 0; pointer-events: none; }
body.cx-railing #cxRail { bottom: 26px; }

/* header entry */
#cxBtn .cx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lav); box-shadow: 0 0 10px rgba(178,140,255,.8); }

@media (max-width: 760px) {
  #cx.landing { background: linear-gradient(180deg, rgba(8,9,10,.35) 0%, rgba(8,9,10,.9) 34%, rgba(8,9,10,.97) 100%); }
  .cx-screen { padding: 76px 16px 28px; align-items: flex-start; }
  .cx-landing { align-items: flex-end; padding-top: 30vh; }
  .cx-landing h1 { font-size: 33px; }
  .cx-sub { font-size: 16px; margin-bottom: 20px; }
  .cx-entry { padding: 16px 46px 16px 16px; }
  .cx-entry b { font-size: 18px; }
  .cx-card { padding: 22px 18px 20px; border-radius: 20px; }
  .cx-story { font-size: 16px; }
  .cx-options, .cx-cols, .cx-next { grid-template-columns: 1fr; }
  .cx-factor { grid-template-columns: 1fr; gap: 3px; text-align: left; }
  .cx-factor .cx-fb { text-align: left; }
  .cx-fname { text-align: left; }
  .cx-fname::before { display: none; }
  .cx-fa::before { content: "A: "; font: 600 12px var(--mono); color: var(--subtle); }
  .cx-fb::before { content: "B: "; font: 600 12px var(--mono); color: var(--subtle); }
  .cx-fhead { display: none; }
  .cx-leadersim { flex-direction: column; align-items: flex-start; }
  #cxRail { left: 10px; right: 10px; top: 64px; bottom: auto; width: auto; padding: 10px 12px; }
  body.cx-railing #cxRail { bottom: auto; }
  #cxRail .cx-rail-choice { margin: 6px 0 8px; }
  #cxRail .cx-steps { grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 8px; }
  #cxRail .cx-step { padding: 7px; }
  #cxRail .cx-step small { display: none; }
  #cxRail .cx-step b { font-size: 11.5px; line-height: 1.25; }
  #cxRail .cx-btn { height: 38px; font-size: 14px; }
}

/* the header stays above the challenge layer; only the logo is active there */
body.cx-on .top { z-index: 40; }
body.cx-on .top .tools { opacity: 0; pointer-events: none; transition: opacity .3s; }
@media (max-width: 760px) {
  /* compact one-row rail on phones so the network keeps its space */
  #cxRail:not([hidden]) { display: flex; align-items: center; gap: 6px; padding: 7px; }
  #cxRail .cx-rail-head { order: 3; }
  #cxRail .cx-rail-head span, #cxRail .cx-rail-choice { display: none; }
  #cxRail .cx-steps { flex: 1; margin: 0; }
  #cxRail .cx-step { align-items: center; padding: 6px; gap: 6px; }
  #cxRail .cx-step b { font-size: 11px; }
  #cxRail .cx-btn.block { width: auto; height: 36px; padding: 0 11px; font-size: 12.5px; gap: 4px; }
}

/* header stays readable over scrolling challenge cards */
body.cx-on .top { background: linear-gradient(180deg, rgba(8,9,10,.96) 55%, rgba(8,9,10,0)); }
