/* =========================================================
   Agents 101 — builds on style.css, adlc.css (role colours) and adlc-phase.css (scene, beats,
   caption, panel, pill, checks). Maya = --pm, agent = --agent, systems = --gate,
   specialist = --human, failure/stall = --fail.
   ========================================================= */

.ic { width: 18px; height: 18px; flex: none; color: var(--role, currentColor); }
.ic-lg { width: 44px; height: 44px; flex: none; color: var(--role, currentColor); }
.muted { color: var(--text-muted); }
.money { font-family: var(--font-mono); color: var(--fail); }

/* ---------- Hero ---------- */

.a1-hero { padding-bottom: 12px; }

.story-card {
  display: flex;
  gap: 14px;
  align-items: center;
  max-width: 640px;
  margin: 0 0 22px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--pm) 35%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--pm) 8%, var(--bg-elevated));
  font-size: 15.5px;
  line-height: 1.5;
}

.story-card .muted { display: block; font-size: 12.5px; margin-top: 2px; }

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toc a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}

.toc a:hover { color: var(--accent-strong); border-color: var(--accent); }

.toc span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font: 600 12px var(--font-display);
}

/* ---------- Sections ---------- */

.a1-section { padding: 28px 0 20px; }
.a1-section:last-of-type { padding-bottom: 100px; }

.sec-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.sec-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
}

.sec-head p { margin: 4px 0 0; color: var(--text-muted); }

.sec-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font: 600 17px var(--font-display);
}


/* End cards */
.endcard {
  --c: var(--gate);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.endcard.bad { --c: var(--fail); }

.endcard > div {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--border));
  background: color-mix(in srgb, var(--c) 8%, var(--bg));
}

.endcard b {
  display: block;
  font: 700 26px/1.1 var(--font-display);
  color: var(--c);
}

.endcard span { font-size: 13px; color: var(--text-muted); }

/* ---------- Scene 1: phone tree ---------- */

.s1-stage {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

.phone {
  position: relative;
  width: 260px;
  margin: 0 auto;
  padding: 18px 16px 20px;
  border-radius: 38px;
  border: 8px solid var(--text);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.phone-notch {
  width: 80px;
  height: 18px;
  margin: -10px auto 10px;
  border-radius: 0 0 12px 12px;
  background: var(--text);
}

.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.battery {
  position: relative;
  width: 26px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.battery::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 2px;
  height: 4px;
  background: currentColor;
}

.battery i {
  position: absolute;
  inset: 1.5px;
  width: calc(var(--b, 0.12) * 100% - 3px);
  background: var(--gate);
  border-radius: 1px;
}

.battery.low { color: var(--fail); }
.battery.low i { background: var(--fail); }

.hold {
  position: relative;
  text-align: center;
  padding: 18px 0 8px;
}

.hold-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fail);
}

.hold-clock {
  display: block;
  font: 600 50px/1.1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.notes { position: absolute; inset: 0; pointer-events: none; }
.notes svg { position: absolute; width: 20px; height: 20px; color: var(--agent); opacity: 0.7; }
.notes .n1 { left: 6px; top: 20px; transform: rotate(-12deg); }
.notes .n2 { right: 10px; top: 40px; width: 16px; height: 16px; transform: rotate(10deg); }
.notes .n3 { right: 30px; top: 6px; width: 14px; height: 14px; opacity: 0.45; }

.ivr-bubble {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--code-bg);
  font-size: 12.5px;
  font-style: italic;
  color: var(--text-muted);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.keypad span {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 50%;
  aspect-ratio: 1;
  margin: 0 auto;
  background: var(--code-bg);
  font: 500 17px var(--font-sans);
}

.keypad .hit {
  background: color-mix(in srgb, var(--pm) 20%, var(--code-bg));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pm) 55%, transparent);
}

.ivr-path h3 { margin: 4px 0 10px; font-size: 15px; }

.ivr-steps {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
}

.ivr-steps li { position: relative; }

.ivr-steps li::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--text-muted);
}

