/* ============================================================
   ActTrader — Signature interactive sections
   One bespoke, animated centerpiece per product page. Keyed by
   data-sig on a <section class="sig">. Pairs with signature.js.
   ============================================================ */
.sig { position: relative; padding: 110px 0; border-top: 1px solid var(--line); overflow: hidden; }
.sig-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, var(--brand-soft), transparent 62%);
  pointer-events: none; opacity: 0.7;
}
.sig-panel {
  position: relative; margin-top: 44px;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg-card));
  border: 1px solid var(--line-strong); border-radius: var(--r-2xl);
  padding: 36px; overflow: hidden;
}
.sig-mono { font-family: 'JetBrains Mono', monospace; font-feature-settings: 'tnum'; }

/* ---- shared big stat ---- */
.sig-readout { display: flex; gap: 40px; flex-wrap: wrap; align-items: baseline; }
.sig-readout .r .v { font-family: 'JetBrains Mono', monospace; font-size: 40px; font-weight: 600; letter-spacing: -0.02em; }
.sig-readout .r .v.brand { color: var(--brand); }
.sig-readout .r .v.gain { color: var(--gain); }
.sig-readout .r .l { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-dimmer); margin-top: 4px; }

/* ============ EXEC (trading platform) ============ */
.exec-grid { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: stretch; }
.exec-ticket {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.exec-ticket .sym { font-size: 18px; font-weight: 700; }
.exec-ticket .sym small { color: var(--fg-dim); font-weight: 400; font-size: 12px; margin-left: 6px; }
.exec-bidask { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.exec-bidask div { padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line); text-align: center; }
.exec-bidask .lbl { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dimmer); }
.exec-bidask .px { font-family: 'JetBrains Mono', monospace; font-size: 15px; margin-top: 4px; }
.exec-bidask .sell .px { color: var(--loss); }
.exec-bidask .buy .px { color: var(--gain); }
.exec-qty { display: flex; align-items: center; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--fg-dim); }
.exec-go {
  margin-top: 4px; border: none; cursor: pointer; width: 100%; padding: 15px;
  border-radius: 999px; background: linear-gradient(135deg, var(--gain), #2f9e63); color: #04130a;
  font-weight: 700; font-size: 14px; letter-spacing: 0.02em; transition: transform 0.15s, box-shadow 0.2s;
}
.exec-go:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(74,222,128,0.28); }
.exec-go:active { transform: translateY(0) scale(0.98); }
.exec-go.firing { background: var(--warn); color: #2a1f00; }
.exec-feed { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; }
.exec-latency { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.exec-latency .big { font-family: 'JetBrains Mono', monospace; font-size: 52px; font-weight: 600; color: var(--brand); line-height: 1; }
.exec-latency .unit { font-size: 16px; color: var(--fg-dim); }
.exec-latency .cap { margin-left: auto; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-dimmer); }
.exec-log { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 150px; }
.exec-row { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 12px; font-family: 'JetBrains Mono', monospace; font-size: 11px; align-items: center; animation: sigRowIn 0.4s ease; }
.exec-row .t { color: var(--fg-dimmer); }
.exec-row .fill { color: var(--gain); }
.exec-row .lat { color: var(--fg-dim); }
.exec-row .stamp { color: var(--gain); font-weight: 600; }
@keyframes sigRowIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* ============ ORDER BOOK (crypto) ============ */
.ob-wrap { display: grid; grid-template-columns: 1fr 220px; gap: 28px; }
.ob-book { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.ob-head { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dimmer); padding: 0 4px 10px; }
.ob-line { position: relative; display: flex; justify-content: space-between; padding: 4px 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; border-radius: 4px; }
.ob-line .bar { position: absolute; top: 0; bottom: 0; right: 0; border-radius: 4px; transition: width 0.5s ease; z-index: 0; }
.ob-line span { position: relative; z-index: 1; }
.ob-line.ask .px { color: var(--loss); }
.ob-line.ask .bar { background: var(--loss-soft); }
.ob-line.bid .px { color: var(--gain); }
.ob-line.bid .bar { background: var(--gain-soft); left: 0; right: auto; }
.ob-mid { text-align: center; padding: 12px; margin: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ob-mid .px { font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 600; transition: color 0.2s; }
.ob-mid .px.up { color: var(--gain); }
.ob-mid .px.dn { color: var(--loss); }
.ob-mid .arrow { font-size: 14px; margin-left: 6px; }
.ob-tape { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.ob-tape h4 { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dimmer); margin-bottom: 12px; }
.ob-trade { display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 5px 0; border-bottom: 1px solid var(--line); animation: sigRowIn 0.4s ease; }
.ob-trade .b { color: var(--gain); }
.ob-trade .s { color: var(--loss); }

/* ============ STRATEGY (ActFx) ============ */
.strat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.strat-stage { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; }
.strat-step-lbl { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.strat-step-lbl .n { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; }
.strat-prompt { font-size: 15px; line-height: 1.7; color: var(--fg); min-height: 96px; }
.strat-prompt .cur { color: var(--brand); animation: blinkCur 1s steps(1) infinite; }
@keyframes blinkCur { 50% { opacity: 0; } }
.strat-code { font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.9; min-height: 96px; }
.strat-code .ln { opacity: 0; transform: translateY(4px); transition: opacity 0.3s, transform 0.3s; }
.strat-code .ln.on { opacity: 1; transform: none; }
.strat-code .kw { color: var(--brand); }
.strat-code .gn { color: var(--gain); }
.strat-code .com { color: var(--fg-dimmer); }
.strat-curve { grid-column: 1 / -1; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.strat-curve .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.strat-curve h4 { font-size: 13px; font-weight: 600; }
.strat-curve svg { width: 100%; height: 120px; display: block; }
.strat-path { stroke: var(--gain); stroke-width: 2; fill: none; stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.strat-path.draw { animation: drawLine 2.2s ease forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* ============ CHALLENGE (prop) ============ */
.chal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.chal-obj { display: flex; flex-direction: column; gap: 16px; }
.chal-meter { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.chal-meter .top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 10px; }
.chal-meter .top .l { color: var(--fg-dim); }
.chal-meter .top .v { font-family: 'JetBrains Mono', monospace; color: var(--fg); }
.chal-bar { height: 8px; border-radius: 999px; background: var(--bg-elev); overflow: hidden; }
.chal-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-deep), var(--brand)); width: 0; transition: width 0.7s cubic-bezier(0.2,0.8,0.2,1); }
.chal-bar.gain i { background: linear-gradient(90deg, #2f9e63, var(--gain)); }
.chal-bar.guard i { background: linear-gradient(90deg, var(--gain), var(--warn)); }
.chal-side { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; }
.chal-side .day { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--fg-dimmer); letter-spacing: 0.14em; text-transform: uppercase; }
.chal-side svg { width: 100%; height: 130px; margin: 14px 0; }
.chal-status { margin-top: auto; padding: 14px; border-radius: var(--r-md); text-align: center; font-weight: 700; letter-spacing: 0.04em; border: 1px dashed var(--line-strong); color: var(--fg-dim); transition: all 0.4s; }
.chal-status.funded { background: var(--gain-soft); border: 1px solid var(--gain); color: var(--gain); animation: demoPop 0.5s; }
.chal-go { margin-top: 16px; border: none; cursor: pointer; padding: 13px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; font-size: 13px; transition: transform 0.15s; }
.chal-go:hover { transform: translateY(-2px); }
.chal-go:disabled { opacity: 0.4; cursor: default; transform: none; }

/* ============ PIPELINE (tokenisation) ============ */
.pipe { display: flex; align-items: stretch; gap: 0; }
.pipe-node { flex: 1; text-align: center; position: relative; padding: 8px; }
.pipe-ico {
  width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 18px;
  background: var(--bg); border: 1px solid var(--line); color: var(--fg-dim);
  display: flex; align-items: center; justify-content: center; transition: all 0.5s;
}
.pipe-ico svg { width: 30px; height: 30px; }
.pipe-node.on .pipe-ico { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 6px var(--brand-soft); }
.pipe-node h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; transition: color 0.3s; }
.pipe-node.on h4 { color: var(--brand); }
.pipe-node p { font-size: 11px; color: var(--fg-dim); line-height: 1.5; }
.pipe-connect { flex: 0 0 60px; align-self: flex-start; margin-top: 43px; height: 2px; background: var(--line-strong); position: relative; overflow: hidden; border-radius: 2px; }
.pipe-connect i { position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--brand), transparent); transform: translateX(-120%); }
.pipe-connect.flow i { animation: pipeFlow 0.9s ease forwards; }
@keyframes pipeFlow { to { transform: translateX(260%); } }
.pipe-meta { display: flex; justify-content: center; gap: 40px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }

/* ============ ODDS (prediction) ============ */
.odds-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.odds-clock { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--brand); display: flex; align-items: center; gap: 8px; }
.odds-clock .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gain); animation: liveDot 1.6s infinite; }
.odds-row { padding: 16px 0; border-top: 1px solid var(--line); }
.odds-row .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.odds-row .q { font-size: 14px; font-weight: 500; }
.odds-row .price { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 600; transition: color 0.2s; }
.odds-row .price.up { color: var(--gain); }
.odds-row .price.dn { color: var(--loss); }
.odds-track { height: 8px; border-radius: 999px; background: var(--bg-elev); overflow: hidden; display: flex; }
.odds-track .yes { background: linear-gradient(90deg, var(--brand-deep), var(--brand)); transition: width 0.6s ease; }
.odds-track .no { background: var(--bg-elev); }
.odds-row .meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--fg-dimmer); margin-top: 6px; font-family: 'JetBrains Mono', monospace; }

/* ============ responsive ============ */
@media (max-width: 860px) {
  .exec-grid, .ob-wrap, .strat-grid, .chal-grid { grid-template-columns: 1fr; }
  .strat-curve { grid-column: auto; }
  .pipe { flex-direction: column; gap: 8px; }
  .pipe-connect { flex: 0 0 30px; width: 2px; height: 30px; align-self: center; margin: 0; }
  .pipe-connect i { width: 100%; height: 40%; background: linear-gradient(180deg, transparent, var(--brand), transparent); transform: translateY(-120%); }
  .pipe-connect.flow i { animation: pipeFlowV 0.9s ease forwards; }
  @keyframes pipeFlowV { to { transform: translateY(260%); } }
}
@media (max-width: 600px) { .sig { padding: 80px 0; } .sig-panel { padding: 22px; } .sig-readout { gap: 24px; } .sig-readout .r .v { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) {
  .strat-path { stroke-dashoffset: 0; animation: none; }
  .pipe-connect i { display: none; }
}
