/* Story layout and diagrams for /fde. Builds on /work/case-study.css. */
:root {
  --violet: #051A24;
  --violet-soft: rgba(5, 26, 36, .06);
  --red-soft: rgba(180, 35, 24, .07);
  --green-soft: rgba(6, 118, 71, .08);
  --amber-soft: rgba(181, 71, 8, .08);
}

/* Story map under the hero */
.story-map { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 36px auto 0; padding: 0; list-style: none; }
.story-map a { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; background: #fff; color: var(--muted); font-size: 13px; text-decoration: none; }
.story-map a:hover { color: var(--ink); border-color: rgba(5, 26, 36, .25); }
.story-map b { color: var(--faint); font-family: var(--mono); font-size: 11px; font-weight: 500; }

/* One scene = one idea */
.scene { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--soft); }
.scene-head { max-width: 720px; }
.scene-head.center { margin: 0 auto; text-align: center; }
.step { display: block; margin-bottom: 16px; color: rgba(5, 26, 36, .4); font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.scene h2 { margin-bottom: 20px; color: var(--head); font-family: var(--display); font-size: clamp(36px, 5vw, 48px); font-weight: 400; line-height: 1.1; letter-spacing: -.02em; }
.scene-head p { color: var(--muted); font-size: 18px; line-height: 1.6; }
.scene-head p:last-child { margin-bottom: 0; }

.stage { margin-top: clamp(32px, 5vw, 56px); border: 1px solid rgba(5, 26, 36, .1); border-radius: 24px; padding: clamp(20px, 4vw, 40px); background: transparent; }
.caption { margin: 16px 0 0; color: var(--faint); font-size: 13px; }
.say { max-width: 680px; margin: 28px 0 0; color: var(--muted); font-size: 17px; }
.say strong { color: var(--ink); }

/* Scene 1: paper vs real */
.compare-row + .compare-row { margin-top: 28px; padding-top: 28px; border-top: 1px dashed var(--line); }
.compare-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.compare-top span:first-child { color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.big { font-family: var(--display); font-size: clamp(34px, 5vw, 52px); font-weight: 600; line-height: 1; letter-spacing: -.03em; color: var(--ink); }
.big.red { color: var(--red); }
.chain { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.chain li { display: flex; align-items: center; color: var(--ink); font-size: 14px; font-weight: 500; }
.chain li span { border: 1px solid var(--line); border-radius: 12px; padding: 9px 13px; background: #fff; }
.chain li span::before { counter-increment: step; content: counter(step); margin-right: 8px; color: var(--faint); font-family: var(--mono); font-size: 11px; }
.chain li.extra span::before { color: rgba(180, 35, 24, .6); }
.chain li.extra span { border-color: rgba(180, 35, 24, .35); background: var(--red-soft); color: var(--red); }

/* Scene 2: three sources into one map */
.sources { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; gap: 0; }
.source-list { display: grid; gap: 14px; }
.source { display: flex; gap: 14px; align-items: flex-start; }
.icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.icon svg { width: 22px; height: 22px; }
.source h3, .gulf h3, .stair h3 { margin: 0 0 2px; color: var(--ink); font-size: 16px; font-weight: 600; }
.source p, .gulf p { margin: 0; font-size: 14px; color: var(--muted); }
.source em { font-style: normal; color: var(--violet); font-weight: 600; }
.joiner { height: 100%; min-height: 220px; }
.map-card { border-radius: 20px; padding: 24px; background: var(--ink); color: #fff; box-shadow: 0 20px 40px -20px rgba(5, 26, 36, .5); }
.map-card .step { color: rgba(255, 255, 255, .5); margin-bottom: 12px; }
.map-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; }
.map-row:first-of-type { border-top: 0; }
.map-row span:not(:first-child) { color: rgba(255, 255, 255, .55); font-family: var(--mono); font-size: 12px; }
.map-row.hot span:nth-child(3) { color: #fda29b; }

/* Scene 3: sort into four buckets */
.buckets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bucket { border-radius: 20px; padding: 18px; background: #fff; border: 1px solid var(--line); }
.bucket h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 4px; font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--ink); }
.bucket h3 b { font-size: 28px; font-weight: 600; }
.bucket > p { margin: 0 0 14px; font-size: 13px; color: var(--muted); min-height: 40px; }
.bucket ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bucket li { border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 500; color: var(--ink); background: var(--soft); }
.bucket.del { border-top: 4px solid var(--red); } .bucket.del li { background: var(--red-soft); text-decoration: line-through; text-decoration-color: rgba(180, 35, 24, .5); }
.bucket.code { border-top: 4px solid #8a99a3; }
.bucket.agent { border-top: 4px solid var(--violet); } .bucket.agent li { background: var(--violet-soft); }
.bucket.person { border-top: 4px solid var(--ink); } .bucket.person li { background: var(--ink); color: #fff; }
.stack { display: flex; height: 14px; margin-top: 28px; border-radius: 999px; overflow: hidden; }
.stack span { display: block; }
.stack-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.stack-legend strong { color: var(--ink); }

/* Scene 4: mock screen */
.mock { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 30px 60px -30px rgba(5, 26, 36, .35); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafafa; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e3e6e8; }
.mock-bar span { margin-left: 10px; color: var(--faint); font-size: 12px; }
.mock-body { display: grid; grid-template-columns: 1.1fr 1fr; }
.queue { padding: 14px; border-right: 1px solid var(--line); }
.queue-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; font-size: 13px; }
.queue-row small { display: block; color: var(--faint); font-size: 12px; }
.queue-row.active { background: var(--violet-soft); outline: 1px solid rgba(5, 26, 36, .2); }
.badge { border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.ready { background: var(--green-soft); color: var(--green); }
.badge.wait { background: var(--amber-soft); color: var(--amber); }
.badge.new { background: var(--soft); color: var(--muted); }
.agent-pane { padding: 22px; }
.agent-pane .step { color: var(--violet); margin-bottom: 10px; }
.agent-pane h3 { margin: 0 0 14px; font-size: 17px; font-weight: 600; color: var(--ink); }
.checks { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.checks li::before { content: "✓"; margin-right: 8px; color: var(--green); font-weight: 700; }
.checks li.miss::before { content: "!"; color: var(--amber); }
.draft { border-radius: 12px; padding: 12px 14px; background: var(--soft); font-size: 13px; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.actions span { border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 600; }
.actions .you { background: var(--ink); color: #fff; }
.actions .alt { border: 1px solid var(--line); color: var(--ink); }
.split-legend { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.split-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 3px; background: var(--violet); }
.split-legend span.you::before { background: var(--ink); }

/* Scene 5: waiting timeline */
.timeline { display: flex; align-items: stretch; height: 64px; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.timeline .work { flex: 0 0 8px; background: var(--ink); }
.timeline .wait { display: flex; align-items: center; justify-content: center; padding: 0 10px; background: repeating-linear-gradient(135deg, var(--red-soft) 0 8px, transparent 8px 16px); color: var(--red); font-size: 12px; font-weight: 600; text-align: center; line-height: 1.3; }
.timeline-scale { display: flex; justify-content: space-between; margin-top: 8px; color: var(--faint); font-family: var(--mono); font-size: 11px; }
.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.totals p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* Scene 6: worked example */
.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; }
.reports { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reports span { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; font-size: 13px; font-weight: 500; text-align: center; }
.arrow { color: var(--faint); font-size: 22px; text-align: center; }
.tool { border-radius: 18px; padding: 20px; background: var(--violet); color: #fff; text-align: center; font-weight: 600; }
.tool small { display: block; margin-top: 4px; font-weight: 400; color: rgba(255, 255, 255, .75); font-size: 12px; }
.listcard { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; font-size: 13px; }
.listcard b { display: block; margin-bottom: 8px; color: var(--ink); }
.listcard div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--soft); color: var(--muted); }
.quote { margin: 0; padding: clamp(24px, 4vw, 40px); border-radius: 24px; background: var(--ink); color: #fff; }
.quote p { margin: 0; font-family: var(--display); font-size: clamp(20px, 3vw, 28px); font-weight: 500; line-height: 1.35; letter-spacing: -.01em; color: #fff; }
.quote footer { margin-top: 16px; color: rgba(255, 255, 255, .6); font-size: 14px; }
.lights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.light { border-radius: 20px; padding: 18px; background: #fff; border: 1px solid var(--line); }
.light h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
.light h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.light.l-go h3::before { background: var(--green); } .light.l-ask h3::before { background: var(--amber); } .light.l-stop h3::before { background: var(--red); }
.light ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.light li { border-radius: 10px; padding: 8px 10px; font-size: 13px; color: var(--ink); }
.light.l-go li { background: var(--green-soft); } .light.l-ask li { background: var(--amber-soft); } .light.l-stop li { background: var(--red-soft); }
.bars { display: grid; gap: 18px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 72px; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.bar-track { display: flex; height: 28px; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.bar-track .ok { background: var(--green); }
.bar-track .bad { background: repeating-linear-gradient(135deg, var(--red) 0 6px, #d4574b 6px 12px); }
.bar-row strong { color: var(--ink); font-family: var(--display); font-size: 22px; text-align: right; }
.bar-row strong.red { color: var(--red); }
.proof { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 28px; }
.proof h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
.proof ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; }
.proof li::before { content: "✓"; display: inline-block; width: 22px; color: var(--green); font-weight: 700; }
.proof .open li::before { content: "○"; color: var(--faint); }
.sub-step { margin: clamp(40px, 6vw, 64px) 0 14px; color: var(--ink); font-family: var(--display); font-size: 22px; font-weight: 500; }
.sub-step span { color: var(--faint); font-family: var(--mono); font-size: 12px; margin-right: 10px; }

/* Scene 7: staircase */
.stairs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: start; }
.stair .riser { display: flex; align-items: flex-end; height: 185px; margin-bottom: 14px; }
.stair .block { width: 100%; border-radius: 14px 14px 4px 4px; background: var(--violet); }
.stair:nth-child(1) .block { height: 50px; opacity: .45; }
.stair:nth-child(2) .block { height: 95px; opacity: .6; }
.stair:nth-child(3) .block { height: 140px; opacity: .78; }
.stair:nth-child(4) .block { height: 185px; }
.stair.never .block { height: 185px; background: repeating-linear-gradient(135deg, var(--red-soft) 0 10px, transparent 10px 20px); border: 2px dashed rgba(180, 35, 24, .45); }
.stair p { margin: 0; font-size: 13px; color: var(--muted); }
.stair .up { margin-top: 8px; color: var(--faint); font-size: 12px; }
.stair.never h3 { color: var(--red); }

/* Scene 8: Gulf */
.gulf-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.gulf .icon { margin-bottom: 14px; width: 52px; height: 52px; background: var(--ink); color: #fff; border: 0; }
.gulf .icon b { font-family: var(--display); font-size: 17px; }

/* Scene 9: three skills */
.venn { display: block; width: 100%; max-width: 620px; height: auto; margin: 0 auto; }
.venn text { font-family: var(--body); }

/* Closing call */
.closing { padding: clamp(64px, 10vw, 112px) 0; text-align: center; background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, .05) 0%, transparent 60%); border-top: 1px solid var(--soft); }
.closing h2 { max-width: 760px; margin: 0 auto 16px; color: var(--ink); font-family: var(--display); font-size: clamp(30px, 4.8vw, 48px); font-weight: 500; line-height: 1.1; letter-spacing: -.02em; }
.closing p { max-width: 560px; margin: 0 auto 28px; color: var(--muted); font-size: 18px; }

/* Dark band, same as the homepage "Why AI Agents?" section */
.scene.dark { background: var(--ink); border-top: 0; color: #fff; }
.scene.dark h2 { color: #fff; }
.scene.dark .step { color: rgba(255, 255, 255, .4); }
.scene.dark .scene-head p { color: rgba(255, 255, 255, .6); }
.dark-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 96px); align-items: center; }
.dark-list { display: grid; gap: 40px; }
.dark-list div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: baseline; }
.dark-list .big { color: #fff; }
.dark-list .big.red { color: #fda29b; }
.dark-list p { margin: 0; color: rgba(255, 255, 255, .5); font-size: 15px; }
.scene.dark .timeline { margin-top: clamp(40px, 6vw, 64px); background: transparent; border-color: rgba(255, 255, 255, .15); }
.scene.dark .timeline .work { background: #fff; }
.scene.dark .timeline .wait { color: #fda29b; background: repeating-linear-gradient(135deg, rgba(253, 162, 155, .12) 0 8px, transparent 8px 16px); }
.scene.dark .timeline-scale, .scene.dark .caption { color: rgba(255, 255, 255, .4); }

@media (max-width: 900px) {
  .dark-grid { grid-template-columns: 1fr; }
  .dark-list div { grid-template-columns: 140px 1fr; }
  .sources { grid-template-columns: 1fr; gap: 24px; }
  .joiner { display: none; }
  .buckets, .gulf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline .arrow { transform: rotate(90deg); }
  .mock-body { grid-template-columns: 1fr; }
  .queue { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .buckets, .gulf-row, .lights, .totals, .proof { grid-template-columns: 1fr; }
  .bucket > p { min-height: 0; }
  .bar-row { grid-template-columns: 1fr 60px; }
  .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .stairs { grid-template-columns: 1fr; align-items: stretch; }
  .stair { display: grid; grid-template-columns: 90px 1fr; gap: 0 14px; align-items: center; }
  .stair .riser { grid-row: span 3; height: 56px; margin: 0; }
  .stair .block { height: 100% !important; border-radius: 10px; }
  .stair:nth-child(1) .block { width: 30%; } .stair:nth-child(2) .block { width: 50%; } .stair:nth-child(3) .block { width: 75%; }
  .timeline .wait { font-size: 11px; padding: 0 4px; }
  .scene-head p { font-size: 16px; }
}

/* Step 3: tools you already use */
.tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.tools span { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 18px 26px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 600; }
.tools span::after { content: "AI"; position: absolute; top: -10px; right: -10px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--violet); color: #fff; font-size: 11px; font-weight: 700; box-shadow: 0 6px 14px -4px rgba(5, 26, 36, .35); }
.tools-ai { margin: 26px 0 0; text-align: center; color: var(--muted); font-size: 16px; }
.tools-ai b { display: inline-block; margin-right: 6px; border-radius: 999px; padding: 2px 10px; background: var(--violet); color: #fff; font-size: 12px; }

/* Step 4: review buttons */
.review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px dashed var(--line); }
.review p { margin: 0; color: var(--ink); font-size: 16px; font-weight: 500; }
.review-buttons { display: flex; gap: 10px; }
.review-buttons span { border-radius: 999px; padding: 10px 20px; font-size: 14px; font-weight: 600; }
.r-ok { background: var(--green); color: #fff; }
.r-edit { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.r-no { background: var(--red-soft); color: var(--red); }

/* Slides: one sentence and one picture per screen */
.slide { display: flex; align-items: center; min-height: 72vh; padding: 72px 0; text-align: center; border-top: 1px solid var(--soft); }
.slide .shell { display: flex; flex-direction: column; align-items: center; }
.slide h1, .slide h2 { max-width: 960px; margin: 0 auto; color: var(--head); font-family: var(--display); font-size: clamp(40px, 7.5vw, 84px); font-weight: 400; line-height: 1.05; letter-spacing: -.03em; }
.slide h1 em, .slide h2 em { font-style: normal; color: var(--violet); }
.gains { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 32px 0 0; padding: 0; list-style: none; }
.gains li { color: var(--ink); font-size: 16px; font-weight: 500; }
.gains li::before { content: "✓"; margin-right: 8px; color: var(--green); font-weight: 700; }
.hero-slide .links { margin-top: 36px; }
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; max-width: 820px; margin-top: 48px; }
.vs-card { border: 1px solid var(--line); border-radius: 24px; padding: 32px 24px; background: #fff; }
.vs-card.agent { background: var(--ink); border-color: var(--ink); }
.vs-tag { display: inline-block; border-radius: 999px; padding: 4px 14px; background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 600; }
.vs-card.agent .vs-tag { background: var(--violet); color: #fff; }
.vs-line { margin: 18px 0 10px; color: var(--ink); font-family: var(--display); font-size: clamp(22px, 3vw, 28px); line-height: 1.25; }
.vs-card.agent .vs-line { color: #fff; }
.vs-eg { margin: 0; color: var(--faint); font-size: 15px; font-style: italic; }
.vs-card.agent .vs-eg { color: rgba(255, 255, 255, .55); }
.day { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; max-width: 860px; margin-top: 48px; text-align: left; }
.day-col { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 24px; padding: 28px; background: #fff; }
.day-col.after { border-color: rgba(5, 26, 36, .25); background: var(--violet-soft); }
.day-tag { color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.day-col.after .day-tag { color: var(--violet); }
.day ol { flex: 1; margin: 18px 0 22px; padding-left: 22px; }
.day li { margin-bottom: 10px; color: var(--muted); font-size: 16px; }
.day li b { color: var(--ink); font-weight: 500; }
.day-time { font-family: var(--display); font-size: clamp(28px, 4vw, 40px); font-weight: 600; color: var(--violet); }
.day-time.red { color: var(--red); }
.job { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 40px 0 0; padding: 0; list-style: none; }
.job li { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 14px 24px 14px 14px; background: #fff; color: var(--ink); font-size: 18px; font-weight: 500; }
.job li span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; }
.built { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: 100%; margin-top: 48px; text-align: left; }
.built-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: #fff; text-decoration: none; transition: transform .3s ease, box-shadow .3s ease; }
.built-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(5, 26, 36, .3); }
.built-card img { width: 100%; height: 190px; object-fit: cover; object-position: top; background: var(--soft); border-bottom: 1px solid var(--line); }
.built-card h3 { margin: 20px 22px 8px; color: var(--ink); font-family: var(--display); font-size: 20px; font-weight: 600; }
.built-card p { flex: 1; margin: 0 22px; color: var(--muted); font-size: 15px; }
.built-card span { margin: 16px 22px 22px; color: var(--violet); font-size: 14px; font-weight: 600; }
.equation { display: grid; gap: 16px; margin-top: 48px; }
.eq-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.eq-row span { border-radius: 16px; padding: 14px 22px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 18px; font-weight: 600; }
.eq-row b { color: var(--faint); font-size: 24px; font-weight: 400; }
.eq-row span.ai { background: var(--violet); border-color: var(--violet); color: #fff; }
.eq-row.bad span:first-child { background: var(--red-soft); color: var(--red); border-color: transparent; }
.eq-row.bad .out { background: var(--red); color: #fff; border-color: var(--red); }
.eq-row.good span:first-child { background: var(--green-soft); color: var(--green); border-color: transparent; }
.eq-row.good .out { background: var(--green); color: #fff; border-color: var(--green); }
.life { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(24px, 6vw, 72px); margin-top: 48px; }
.life .big { font-size: clamp(56px, 9vw, 104px); }
.life p { margin: 6px 0 0; color: var(--muted); font-size: 17px; }
.three-places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; width: 100%; max-width: 920px; margin-top: 48px; }
.three-places .icon { margin: 0 auto 16px; width: 56px; height: 56px; background: var(--ink); color: #fff; border: 0; }
.three-places .icon svg { width: 26px; height: 26px; }
.three-places h3 { margin: 0 0 6px; color: var(--ink); font-size: 20px; font-weight: 600; }
.three-places p { margin: 0; color: var(--muted); font-size: 16px; }
.loopmap { position: relative; }
.loopmap .chain { justify-content: center; }
.loop-note { margin: 18px 0 0; color: var(--red); font-size: 17px; font-weight: 600; }
.rules4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 960px; margin-top: 48px; text-align: left; }
.rules4 > div { display: flex; flex-direction: column; border-radius: 22px; padding: 22px; }
.rules4 b { font-size: 18px; }
.rules4 p { margin: 10px 0 14px; font-size: 16px; }
.rules4 small { margin-top: auto; border-radius: 10px; padding: 6px 10px; background: rgba(255, 255, 255, .6); font-size: 13px; }
.rules4 .s-del b, .rules4 .s-del p { color: var(--red); }
.rules4 .s-rule b, .rules4 .s-rule p { color: var(--ink); }
.rules4 .s-ai b, .rules4 .s-ai p { color: var(--violet); }
.rules4 .s-you b, .rules4 .s-you p { color: #fff; }
.rules4 .s-you small { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .8); }
.score { width: 100%; max-width: 640px; margin-top: 44px; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: #fff; }
.score-head, .score-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; align-items: center; padding: 16px 24px; text-align: left; }
.score-head { background: var(--soft); color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.score-row { border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; }
.score-row b { color: var(--green); font-family: var(--display); font-size: 26px; font-weight: 600; }
.score-row b.red { color: var(--red); }
.week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 1000px; margin-top: 48px; text-align: left; }
.week > div { border: 1px solid var(--line); border-radius: 20px; padding: 20px; background: #fff; }
.week b { display: block; margin-bottom: 10px; color: rgba(5, 26, 36, .45); font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.week p { margin: 0; color: var(--ink); font-size: 15px; }
@media (max-width: 900px) { .rules4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .week { grid-template-columns: 1fr; max-width: 480px; } .three-places { grid-template-columns: 1fr; max-width: 420px; } }
@media (max-width: 900px) { .built { grid-template-columns: 1fr; max-width: 480px; } }
@media (max-width: 640px) { .versus, .day { grid-template-columns: 1fr; } }
.slide-sub { margin: 28px 0 0; color: var(--muted); font-size: clamp(18px, 2.4vw, 24px); }
.slide .stage.plain { width: 100%; max-width: 820px; margin-top: 56px; border: 0; padding: 0; }
.hero-slide { position: relative; overflow: hidden; border-top: 0; background: radial-gradient(circle at 10% 20%, rgba(124, 58, 237, .04) 0%, transparent 50%); }
.hero-slide > .shell { position: relative; z-index: 1; }
.slide.dark { background: var(--ink); border-top: 0; }
.slide.dark h2 { color: #fff; }
.slide.dark .slide-sub, .slide.dark .jump p { color: rgba(255, 255, 255, .55); }
.slide.dark .big { color: #fff; } .slide.dark .big.red { color: #fda29b; }
.jump { display: flex; align-items: center; justify-content: center; gap: clamp(28px, 7vw, 88px); margin-top: 56px; }
.jump .big { font-size: clamp(52px, 12vw, 140px); white-space: nowrap; }
.jump p { margin: 8px 0 0; color: var(--muted); font-size: 18px; }
.jump-arrow { color: var(--faint); font-size: clamp(36px, 6vw, 64px); }
.sort4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 900px; margin-top: 56px; }
.sort4 > div { border-radius: 24px; padding: 32px 12px; }
.sort4 .big { font-size: clamp(48px, 7vw, 72px); }
.sort4 p { margin: 8px 0 0; font-size: 18px; font-weight: 600; }
.s-del { background: var(--red-soft); } .s-del .big, .s-del p { color: var(--red); }
.s-rule { background: var(--soft); } .s-rule p { color: var(--ink); }
.s-ai { background: var(--violet-soft); } .s-ai .big, .s-ai p { color: var(--violet); }
.s-you { background: var(--ink); } .s-you .big, .s-you p { color: #fff; }
.big-buttons { justify-content: center; margin-top: 56px; gap: 16px; }
.big-buttons span { padding: 18px 36px; font-size: 20px; }
.slide .stairs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slide .stair h3 { font-size: 20px; }
@media (max-width: 640px) {
  .slide { min-height: 0; padding: 88px 0; }
  .sort4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide .stairs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .slide .stair { display: flex; flex-direction: column; align-items: stretch; }
  .slide .stair .riser { height: 120px; margin-bottom: 10px; }
  .slide .stair .block { width: 100% !important; height: auto !important; }
  .slide .stair:nth-child(1) .block { height: 30px !important; } .slide .stair:nth-child(2) .block { height: 60px !important; }
  .slide .stair:nth-child(3) .block { height: 90px !important; } .slide .stair:nth-child(4) .block { height: 120px !important; }
  .slide .stair h3 { font-size: 14px; }
  .big-buttons span { padding: 14px 22px; font-size: 16px; }
}

/* Motion (only when story.js runs and the visitor allows motion) */
.hero { position: relative; overflow: hidden; }
.hero > .shell { position: relative; z-index: 1; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .07; filter: invert(1); mix-blend-mode: multiply; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 60%, #fff); pointer-events: none; }
@media (max-width: 767px) { .hero-video { display: none; } }

.motion .fade { opacity: 0; transform: translateY(20px); transition: opacity .8s cubic-bezier(.21, .47, .32, .98), transform .8s cubic-bezier(.21, .47, .32, .98); }
.motion .fade.in { opacity: 1; transform: none; }

/* Bars, stack and timeline grow from the left */
.motion .bar-track span, .motion .stack span, .motion .timeline > span { transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.21, .47, .32, .98); }
.motion .bars.in .bar-track span, .motion .stage.in .stack span, .motion .scene.dark.in .timeline > span { transform: none; }
.motion .bar-row:nth-child(2) .bar-track span { transition-delay: .3s; }
.motion .stack span:nth-child(2), .motion .timeline > span:nth-child(2) { transition-delay: .15s; }
.motion .stack span:nth-child(3), .motion .timeline > span:nth-child(3) { transition-delay: .3s; }
.motion .stack span:nth-child(4), .motion .timeline > span:nth-child(4) { transition-delay: .45s; }
.motion .timeline > span:nth-child(n+5) { transition-delay: .6s; }

/* Staircase rises */
.motion .stair .block { transform: scaleY(0); transform-origin: bottom; transition: transform 1s cubic-bezier(.21, .47, .32, .98); }
.motion .stage.in .stair .block { transform: none; }
.motion .stair:nth-child(2) .block { transition-delay: .15s; }
.motion .stair:nth-child(3) .block { transition-delay: .3s; }
.motion .stair:nth-child(4) .block { transition-delay: .45s; }
.motion .stair:nth-child(5) .block { transition-delay: .6s; }

/* Hidden steps pulse once when they appear */
@keyframes flag { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0); } 50% { box-shadow: 0 0 0 6px rgba(180, 35, 24, .12); } }
.motion .chain li.extra.in span { animation: flag 1.4s ease .6s 1; }

/* Venn circles draw in, then the centre appears */
.motion .venn circle:not(:last-of-type) { stroke-dasharray: 850; stroke-dashoffset: 850; fill-opacity: 0; transition: stroke-dashoffset 1.6s ease, fill-opacity 1s ease 1s; }
.motion .venn.in circle:not(:last-of-type) { stroke-dashoffset: 0; fill-opacity: 1; }
.motion .venn circle:last-of-type, .motion .venn text { opacity: 0; transition: opacity .8s ease 1.4s; }
.motion .venn.in circle:last-of-type, .motion .venn.in text { opacity: 1; }

/* Agent panel: the agent "types" its checks */
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
.motion .tools span::after { transform: scale(0); }
.motion .stage.in .tools span::after { animation: pop .5s ease forwards; }
.motion .stage.in .tools span:nth-child(2)::after { animation-delay: .15s; }
.motion .stage.in .tools span:nth-child(3)::after { animation-delay: .3s; }
.motion .stage.in .tools span:nth-child(4)::after { animation-delay: .45s; }
.motion .stage.in .tools span:nth-child(5)::after { animation-delay: .6s; }
.motion .mock .checks li { opacity: 0; transition: opacity .4s ease; }
.motion .mock.in .checks li { opacity: 1; }
.motion .mock.in .checks li:nth-child(1) { transition-delay: .5s; }
.motion .mock.in .checks li:nth-child(2) { transition-delay: .9s; }
.motion .mock.in .checks li:nth-child(3) { transition-delay: 1.3s; }
.motion .mock.in .checks li:nth-child(4) { transition-delay: 1.7s; }
.motion .queue-row.active { animation: none; }
.motion .mock.in .queue-row.active { animation: flag 1.4s ease 2s 1; }

.week.four { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 880px; }
@media (max-width: 900px) { .week.four { grid-template-columns: 1fr; max-width: 480px; } }