.ivr-steps li.wrong { color: var(--fail); }
.ivr-steps li.wrong::before { border-color: var(--fail); }
.ivr-steps li.now { font-weight: 600; }
.ivr-steps li.now::before { border-color: var(--pm); background: var(--pm); }

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  margin-right: 2px;
  border-radius: 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  background: var(--bg-elevated);
  font: 600 12px var(--font-mono);
}

.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--pm);
}

.meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.meter-bar {
  flex: 1;
  height: 10px;
  border-radius: 99px;
  background: var(--code-bg);
  overflow: hidden;
}

.meter-bar i {
  display: block;
  height: 100%;
  width: calc(var(--v) * 100%);
  background: linear-gradient(90deg, var(--human), var(--fail));
}

/* ---------- Scene 2: chatbot ---------- */

.s2-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.a1-chat {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 13.5px;
  font-weight: 600;
}

.chat-head .pill { margin-left: auto; }

.msgs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.a1-msg {
  position: relative;
  max-width: 85%;
  margin: 0;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
}

.a1-msg.me {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: color-mix(in srgb, var(--pm) 16%, var(--bg-elevated));
}

.a1-msg.bot {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: var(--code-bg);
}

.a1-msg.deadend { margin-bottom: 18px; }

.a1-stamp {
  position: absolute;
  right: -10px;
  bottom: -20px;
  padding: 4px 10px;
  border: 2.5px solid var(--fail);
  border-radius: 6px;
  color: var(--fail);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  font: 700 13px var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-7deg);
}

.brain-svg { width: 100%; height: auto; }
.brain-svg .glass { fill: color-mix(in srgb, var(--agent) 5%, transparent); stroke: color-mix(in srgb, var(--agent) 45%, var(--border)); stroke-width: 2; }
.brain-svg .brain path { fill: color-mix(in srgb, var(--agent) 22%, var(--bg-elevated)); stroke: var(--agent); stroke-width: 2.4; stroke-linejoin: round; }
.brain-svg .brain .fold { fill: none; stroke-width: 2; stroke-linecap: round; }
.brain-svg .wire { fill: none; stroke-width: 2.5; }
.brain-svg .wire.live { stroke: var(--agent); }
.brain-svg .wire.dead { stroke: var(--fail); stroke-dasharray: 5 6; opacity: 0.7; }
.brain-svg .arrow { fill: none; stroke: var(--agent); stroke-width: 2.5; stroke-linejoin: round; }
.brain-svg text { font: 500 13px var(--font-sans); fill: var(--text-muted); }
.brain-svg .x { font-weight: 700; font-size: 18px; fill: var(--fail); }
.brain-svg .label { font: 600 13px var(--font-mono); fill: var(--agent); }
.brain-svg .nolink rect { fill: var(--bg); stroke: color-mix(in srgb, var(--fail) 40%, var(--border)); stroke-width: 1.5; }
.brain-svg .nolink text:not(.x) { fill: var(--text-muted); }

.brain-note { margin: 6px 0 0; font-size: 14px; color: var(--text-muted); text-align: center; }

/* ---------- Scene 3: agent ---------- */

.s3-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: center;
}

.plan-list { padding: 10px 14px 12px; }
.plan-list li.now { font-weight: 600; color: var(--agent); }

.constellation svg { width: 100%; height: auto; }
.constellation .spokes path { stroke: color-mix(in srgb, var(--agent) 35%, var(--border)); stroke-width: 2; stroke-dasharray: 4 6; }
.constellation .halo { fill: color-mix(in srgb, var(--agent) 10%, transparent); stroke: color-mix(in srgb, var(--agent) 30%, transparent); stroke-width: 1.5; }
.constellation .core { fill: var(--bg-elevated); stroke: var(--agent); stroke-width: 3; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--agent) 50%, transparent)); }
.constellation .agent-ic { color: var(--agent); }
.constellation .packets .out { fill: var(--agent); filter: drop-shadow(0 0 6px var(--agent)); }
.constellation .packets .back { fill: var(--gate); filter: drop-shadow(0 0 6px var(--gate)); }
.constellation .tool rect { fill: var(--bg-elevated); stroke: color-mix(in srgb, var(--gate) 45%, var(--border)); stroke-width: 1.5; }
.constellation .tool use { color: var(--gate); }
.constellation .tool text { font: 600 13px var(--font-sans); fill: var(--text); }
@media (max-width: 560px) { .constellation .tool text { font-size: 14px; } .constellation .tool rect { stroke-width: 2; } }
.constellation .tool.hot rect { stroke: var(--gate); stroke-width: 2.5; fill: color-mix(in srgb, var(--gate) 12%, var(--bg-elevated)); }

