/* ============================================================
   HYGENTRA HOME SCENES — component-driven feature sections
   Layout + chart dressing for the rebuilt feat sections. Cards
   and chat pieces come from components.css / motion.css; the
   chart itself is rendered by chart-engine.js.
   `.feat-x` mirrors the page's .feat shell without triggering
   the legacy scenario script (which binds every `.feat`).
   ============================================================ */

.feat-x {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding: clamp(56px, 7svh, 88px) 0;
  border-top: 1px solid var(--line-brown-soft);
  overflow: hidden;
}

.fx-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.fx-copy { max-width: 640px; }

/* product family tag riding the kicker — the ladder teaches the
   taxonomy: 01/02 Copilot (mint), 03/04 Agentic Trading (purple) */
.feat-kicker .feat-product {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 9px 2px;
  border: 1px solid color-mix(in srgb, var(--feat-color, var(--mint)) 38%, transparent);
  border-radius: 999px;
  color: var(--feat-color, var(--mint));
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: 0.2em;
  vertical-align: 2px;
}

/* hero: primary CTA + the four-step index (the page's map) */
.hero-sc .sc-actions { flex-direction: column; align-items: center; gap: 24px; }

.sc-index {
  display: flex;
  gap: clamp(16px, 3vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sc-index a {
  display: inline-flex;
  gap: 7px;
  color: rgba(var(--paper-rgb), 0.5);
  text-decoration: none;
  transition: color 160ms ease;
}

.sc-index a:hover,
.sc-index a:focus-visible { color: #f6efea; }
.sc-index b { font-weight: 680; color: var(--mint); }
.sc-index li:nth-child(n+3) b { color: #b9a0ff; }

/* Section 01 opens center-stage: the chat sits on the section's
   center axis before the reveal, so its intro must share that axis
   — kicker, heading, sub and link all center. Later sections keep
   the alternating left/right rhythm. */
.feat-x--center .fx-copy {
  margin-inline: auto;
  text-align: center;
}
.feat-x--center .fx-copy p { margin-inline: auto; }
.feat-x .body-link { color: var(--feat-color, var(--mint)); }
.feat-x .body-link:hover,
.feat-x .body-link:focus-visible { color: #f6efea; }

.fx-scene {
  position: relative;
  display: grid;
  grid-template-columns: 401px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  margin-top: clamp(36px, 5vh, 56px);
  container-type: inline-size;
}

/* chat-first staging: before the reveal the chat sits centered and
   the chart is off stage; the ask summons the chart — the chat
   glides to its column as the chart materializes beside it */
.fx-chat { transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1); }
.fx-scene.play:not(.revealed) .fx-chat { transform: translateX(calc(50cqw - 50%)); }

.fx-chart { transition: opacity 0.7s ease 0.15s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s; }
.fx-scene.play:not(.revealed) .fx-chart { opacity: 0; transform: translateX(30px) scale(0.985); pointer-events: none; }

.fx-scene::before {
  content: "";
  position: absolute;
  inset: -6%;
  background: radial-gradient(ellipse 55% 50% at 50% 45%, color-mix(in srgb, var(--feat-color, #36ffab) 5%, transparent), transparent 70%);
  pointer-events: none;
}

/* ---- chat rail (401px chat column, components language) ---- */

.fx-chat {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 401px;
  max-width: 100%;
  padding: 16.8px;
  border: 1px solid var(--glass-line);
  border-radius: 24px;
  background: var(--glass-film);
  box-shadow: var(--glass-light);
}

.fx-stream {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 4px 2px 12px;
  overflow-y: auto;
  scrollbar-width: none;
}

.fx-stream::-webkit-scrollbar { display: none; }

.fx-agent {
  margin: 0;
  padding-right: 32px;
  color: #fff;
  font-size: 11px;
  line-height: 15.6px;
}

.fx-stream .m-think { padding-left: 2px; }

.fx-chat .hy-composer { margin-top: 12px; }

/* ---- chart panel ------------------------------------------ */

.fx-chart {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 16px 10px;
  border: 1px solid var(--glass-line);
  border-radius: 24px;
  background: var(--glass-film);
  box-shadow: var(--glass-light);
}

.fx-chart-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.fxc-pair {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.fxc-pair img { width: 20px; height: 20px; border-radius: 50%; }
.fxc-pair i { margin-left: 2px; color: rgba(255, 255, 255, 0.45); font-size: 11px; font-style: normal; font-weight: 500; }

.fxc-px { color: #e5e8ec; font-family: var(--mono); font-size: 12px; }
.fxc-px b { margin-left: 8px; color: rgba(255, 255, 255, 0.45); font-size: 10.5px; font-weight: 500; }

.fxc-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: #b6ada8;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fxc-live i { width: 6px; height: 6px; border-radius: 2px; background: var(--mint); box-shadow: 0 0 8px var(--mint); }

.fx-chart svg { display: block; width: 100%; height: auto; flex: 1; }

/* ---- chart engine styling (SVG classes) -------------------- */

.fx-chart .grid-ln { stroke: rgba(246, 239, 234, 0.07); stroke-width: 1; }

.fx-chart .tick {
  fill: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.fx-chart .x-tick { font-size: 9px; letter-spacing: 0.12em; }
.fx-chart .px-tag { fill: var(--mint); }

.fx-chart .px-line {
  stroke: rgba(54, 255, 171, 0.45);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.fx-chart .candle {
  opacity: 0;
  transform: translateY(7px);
  transform-box: fill-box;
  transition: opacity 0.5s ease var(--cd, 0s),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--cd, 0s);
}

.fx-chart svg.play .candle { opacity: 1; transform: none; }

.fx-chart .candle.up line { stroke: rgba(54, 255, 171, 0.5); stroke-width: 1; }
.fx-chart .candle.dn line { stroke: rgba(255, 77, 94, 0.45); stroke-width: 1; }
.fx-chart .candle.up rect { fill: rgba(54, 255, 171, 0.85); }
.fx-chart .candle.dn rect { fill: rgba(255, 77, 94, 0.75); }

.fx-chart .vol-bar { opacity: 0; transition: opacity 0.5s ease var(--cd, 0s); }
.fx-chart svg.play .vol-bar { opacity: 1; }
.fx-chart .vol-bar.up { fill: rgba(54, 255, 171, 0.28); }
.fx-chart .vol-bar.dn { fill: rgba(255, 77, 94, 0.22); }

.fx-chart .lvl line {
  transform: scaleX(0);
  transform-origin: left center;
  transform-box: fill-box;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.fx-chart .lvl.drawn line { transform: scaleX(1); }

.fx-chart .lvl text {
  opacity: 0;
  transition: opacity 0.4s ease 0.55s;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.fx-chart .lvl.drawn text { opacity: 1; }

.fx-chart .lvl.sup line { stroke: var(--mint); stroke-width: 1.3; }
.fx-chart .lvl.sup text { fill: var(--mint); }
.fx-chart .lvl.res line { stroke: var(--execution); stroke-width: 1.3; }
.fx-chart .lvl.res text { fill: var(--execution); }

.fx-chart .lvl.fib line {
  stroke: rgba(246, 239, 234, 0.35);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.fx-chart .lvl.fib text { fill: var(--muted); }

.fx-chart .fib-zone {
  fill: rgba(54, 255, 171, 0.07);
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}

.fx-chart .fib-zone.drawn { opacity: 1; }

.fx-chart .px-dot {
  fill: var(--mint);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fx-chart .px-dot.drawn { opacity: 1; }

.fx-chart .px-ring {
  fill: none;
  stroke: var(--mint);
  stroke-width: 1.4;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .fx-chart .px-ring.drawn { animation: fx-ring-pulse 2s ease-out infinite; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-chart .px-ring.drawn { opacity: 0.4; }
  .fx-chart .candle,
  .fx-chart .vol-bar,
  .fx-chart .lvl line,
  .fx-chart .lvl text,
  .fx-chart .fib-zone,
  .fx-chart .px-dot {
    transition: none;
  }
}

@keyframes fx-ring-pulse {
  0% { opacity: 0.7; transform: scale(1); }
  70% { opacity: 0; transform: scale(2.8); }
  100% { opacity: 0; transform: scale(2.8); }
}

/* ---- responsive ------------------------------------------- */

@media (max-width: 1120px) {
  .feat-x { min-height: 0; }
  .fx-scene { grid-template-columns: minmax(0, 1fr); }
  .fx-chat { width: 100%; height: 420px; }
}

/* ---- split scene: component column + copy ------------------ */

.fx-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
  min-height: min(760px, calc(100svh - clamp(112px, 14svh, 176px)));
}

.fx-stagecol { width: min(401px, 100%); justify-self: center; }

@media (max-width: 1120px) {
  .fx-split { grid-template-columns: minmax(0, 1fr); gap: 36px; min-height: 0; }
  .fx-split .fx-copy { order: -1; }
}

/* ---- trade ticket — the 53:3396 review card, drafting a trade -
   same element as 02 Check (chip head, amber-glow order rows,
   ghost+mint action pair); only the contents differ. Extras here:
   the mint Draft chip, the ticking window, the settle-on-confirm
   states, and the assemble cascade. */

.fx-actcol { width: min(401px, 100%); justify-self: center; }

/* the chip reads Draft in mint (02's is the red flag count) */
.trade-ticket .stage-review__head > div > span {
  border-color: rgba(54, 255, 171, 0.35);
  background: rgba(54, 255, 171, 0.12);
  color: var(--mint);
}

.trade-ticket .stage-review__head > div { display: flex; align-items: center; width: 100%; gap: 6px; }

.tt-timer {
  margin-left: auto;
  color: #5e5e5e;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.tt-thesis {
  margin: 8px 0 0;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  line-height: 15.5px;
}

.tt-filled {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(54, 255, 171, 0.35);
  border-radius: 8px;
  background: rgba(54, 255, 171, 0.08);
  color: var(--mint);
  font-size: 11.5px;
  font-weight: 560;
}

.tt-filled svg { width: 14px; flex: none; }
.tt-filled.on { display: flex; }

/* confirm settles the ticket: glow stops, border goes mint, ctas dim */
.trade-ticket.confirmed .stage-order { border-color: rgba(54, 255, 171, 0.4); }
.trade-ticket.confirmed .stage-order::before { display: none; }
.trade-ticket.confirmed .stage-review__actions,
.fx-chat--act.play .trade-ticket.in.confirmed .stage-review__actions { opacity: 0.35; }
.trade-ticket.confirmed .tt-timer { visibility: hidden; }

/* choreography gating — the ticket assembles beneath the reply,
   its pieces cascading top to bottom */
.fx-chat--act.play .trade-ticket {
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.fx-chat--act.play .trade-ticket > * {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.fx-chat--act.play .trade-ticket.in { opacity: 1; transform: none; }
.fx-chat--act.play .trade-ticket.in > * { opacity: 1; transform: none; }
.fx-chat--act.play .trade-ticket.in > :nth-child(2) { transition-delay: 0.1s; }
.fx-chat--act.play .trade-ticket.in > :nth-child(3) { transition-delay: 0.2s; }
.fx-chat--act.play .trade-ticket.in > :nth-child(4) { transition-delay: 0.3s; }
.fx-chat--act.play .trade-ticket.in > :nth-child(5) { transition-delay: 0.4s; }

.stage-review__actions button { pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .trade-ticket .stage-review__actions button:last-child.sent { animation: send-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
  .tt-filled.on { animation: tt-fill-in 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
}

@keyframes tt-fill-in {
  from { opacity: 0; transform: translateY(6px); }
}

/* ---- radar "signals are forming" — Asset Library 53:2512 ---- */

.radar-stack { display: flex; flex-direction: column; gap: 16px; width: min(392px, 100%); justify-self: center; }

.radar-card {
  overflow: hidden;
  padding: 16.8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
}

.radar-scope {
  position: relative;
  height: 159.6px;
  overflow: hidden;
}

.rs-ring {
  position: absolute;
  bottom: -55%;
  left: 50%;
  border: 1.4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  transform: translateX(-50%);
}

.rs-ring--1 { width: 240.9px; height: 240.9px; opacity: 0.4; }
.rs-ring--2 { width: 258.8px; height: 258.8px; opacity: 0.2; }
.rs-ring--3 { width: 281.1px; height: 281.1px; opacity: 0.06; }

@media (prefers-reduced-motion: no-preference) {
  .rs-ring { animation: rs-breathe 4.2s ease-in-out infinite; }
  .rs-ring--2 { animation-delay: -1.4s; }
  .rs-ring--3 { animation-delay: -2.8s; }
}

@keyframes rs-breathe {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.42; }
}

.rs-core {
  position: absolute;
  bottom: 14px;
  left: 50%;
  display: grid;
  width: 67px;
  height: 67px;
  border: 1.4px solid #fff;
  border-radius: 50%;
  color: #fff;
  opacity: 0.6;
  place-items: center;
  transform: translateX(-50%);
}

.rs-core svg { width: 33.6px; height: 33.6px; }

@media (prefers-reduced-motion: no-preference) {
  .rs-core svg { animation: rs-spin 14s linear infinite; }
}

@keyframes rs-spin { to { transform: rotate(360deg); } }

.radar-copy { padding: 22.4px 16.8px 11.2px; text-align: center; }
.radar-copy strong { display: block; color: #fff; font-size: 19.6px; font-weight: 600; }
.radar-copy p { margin: 5.6px 0 0; color: rgba(255, 255, 255, 0.6); font-size: 15.4px; line-height: 1.45; }

.radar-queue-row {
  display: flex;
  align-items: center;
  gap: 22.4px;
  padding: 16.8px 11.2px;
  border-top: 1.4px solid rgba(255, 255, 255, 0.06);
  margin-top: 11.2px;
}

.radar-queue-row span { flex: 1; color: rgba(255, 255, 255, 0.9); font-size: 16.8px; }
.radar-queue-row b {
  display: grid;
  min-width: 33.6px;
  padding: 5.6px 11.2px;
  border-radius: 5.6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  font-size: 16.8px;
  font-weight: 600;
  place-items: center;
}

.radar-stack .queue-card,
.radar-stack .signal-queue { width: 100%; }

/* ---- agents: routing readout + model glow ------------------ */

.agent-route {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 20px;
  margin: 14px 0 6px;
}

.agent-route-status {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 0.24s ease;
}

.agent-tab .tab-model-icon { transition: box-shadow 0.35s ease, border-color 0.35s ease; }

.agent-tab[aria-selected="true"] .tab-model-icon {
  border-color: rgba(54, 255, 171, 0.55);
  box-shadow: 0 0 14px rgba(54, 255, 171, 0.28);
}

@media (prefers-reduced-motion: no-preference) {
  .agent-tab .tab-model-icon.route-pop { animation: send-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
}

/* ---- agentic sequence — Asset Library 53:323, exact dims ---- */

/* one layered composition: the beats land the cards into a
   designed cluster — agent card behind, book overlapping it,
   PnL front-most — so the resting frame is a finished picture */

.agentic-stack {
  position: relative;
}

/* agent card — node 53:465 (472 wide) */
.agent-pick {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  overflow: hidden;
  width: min(472px, 100%);
  border: 1px solid var(--glass-line);
  border-radius: 24px;
  background: var(--glass-film);
  box-shadow: var(--glass-light), 0 18px 40px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: var(--glass-frost);
  backdrop-filter: var(--glass-frost);
}

.ap-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  height: 71.6px;
  padding: 16.5px 16.5px 11px;
  border: 1.4px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.ap-icon { display: grid; width: 44px; height: 44px; place-items: center; }
.ap-icon img { width: 33px; height: 33px; filter: grayscale(1) brightness(1.8); }

.ap-names { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.ap-names strong { color: #fff; font-size: 19.3px; font-weight: 600; }
.ap-names small { display: inline-flex; align-items: center; gap: 5.5px; color: rgba(255, 255, 255, 0.6); font-size: 15.1px; }
.ap-names small i { font-size: 5.5px; font-style: normal; }

.ap-spark { width: 123.7px; height: 44px; flex: none; }
.ap-spark path { fill: none; stroke: var(--mint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.agentic-stack.play .agent-pick.in .ap-spark path { stroke-dashoffset: 0; transition: stroke-dashoffset 1s cubic-bezier(0.33, 1, 0.68, 1) 0.3s; }
.agentic-stack:not(.play) .ap-spark path { stroke-dashoffset: 0; }

.ap-foot {
  display: flex;
  align-items: center;
  gap: 16.5px;
  height: 71.6px;
  padding: 11px 16.5px;
  border: 1.4px solid rgba(255, 255, 255, 0.08);
  border-top: 0;
  border-radius: 0 0 16.5px 16.5px;
}

.ap-bestfor { color: rgba(255, 255, 255, 0.6); font-size: 15.1px; }
.ap-model { display: grid; width: 27.5px; height: 27.5px; opacity: 0.6; place-items: center; }
.ap-model img { width: 27.5px; height: 27.5px; border-radius: 50%; }
.ap-foot .ap-model + .ap-model { margin-left: -4px; }

.ap-deploy {
  margin-left: auto;
  padding: 5.5px 11px;
  border: 0;
  border-radius: 16.5px;
  background: var(--mint);
  color: #01231e;
  font-size: 15.1px;
  cursor: default;
}

/* book donut — node 53:1111 (267 wide) + pnl — node 53:1196 (277) */
.agentic-row { display: contents; }

.agent-book {
  position: absolute;
  top: 118px;
  left: 18px;
  z-index: 2;
  width: 267px;
  max-width: 100%;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: #1b1515;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}

.ab-pie { position: relative; width: 216px; height: 184.8px; margin: 0 auto; }
.ab-pie svg { width: 100%; height: 100%; }

.ab-seg {
  fill: none;
  stroke-width: 10.5;
  stroke-dasharray: 0 100;
  stroke-dashoffset: 0;
  transition: stroke-dasharray 0.9s cubic-bezier(0.22, 1, 0.36, 1), stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.ab-seg--usdc { stroke: #61b8ff; }
.ab-seg--btc { stroke: #ff982f; }
.ab-seg--hype { stroke: #845fff; }
.ab-seg--eth { stroke: #29e3ef; }

.ab-total {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #fff;
  font-size: 19.2px;
  font-weight: 700;
  transform: translate(-50%, -58%);
  white-space: nowrap;
}

.ab-rows { display: flex; flex-direction: column; margin-top: 4px; }

.ab-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
}

.ab-row[hidden] { display: none; }

.ab-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--seg); box-shadow: 0 0 8px color-mix(in srgb, var(--seg) 60%, transparent); }

.ab-names { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; margin-left: 6px; }
.ab-names small { color: rgba(255, 255, 255, 0.6); font-size: 14px; }
.ab-names span { display: inline-flex; align-items: center; gap: 6px; }
.ab-names b { color: #fff; font-size: 16px; font-weight: 500; }

.ab-chip {
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--seg) 30%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--seg) 12%, transparent);
  color: var(--seg);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  text-transform: uppercase;
}

.ab-coin { width: 20px; height: 20px; flex: none; color: #fff; opacity: 0.2; }

/* pnl card — node 53:1196 */
.agent-pnl {
  position: absolute;
  top: 196px;
  left: 270px;
  z-index: 3;
  width: 272px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  background: #1d1616;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.pn-head { padding: 16px 24px 6px; }
.pn-head > small { color: rgba(255, 255, 255, 0.6); font-size: 11px; }
.pn-line { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.pn-line strong { color: #fff; font-size: 20px; font-weight: 600; }
.pn-line em { color: var(--mint); font-size: 12px; font-style: normal; font-weight: 500; }
.pn-session { display: block; margin-top: 4px; color: #5e5e5e; font-size: 10px; }

.pn-rows { display: flex; flex-direction: column; gap: 16px; padding: 12px 24px; }
.pn-row { display: flex; align-items: center; gap: 8px; }
.pn-row img { width: 20px; height: 20px; opacity: 0.2; }
.pn-row small { flex: 1; color: rgba(255, 255, 255, 0.8); font-size: 14px; font-weight: 600; }
.pn-row span { display: inline-flex; align-items: center; gap: 4px; }
.pn-row b { color: #fff; font-family: var(--mono); font-size: 14px; font-weight: 500; }
.pn-row em { color: var(--mint); font-size: 10px; font-style: normal; font-weight: 500; }

/* (donut composition gating superseded by the config sequence) */

.ab-total.flash { animation: ab-flash 0.7s ease; }

@keyframes ab-flash {
  0% { color: var(--mint); text-shadow: 0 0 16px rgba(54, 255, 171, 0.8); }
  100% { color: #fff; text-shadow: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .ap-deploy.sent { animation: send-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
}

/* ============================================================
   delegate config sequence — deck 22:3920: card expands on
   Deploy, config modal rises with cascading checks, allocation
   panel lands on top. Component dims from Asset Library
   53:367 (472x627), 53:623 (525x602), 53:577 (374x359).
   ============================================================ */

.fx-fit { width: 100%; max-width: var(--fitw, none); justify-self: center; }

.agentic-stack { width: 568px; height: 660px; }

.ax-ghost {
  position: absolute;
  left: 24px;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 424px;
  max-width: 90%;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: var(--glass-film);
  -webkit-backdrop-filter: var(--glass-frost);
  backdrop-filter: var(--glass-frost);
  color: rgba(255, 255, 255, 0.55);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateY(8px);
}

.ax-ghost span { flex: 1; font-size: 14px; font-weight: 600; }
.ax-ghost svg { width: 60px; height: 16px; color: var(--mint); opacity: 0.6; }
.ax-ghost--1 { top: -16px; }
.ax-ghost--2 { top: -30px; left: 48px; width: 376px; opacity: 0; }

.agentic-stack.play .ax-ghost.in { opacity: 0.5; transform: none; }
.agentic-stack.play .ax-ghost--2.in { opacity: 0.28; }

/* expandable agent card (53:367 expanded state) */
.agent-pick { z-index: 1; transition: opacity 0.45s ease, filter 0.45s ease, transform 0.45s ease; }

.agent-pick.dim { opacity: 0.34; filter: saturate(0.7); transform: scale(0.985); }

.ap-foot { transition: opacity 0.35s ease; }
.agent-pick.expanded .ap-foot { display: none; }

.ax-body { display: none; }
.agent-pick.expanded .ax-body { display: block; }

.ax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 55px;
  padding: 0 29.5px 0 29.5px;
  border-bottom: 1.6px solid rgba(255, 255, 255, 0.06);
}

.ax-row span { color: rgba(255, 255, 255, 0.6); font-size: 15.5px; }
.ax-row b { color: #fff; font-size: 20px; font-weight: 600; }
.ax-row .ax-mint { color: var(--mint); }
.ax-row .ax-red { color: #ff5d6c; }

.ax-table { padding: 8px 29.5px 4px; }

.ax-th,
.ax-tr {
  display: grid;
  grid-template-columns: 1.45fr 1.45fr 1fr 1fr;
  align-items: center;
  height: 40px;
}

.ax-th b { color: rgba(255, 255, 255, 0.4); font-size: 13px; font-weight: 500; text-align: right; }
.ax-sym { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 15px; font-weight: 600; }
.ax-sym img { width: 26px; height: 26px; border-radius: 50%; }
.ax-tr b { color: #fff; font-family: var(--mono); font-size: 15px; font-weight: 500; text-align: right; }
.ax-tr i { color: rgba(255, 255, 255, 0.6); font-size: 15px; font-style: normal; text-align: right; }

.ax-deploy {
  display: block;
  width: calc(100% - 79px);
  margin: 16px auto 20px;
  padding: 12px 0;
  border: 0;
  border-radius: 999px;
  background: var(--mint);
  color: #01231e;
  font-size: 19px;
  font-weight: 600;
  cursor: default;
}

/* expand choreography: rows cascade once the card opens */
.agentic-stack.play .ax-row,
.agentic-stack.play .ax-table,
.agentic-stack.play .ax-deploy {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.agentic-stack.play .agent-pick.expanded .ax-row.in,
.agentic-stack.play .agent-pick.expanded .ax-table.in,
.agentic-stack.play .agent-pick.expanded .ax-deploy.in { opacity: 1; transform: none; }

/* deploy config modal (53:623, 525x602) */
.ax-modal {
  position: absolute;
  top: 8px;
  left: 46px;
  z-index: 3;
  width: min(525px, calc(100% - 20px));
  padding: 24px;
  border: 1px solid var(--glass-line);
  border-radius: 32px;
  background: var(--glass-film);
  box-shadow: var(--glass-light), 0 34px 80px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: var(--glass-frost);
  backdrop-filter: var(--glass-frost);
}

.axm-head { display: flex; align-items: flex-start; gap: 8px; }
.axm-icon { display: grid; width: 20px; height: 20px; margin-top: 2px; place-items: center; }
.axm-icon img { width: 20px; height: 20px; filter: grayscale(1) brightness(1.8); }
.axm-names { flex: 1; min-width: 0; }
.axm-names strong { display: block; color: #d9d9d9; font-size: 20px; font-weight: 600; letter-spacing: -0.04em; line-height: 0.98; }
.axm-names small { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.6); font-size: 12px; font-weight: 500; }
.axm-names small b { color: rgba(255, 255, 255, 0.7); font-weight: 500; }
.axm-close { color: rgba(255, 255, 255, 0.45); font-size: 14px; }

.axm-title { margin-top: 16px; color: #fff; font-size: 17px; font-weight: 600; }
.axm-note { margin: 4px 0 0; color: rgba(255, 255, 255, 0.55); font-size: 12.5px; line-height: 1.35; }
.axm-note b { color: rgba(255, 255, 255, 0.75); font-weight: 700; }

.axm-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(25, 25, 25, 0.9);
  color: rgba(255, 255, 255, 0.4);
  font-size: 12.5px;
}

.axm-search svg { width: 14px; height: 14px; }

.axm-clear { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: rgba(255, 255, 255, 0.9); font-size: 13px; font-weight: 600; }

.axm-check {
  display: grid;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: transparent;
  place-items: center;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.axm-check svg { width: 12px; }
.axm-check.on { border-color: var(--mint); background: rgba(54, 255, 171, 0.08); color: var(--mint); }

.axm-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; overflow: hidden; border-radius: 10px; }

.axm-market {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.04);
}

.axm-market > img { width: 20px; height: 20px; flex: none; border-radius: 50%; opacity: 0.6; }
.axm-market span b { display: block; color: #fff; font-size: 14px; font-weight: 600; }
.axm-market span small { display: block; margin-top: 1px; color: rgba(255, 255, 255, 0.5); font-size: 12px; }

/* allocation panel (53:577, 374x359) */
.ax-alloc {
  position: absolute;
  top: 100px;
  left: 226px;
  z-index: 4;
  width: min(374px, calc(100% - 40px));
  padding: 27px;
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  background: var(--glass-film);
  box-shadow: var(--glass-light), 0 38px 90px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: var(--glass-frost);
  backdrop-filter: var(--glass-frost);
}

.axa-intro { margin: 0; color: rgba(255, 255, 255, 0.55); font-size: 11px; line-height: 1.45; }
.axa-label { display: block; margin-top: 15px; color: rgba(255, 255, 255, 0.5); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; }

.axa-field {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 43px;
  margin-top: 5px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.axa-field i { color: rgba(255, 255, 255, 0.5); font-size: 14px; font-style: normal; }
.axa-field b { flex: 1; color: #fff; font-size: 20px; font-weight: 600; }
.axa-field small { color: rgba(255, 255, 255, 0.5); font-size: 10.5px; }

.axa-slider { position: relative; height: 31px; margin-top: 12px; }

.axa-track {
  position: absolute;
  top: 18.5px;
  right: 0;
  left: 0;
  height: 4.3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.axa-fill { display: block; width: 0%; height: 100%; border-radius: 999px; background: var(--mint); transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1); }

.axa-rectick { position: absolute; top: 14px; left: 34%; width: 1.4px; height: 11.4px; background: rgba(255, 255, 255, 0.35); }
.axa-rec { position: absolute; top: 0; left: 29.5%; color: rgba(255, 255, 255, 0.4); font-size: 8px; }

.axa-knob {
  position: absolute;
  top: 20.5px;
  left: 0%;
  width: 12.8px;
  height: 12.8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--mint);
  transform: translate(-50%, -50%);
  transition: left 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.axa-ticks { display: flex; justify-content: space-between; margin-top: 2px; color: rgba(255, 255, 255, 0.35); font-size: 9px; }

.axa-cov { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.axa-cov span { color: rgba(255, 255, 255, 0.55); font-size: 11px; }
.axa-cov b { color: #fff; font-size: 12px; font-weight: 600; }

.axa-covbar { display: block; height: 5.7px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.axa-covbar i { display: block; width: 0%; height: 100%; border-radius: 999px; background: var(--mint); transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1); }

.axa-caption { margin: 12px 0 0; color: rgba(255, 255, 255, 0.45); font-size: 10px; }

.axa-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; }
.axa-back { display: grid; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.6); font-size: 12px; place-items: center; }

.axa-cta {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--mint);
  color: #01231e;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: default;
}

/* floating market coins from the deck composition */
.ax-float {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.ax-float img { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); }
.ax-float--1 { top: -6px; left: 300px; }
.ax-float--2 { top: 190px; left: 8px; }
.ax-float--3 { top: 560px; left: 500px; }

.agentic-stack .ax-float.in { opacity: 0.95; }

@media (prefers-reduced-motion: no-preference) {
  .ax-float img { animation: ax-drift 7s ease-in-out infinite; }
  .ax-float--2 img { animation-delay: -2.4s; }
  .ax-float--3 img { animation-delay: -4.6s; }
}

@keyframes ax-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* beat gating for modal + allocation */
.agentic-stack.play .ax-modal {
  opacity: 0;
  transform: translateY(14px) scale(0.965);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.agentic-stack.play .ax-modal.in { opacity: 1; transform: none; }

.agentic-stack.play .ax-alloc {
  opacity: 0;
  transform: translate(26px, 10px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.agentic-stack.play .ax-alloc.in { opacity: 1; transform: none; }

/* seed → rise: the compact card opens centered in the 660 canvas
   — one equation, translateY(330px - 50%), half the canvas minus
   half its own height — and the Deploy press sends it up to its
   design position (top: 0) to make room for the record it expands
   into. .risen must land (transform: none) before .expanded flips
   the card's height, since the seed offset resolves against it. */
.agentic-stack.play .agent-pick {
  opacity: 0;
  transform: translateY(calc(330px - 50% + 14px));
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.agentic-stack.play .agent-pick.in { opacity: 1; transform: translateY(calc(330px - 50%)); }
.agentic-stack.play.risen .agent-pick.in { transform: none; transition-duration: 0.55s, 0.85s; }
.agentic-stack.play .agent-pick.in.dim { opacity: 0.34; transform: scale(0.985); }

@media (prefers-reduced-motion: no-preference) {
  .axa-cta.sent { animation: send-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
  .ax-deploy.sent { animation: send-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
}

/* (small-screen behavior: uniform fit-scale via M.fitScale) */

/* glass consistency: every scene panel is the same material */
.fx-chat,
.fx-chart,
.order-form {
  -webkit-backdrop-filter: var(--glass-frost);
  backdrop-filter: var(--glass-frost);
}

.fx-fit { min-width: 0; }
