:root {
  --bg: #09060f; --panel: #100b1a; --panel2: #171024; --line: #261b3a; --text: #f4f0fb; --muted: #9a8fb3;
  --blue: #a855f7; --blue-dim: #3b1a66; --pink: #ff3d9a; --cyan: #22d3ee; --grad: linear-gradient(135deg, #8b5cf6 0%, #d946ef 55%, #ff3d9a 100%); --on-accent: #fff; --green: #22c55e; --red: #ef4444; --amber: #f5a524;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, -apple-system, Segoe UI, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.top { display: flex; align-items: center; gap: 20px; padding: 0 16px; height: 52px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.top nav { display: flex; gap: 16px; color: var(--muted); }
.top nav a.on, .top nav a:hover { color: var(--text); }
.search { position: relative; flex: 1; max-width: 460px; margin-left: auto; }
.search input { width: 100%; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); outline: none; }
.search input:focus { border-color: var(--blue); }
.results { position: absolute; top: 40px; left: 0; right: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 12px 30px #000a; }
.results a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; }
.results a:hover { background: var(--blue-dim); }
.pill { font-size: 11px; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.paper { color: var(--blue); border-color: var(--blue-dim); background: #1b0f30; }
.muted { color: var(--muted); } .up { color: var(--green); } .down { color: var(--red); } .mono { font-family: var(--mono); }

/* home */
.hero { max-width: 760px; margin: 70px auto 30px; padding: 0 16px; text-align: center; }
.hero h1 { font-size: 44px; line-height: 1.05; margin: 14px 0; letter-spacing: -.02em; }
.hero p { color: var(--muted); font-size: 16px; }
.bigsearch { display: flex; gap: 8px; margin-top: 24px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.bigsearch input { flex: 1; background: transparent; border: 0; outline: none; padding: 0 10px; height: 40px; }
.btn { height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; }
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--grad); color: var(--on-accent); border-color: transparent; font-weight: 600; box-shadow: 0 6px 22px #d946ef38; }
.btn.primary:hover { filter: brightness(1.12); box-shadow: 0 8px 28px #ff3d9a55; }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn:disabled { opacity: .5; cursor: default; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 28px 0; }
.step { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel); }
.step b { color: var(--blue); font-family: var(--mono); }
.sec-title { margin: 26px 0 10px; font-size: 13px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }

/* lista de tokens */
.tok { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tok:hover { background: var(--panel2); }
.tok.on { background: var(--blue-dim); }
.tok img, .ph { width: 30px; height: 30px; border-radius: 50%; background: var(--panel2); flex: none; object-fit: cover; }
.tok .n { flex: 1; min-width: 0; } .tok .n b { display: block; } .tok .n span { font-size: 12px; color: var(--muted); }
.tok .r { text-align: right; font-size: 12px; }

/* pagina do token */
.tokpage { display: grid; grid-template-columns: 270px minmax(0, 1fr) 360px; min-height: calc(100vh - 52px); }
.col { border-right: 1px solid var(--line); min-width: 0; }
.col.right { border-right: 0; border-left: 1px solid var(--line); padding: 14px; }
.col.left { overflow-y: auto; max-height: calc(100vh - 52px); position: sticky; top: 52px; }
.thead { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.thead .name { display: flex; align-items: center; gap: 10px; margin-right: 8px; }
.stat span { display: block; font-size: 11px; color: var(--muted); } .stat b { font-size: 14px; }
.tfs { display: flex; gap: 4px; padding: 8px 16px; }
.tfs button { background: transparent; border: 0; padding: 4px 9px; border-radius: 6px; color: var(--muted); cursor: pointer; }
.tfs button.on { background: var(--blue-dim); color: #fff; }
#chart { height: 400px; margin: 0 8px; }
.tabs { display: flex; gap: 4px; padding: 0 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 8px; }
.tabs button { background: transparent; border: 0; padding: 12px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: #fff; border-color: var(--pink); }
.tabbody { padding: 16px; }
.card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px; margin-bottom: 12px; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border: 0; } .kv span { color: var(--muted); }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }
.badge.low { color: var(--green); border-color: #14532d; } .badge.mid { color: var(--amber); border-color: #5b3d0a; } .badge.high { color: var(--red); border-color: #5b1a1a; }

/* criador de estrategia */
.presets { display: grid; gap: 8px; margin: 10px 0; }
.preset { text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); padding: 10px 12px; cursor: pointer; }
.preset.on { border-color: var(--blue); background: #1b0f30; } .preset b { display: block; } .preset span { font-size: 12px; color: var(--muted); }
.field { display: block; margin: 8px 0; } .field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.field input, textarea { width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); outline: none; }
textarea { height: 74px; padding: 8px 10px; resize: vertical; }
.field input:focus, textarea:focus { border-color: var(--blue); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rule { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: var(--panel2); }
.rule .head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.rule .line { display: flex; gap: 8px; font-size: 13px; } .rule .line em { font-style: normal; color: var(--blue); font-family: var(--mono); width: 38px; flex: none; }
.state { font-size: 11px; font-family: var(--mono); color: var(--muted); }
.state.armed { color: var(--green); } .state.completed { color: var(--blue); } .state.disabled, .state.paused { color: var(--amber); }

/* estrategias */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.scard { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px; }
.scard:hover { border-color: var(--blue); }
.scard h3 { margin: 0 0 4px; font-size: 15px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px; margin: 14px 0; }
.two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.log { font-size: 13px; } .log .it { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--muted); }
.dot.fill { background: var(--green); } .dot.block { background: var(--amber); }
.bar { height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--grad); }
table { width: 100%; border-collapse: collapse; font-size: 13px; } th { text-align: left; color: var(--muted); font-weight: 500; } td, th { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.empty { color: var(--muted); padding: 20px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--blue); padding: 10px 16px; border-radius: 10px; z-index: 80; max-width: 90vw; }
.toast.err { border-color: var(--red); }
.note { font-size: 12px; color: var(--muted); }
.wbtn { height: 32px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
.wbtn.on { border-color: var(--blue-dim); background: #1b0f30; color: var(--blue); }
.wlist { display: grid; gap: 8px; margin: 12px 0; }
.wopt { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); cursor: pointer; width: 100%; text-align: left; }
.wopt:hover { border-color: var(--blue); } .wopt.off { opacity: .6; cursor: default; }
.addr { word-break: break-all; }
.pill.real { color: var(--amber); border-color: #5b3d0a; background: #1c1405; }
.pill.pend { color: #1a1000; background: var(--amber); border-color: var(--amber); font-weight: 600; }
.dot.order { background: var(--blue); }
.livebox { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px; border: 1px solid #5b3d0a; border-radius: 10px; background: #1c1405; cursor: pointer; }
.livebox input { width: auto; height: auto; margin-top: 4px; }
.btn.primary.real { background: var(--amber); border-color: var(--amber); color: #1a1000; box-shadow: none; }
.pendcard { border-color: var(--amber); background: #1c1405; }
.warnbox { margin-top: 12px; padding: 10px 12px; border: 1px solid #7f1d1d; border-radius: 10px; background: #1f0a0a; color: #fca5a5; font-size: 13px; }
.warnbox .ack { display: flex; gap: 8px; align-items: center; margin-top: 8px; color: var(--text); cursor: pointer; }
.overlay { position: fixed; inset: 0; background: #000b; display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.modal { width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }

@media (max-width: 1050px) {
  .tokpage { grid-template-columns: 1fr; } .col.left { display: none; } .col.right { border-left: 0; border-top: 1px solid var(--line); }
  .steps, .stats { grid-template-columns: repeat(2, 1fr); } .two { grid-template-columns: 1fr; } .hero h1 { font-size: 32px; }
  .top nav { display: none; }
}

/* ---- AI emphasis ---- */
.spark { color: var(--blue); vertical-align: -2px; flex: none; }
.aibadge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid #7a3fd0; border-radius: 999px; background: #1b0f30; color: #eadbff; font-size: 12px; }
.hero .aibadge { margin-bottom: 4px; }
.hero h1 { font-size: 54px; }
.hero h1 em, .howhead h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero { position: relative; }
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; background: radial-gradient(60% 100% at 50% 0%, #8b5cf633, transparent 70%), radial-gradient(40% 80% at 85% 0%, #ff3d9a22, transparent 70%); pointer-events: none; z-index: -1; }
.aibox { display: flex; align-items: center; gap: 10px; margin-top: 26px; padding: 8px 8px 8px 14px; border: 1px solid #5b2a9a; border-radius: 16px; background: linear-gradient(180deg, #1d1035, #120a20); box-shadow: 0 0 0 4px #a855f714, 0 10px 40px #a855f71f; }
.aibox input { flex: 1; min-width: 0; height: 46px; background: transparent; border: 0; outline: none; font-size: 15px; }
.aibox .btn { height: 44px; padding: 0 20px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.chips.small { justify-content: flex-start; margin: 8px 0 0; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; font-size: 12px; text-align: left; max-width: 100%; }
.chip:hover { border-color: var(--blue); color: var(--text); }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 22px; color: var(--muted); font-size: 12px; }
.trust span::before { content: "\2713\00a0"; color: var(--blue); }
.pickhint { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; margin: 18px 0 4px; border: 1px solid var(--blue); border-radius: 12px; background: #1b0f30; }
.attn { border-color: var(--blue) !important; box-shadow: 0 0 0 3px #a855f726; }
.hero { margin-top: 56px; }
.hero p b { color: var(--text); }

.aihead { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.aihead b { font-size: 15px; }
.aitext { height: 96px; border-color: #5b2a9a; background: #120a20; }
.aibtn { width: 100%; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.aibtn .spark { color: #fff; }
.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.srcnote { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* ---- how it works ---- */
.how { max-width: 980px; }
.howhead { text-align: center; padding: 44px 0 8px; }
.howhead h1 { font-size: 42px; line-height: 1.08; margin: 14px 0; letter-spacing: -.02em; }
.howhead p { color: var(--muted); font-size: 16px; max-width: 640px; margin: 0 auto 18px; }
.howhead .row { justify-content: center !important; }
.howhead .btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; }
.howgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.howgrid.three { grid-template-columns: repeat(3, 1fr); }
.howgrid .card { margin: 0; }
.howgrid h3 { margin: 6px 0; }
.howgrid p { font-size: 13px; margin: 0; }
.num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; }
.howlist { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.howlist li { color: var(--muted); }
.howlist b { color: var(--text); }
.how .kv { gap: 14px; align-items: baseline; }
.how .kv > b { min-width: 120px; flex: none; }
.how .kv > span { text-align: right; }
.cta { text-align: center; margin: 36px 0 10px; padding: 30px 16px; border: 1px solid #5b2a9a; border-radius: 16px; background: linear-gradient(180deg, #1d1035, #120a20); }
.cta h2 { margin: 0 0 4px; }
.cta .btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; height: 40px; padding: 0 20px; }

@media (max-width: 1050px) {
  .howgrid, .howgrid.three { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 36px; }
  .aibox { flex-direction: column; align-items: stretch; padding: 12px; }
  .how .kv { flex-direction: column; gap: 2px; } .how .kv > span { text-align: left; }
}
@media (max-width: 640px) { .howgrid, .howgrid.three { grid-template-columns: 1fr; } }

/* fixes */
[hidden] { display: none !important; }
.btn.primary .spark { color: #fff; }

/* ---- chat-style AI box with template options inside ---- */
.aichat { border: 1px solid #5b2a9a; border-radius: 12px; background: #120a20; padding: 6px 8px 8px; }
.aichat:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #a855f71f; }
.aichat .aitext { border: 0; background: transparent; height: 78px; padding: 6px 4px; resize: none; }
.aichat .aitext:focus { border: 0; }
.aibar { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.tpls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.tplabel { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.chip.tpl { font-size: 11px; padding: 4px 10px; }
.chip.tpl.on { border-color: var(--blue); background: #1b0f30; color: var(--text); }
.aichat .aibtn { width: auto; margin: 0; height: 34px; padding: 0 14px; flex: none; }