.tx { list-style: none; margin: 0; padding: 6px 0; font-size: 13px; }

.tx li {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
}

.tx li:last-child { border-bottom: 0; }
.tx li span:first-child { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.tx b { font-family: var(--font-mono); font-weight: 500; }

.tx li.dup {
  background: color-mix(in srgb, var(--fail) 10%, transparent);
  box-shadow: inset 3px 0 0 var(--fail);
}

.tx li.dup b { color: var(--fail); font-weight: 700; }

/* The agent's authority: a refund limit set by the bank. */
.limit { padding: 10px 14px 12px; border-top: 1px solid var(--border); }
.limit-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-muted); }
.limit-head b { font-family: var(--font-mono); color: var(--agent); }

.limit-bar {
  position: relative;
  height: 12px;
  margin: 8px 0 18px;
  border-radius: 99px;
  background: var(--code-bg);
}

.limit-bar .req,
.limit-bar .req-over {
  position: absolute;
  top: 0;
  bottom: 0;
}

.limit-bar .req {
  left: 0;
  width: 59.4%;
  border-radius: 99px 0 0 99px;
  background: color-mix(in srgb, var(--agent) 55%, transparent);
}

.limit-bar .req-over {
  left: 59.4%;
  width: 40.6%;
  border-radius: 0 99px 99px 0;
  background: var(--human);
}

.limit-bar .cap {
  position: absolute;
  left: 59.4%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--text);
  z-index: 1;
}

.cap-mark {
  position: absolute;
  left: 59.4%;
  top: 14px;
  transform: translateX(-50%);
  font: 600 11px var(--font-mono);
  color: var(--text);
}

.limit-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.limit-note b { font-family: var(--font-mono); color: var(--human); }
.case-packet li.warn svg { color: var(--human); }

.sub { margin: 26px 0 12px; font-size: 16px; }

.checkpoints {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cp {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--role) 30%, var(--border));
  border-top: 3px solid var(--role);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.cp-text { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.cp-text strong { display: block; color: var(--text); margin-bottom: 2px; }

.cp-tag {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--role);
}

.mini-phone {
  position: relative;
  align-self: center;
  width: 170px;
  padding: 14px 12px 12px;
  border: 5px solid var(--text);
  border-radius: 24px;
  background: var(--bg-elevated);
  text-align: center;
}

.mp-title { margin: 0; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.mp-q { margin: 6px 0 8px; font-size: 13px; line-height: 1.35; }

.finger {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--pm);
}

.finger svg { width: 34px; height: 34px; }

.finger i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--pm);
  opacity: 0.5;
}

.finger i + i { inset: -8px; opacity: 0.25; }

.mp-ok {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gate);
}

.mp-ok svg { width: 14px; height: 14px; }

.case-packet {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 13px;
}

.cpk-head { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font: 600 13px var(--font-mono); }
.cpk-head svg { width: 18px; height: 18px; color: var(--human); }
.case-packet ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.case-packet li { display: flex; align-items: center; gap: 6px; }
.case-packet li svg { width: 14px; height: 14px; color: var(--gate); flex: none; }

.btn-approve {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--human);
  color: var(--bg);
  font-weight: 600;
  font-size: 13px;
}

.notify {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--gate) 40%, var(--border));
  background: color-mix(in srgb, var(--gate) 8%, var(--bg-elevated));
  font-size: 13px;
  line-height: 1.45;
}

.notify p { margin: 0; }
.notify .bell { width: 22px; height: 22px; flex: none; color: var(--gate); }

/* ---------- Scene 4: race ---------- */

.race {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lane {
  display: grid;
  grid-template-columns: 110px 1fr 180px;
  gap: 14px;
  align-items: center;
}

.lane-name { font-weight: 600; font-size: 14.5px; }
.lane-state { font: 500 13px var(--font-mono); color: var(--role); }

.track {
  position: relative;
  height: 40px;
  border-radius: 99px;
  background: var(--code-bg);
  background-image: repeating-linear-gradient(90deg, transparent 0 46px, color-mix(in srgb, var(--text-muted) 18%, transparent) 46px 48px);
}

.track .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--p) * 100%);
  border-radius: 99px;
  background: color-mix(in srgb, var(--role) 22%, transparent);
}

.runner {
  position: absolute;
  top: 50%;
  left: calc(var(--p) * (100% - 38px));
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--role);
  color: var(--role);
  box-shadow: var(--shadow);
}

.runner svg { width: 22px; height: 22px; }

.finish {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gate);
}

.finish svg { width: 22px; height: 22px; }

.merge {
  position: absolute;
  left: calc(var(--p) * (100% - 38px) + 46px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--fail);
  white-space: nowrap;
}

/* ---------- Scene 5: anatomy ---------- */

.anatomy {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 20px;
  align-items: center;
}

.anat {
  text-align: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.anat h3 { margin: 0 0 6px; font-size: 16px; }
.anat p { margin: 6px 0 0; font-size: 14px; color: var(--text-muted); }
.anat svg { width: 100%; height: auto; max-height: 300px; }

.m-core { fill: color-mix(in srgb, var(--agent) 14%, var(--bg-elevated)); stroke: var(--agent); stroke-width: 2.5; }
.m-t { font: 600 18px var(--font-display); fill: var(--text); }
.m-s { font: 500 13px var(--font-sans); fill: var(--text-muted); }
.chatbot-anat svg { max-width: 220px; }

.agent-anat .loop { fill: none; stroke: color-mix(in srgb, var(--agent) 25%, var(--border)); stroke-width: 10; }
.agent-anat .loop-arrow { fill: none; stroke: var(--agent); stroke-width: 4; stroke-linecap: round; marker-end: none; }
.agent-anat .loop-t { font: 600 14px var(--font-mono); fill: var(--agent); }
.agent-anat .mod rect { fill: var(--bg-elevated); stroke: color-mix(in srgb, var(--agent) 45%, var(--border)); stroke-width: 1.5; }
.agent-anat .mod text { font: 600 13px var(--font-sans); fill: var(--text); }
.agent-anat .mod.tools rect { stroke: var(--gate); }
.agent-anat .mod.guard rect { stroke: var(--fail); }
.agent-anat .mod.human rect { stroke: var(--human); fill: color-mix(in srgb, var(--human) 10%, var(--bg-elevated)); }

.table-wrap { overflow-x: auto; margin-top: 20px; }

.vs {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.vs th,
.vs td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.vs thead th {
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vs thead th:nth-child(3) { color: var(--agent); }
.vs tbody th { font-weight: 600; white-space: nowrap; }
.vs td:nth-child(2) { color: var(--text-muted); }
.vs td:nth-child(3) { background: color-mix(in srgb, var(--agent) 6%, transparent); }

/* ---------- Section 6: risk dial ---------- */

.dial-scene {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: center;
}

.dial { width: 100%; max-width: 380px; display: block; margin: 0 auto; }
.dial .zone { fill: none; stroke-width: 26; stroke-linecap: butt; }
.dial .z1 { stroke: color-mix(in srgb, var(--agent) 55%, transparent); }
.dial .z2 { stroke: color-mix(in srgb, var(--pm) 60%, transparent); }
.dial .z3 { stroke: color-mix(in srgb, var(--human) 65%, transparent); }
.dial .needle { transform-box: view-box; transform-origin: 160px 170px; transform: rotate(var(--a)); }
.dial .needle path { stroke: var(--text); stroke-width: 4; stroke-linecap: round; }
.dial .needle circle { fill: var(--text); }
.dial .zt { font: 600 12.5px var(--font-sans); fill: var(--text-muted); }

.dial-btns {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pillbtn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font: 600 13px var(--font-sans);
  cursor: pointer;
}

.pillbtn.on {
  border-color: var(--pm);
  color: var(--text);
  background: color-mix(in srgb, var(--pm) 12%, var(--bg));
}

.dial-text h3 { margin: 0 0 8px; }

.who-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--role) 14%, transparent);
  color: var(--role);
  font-size: 14px;
}

.dial-text p { margin: 0 0 12px; font-size: 15px; line-height: 1.55; }

.dial-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.dial-list li { padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.dial-list li.on { color: var(--text); border-color: var(--pm); background: color-mix(in srgb, var(--pm) 7%, transparent); }
.dial-list span { display: inline-block; min-width: 136px; font-weight: 600; color: var(--role); }

.illus { margin: 8px 0 0; font-size: 12px; color: var(--text-muted); text-align: right; }
.honest { font-size: 13.5px !important; color: var(--text-muted); font-style: italic; }
.a1-next { margin-top: 24px; }

/* =========================================================
   Animated states. Only apply once js/agents-101.js has added .anim to a scene, so the
   static markup above stays the no-JS / reduced-motion final frame.
   ========================================================= */

.anim .endcard { transition: opacity 0.5s ease, transform 0.5s ease; }
.anim .endcard:not(.on) { opacity: 0; transform: translateY(8px); }

/* Scene 1 */
.hold-label.live { color: var(--gate); }
.keypad span { transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease; }
.anim .keypad span:not(.hit) { box-shadow: none; }
.keypad span.press { background: var(--pm); color: var(--bg); transform: scale(0.9); }
.anim .ivr-steps li { transition: opacity 0.35s ease, transform 0.35s ease; }
.anim .ivr-steps li:not(.on) { opacity: 0; transform: translateX(-6px); }
.anim .ivr-steps li.wrong.on { animation: shake 0.45s ease; }
.anim .notes:not(.on) { opacity: 0; }
.notes { transition: opacity 0.4s ease; }
.notes.on svg { animation: float 2.6s ease-in-out infinite; }
.notes.on .n2 { animation-delay: -0.9s; }
.notes.on .n3 { animation-delay: -1.7s; }
.meter-bar i { transition: width 0.3s linear; }
.anim .ivr-bubble { transition: opacity 0.2s ease; }

@keyframes float {
  0%, 100% { translate: 0 0; opacity: 0.7; }
  50% { translate: 0 -10px; opacity: 0.35; }
}

@keyframes shake {
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Scene 2 */
.anim .a1-msg:not(.on) { display: none; }
.anim .a1-msg.on { animation: pop 0.3s ease-out; }
.a1-msg.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.a1-msg.typing:not(.on) { display: none; }
.a1-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: typing 1s ease-in-out infinite; }
.a1-msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.a1-msg.typing i:nth-child(3) { animation-delay: 0.3s; }
.anim .a1-stamp { transition: opacity 0.2s ease, transform 0.25s cubic-bezier(.2, 1.6, .5, 1); }
.anim .a1-stamp:not(.on) { opacity: 0; transform: rotate(-7deg) scale(2.2); }
.brain-svg.thinking .brain { animation: think 0.9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.brain-svg .wire.flow { stroke-dasharray: 8 6; animation: flow 0.5s linear infinite; }
.anim .brain-svg .nolink:not(.alert) .x { opacity: 0; }
.brain-svg .nolink.alert .x { animation: pop 0.3s ease-out; }

@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes typing { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes think { 0%, 100% { scale: 1; } 50% { scale: 1.06; } }
@keyframes flow { to { stroke-dashoffset: -14; } }

/* Scene 3 */
.constellation .tool { transition: opacity 0.3s ease; }
.constellation .tool.idle { opacity: 0.4; }
.constellation .tool rect { transition: fill 0.2s ease, stroke 0.2s ease; }
.anim .constellation .packets circle { opacity: 0; }
#s3-halo { transition: r 0.2s linear; }
.pill.hide { visibility: hidden; }
.anim .tx li { transition: opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease; }
.anim .tx li:not(.on) { opacity: 0; }
.anim .tx li.dup { animation: pop 0.35s ease-out; }
.anim #s3-dup-pill:not(.on) { opacity: 0; }
.anim .limit { transition: opacity 0.4s ease; }
.anim .limit:not(.on) { opacity: 0; }
.limit.over .limit-note b { animation: pop 0.3s ease-out; }
.anim .cp { transition: opacity 0.4s ease, filter 0.4s ease, box-shadow 0.3s ease; }
.anim .cp:not(.on) { opacity: 0.35; filter: grayscale(0.7); }
.cp.now { box-shadow: 0 0 0 3px color-mix(in srgb, var(--role) 25%, transparent); }
.finger.scan i { animation: ripple 1s ease-out infinite; }
.finger.scan i + i { animation-delay: 0.35s; }
.anim .mp-ok:not(.on) { visibility: hidden; }
.anim .case-packet li { transition: opacity 0.3s ease; }
.anim .case-packet li:not(.on) { opacity: 0; }
.btn-approve { transition: background 0.25s ease; }
.btn-approve.done { background: var(--gate); }
.anim .notify { transition: opacity 0.4s ease, transform 0.4s ease; }
.anim .notify:not(.on) { opacity: 0; transform: translateY(-10px); }

@keyframes ripple { from { transform: scale(0.7); opacity: 0.8; } to { transform: scale(1.5); opacity: 0; } }

/* Scene 4 */
.anim .merge:not(.on) { opacity: 0; }
.merge { transition: opacity 0.3s ease; }
.lane:not(.stalled) .merge { display: none; }
.anim .lane .finish { opacity: 0.35; }
.anim .lane.done .finish { opacity: 1; }

/* Scene 5 */
.agent-anat .mod { transition: opacity 0.4s ease; }
.anim .agent-anat .mod:not(.on) { opacity: 0; }
.anim .agent-anat .loop-arrow:not(.on) { opacity: 0; }
.agent-anat .loop-arrow { transition: opacity 0.3s ease; }
.anim .agent-anat .loop-t:not(.on) { opacity: 0; }
.agent-anat .loop-t { transition: opacity 0.3s ease, fill 0.2s ease; }
.agent-anat .loop-t.now { fill: var(--human); }

/* Section 6 */
.dial .needle { transition: transform 0.6s cubic-bezier(.3, 1.4, .5, 1); }
.pillbtn[data-role="role-agent"].on { border-color: var(--agent); background: color-mix(in srgb, var(--agent) 12%, var(--bg)); }
.pillbtn[data-role="role-human"].on { border-color: var(--human); background: color-mix(in srgb, var(--human) 12%, var(--bg)); }
.dial-list li { transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease; }
.dial-list li:nth-child(1).on { border-color: var(--agent); background: color-mix(in srgb, var(--agent) 7%, transparent); }
.dial-list li:nth-child(3).on { border-color: var(--human); background: color-mix(in srgb, var(--human) 7%, transparent); }

/* ---------- Narrow screens ---------- */

@media (max-width: 1000px) {
  .s3-stage { grid-template-columns: 1fr 1fr; }
  .s3-stage .constellation { grid-column: 1 / -1; grid-row: 1; max-width: 520px; margin: 0 auto; }
  .checkpoints { grid-template-columns: 1fr; }
  .cp { flex-direction: row; align-items: center; }
  .cp > :first-child { flex: none; width: 190px; }
}

@media (max-width: 760px) {
  .s1-stage,
  .s2-stage,
  .anatomy,
  .dial-scene { grid-template-columns: 1fr; }
  .s3-stage { grid-template-columns: 1fr; }
  .lane { grid-template-columns: 1fr; gap: 6px; }
  .lane-state { font-size: 12px; }
  .merge { display: none; }
}

@media (max-width: 560px) {
  .cp { flex-direction: column; align-items: stretch; }
  .cp > :first-child { width: auto; }
  .mini-phone { width: 170px; }
  .phone { width: 240px; }
  .hold-clock { font-size: 44px; }
  .dial-list span { display: block; min-width: 0; }
  .sec-head { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .a1-scene *,
  .dial .needle { animation: none !important; transition: none !important; }
}
