/* Noctis Agentic: the owner console (console/index.html, assets/js/console.js) -- a mockup. It loads
   tokens.css and site.css, so cards, tabs, chips, buttons and tables are the site's own; these rules lay
   out the console: a terminal like a trading screen, with the agent bar on top, the chart and the
   activity tabs, and the limits form beside them. Every colour is a token. */

body { margin: 0; }
#cx { min-height: 100vh; }
#cx :focus-visible { outline: 2px solid var(--c1); outline-offset: 2px; }
#cx a { color: var(--c1); text-decoration: none; }
#cx a:hover { color: var(--ink); }
.cx-boot { padding: 40px; font: 600 11px/1 var(--mono); letter-spacing: .1em; color: var(--t4); }

/* the top bar and the mockup strip */
.cx-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 22px; height: 60px; padding: 0 20px; background: var(--desk); border-bottom: 2px solid var(--rule); }
#cx .cx-brand { display: flex; align-items: center; gap: 12px; flex: none; color: var(--ink); }
.cx-lockup { width: 108px; height: auto; }
.cx-brand-t { font-size: calc(14px * var(--pxs)); line-height: 1; color: var(--c4); }
.cx-navs { display: flex; align-items: stretch; height: 100%; overflow-x: auto; scrollbar-width: none; }
.cx-navs::-webkit-scrollbar { display: none; }
#cx .cx-nav { display: flex; align-items: center; padding: 0 14px; border-bottom: 3px solid transparent; font: 400 calc(12px * var(--pxs)) / 1 var(--pix); color: var(--t3); white-space: nowrap; }
#cx .cx-nav:hover { color: var(--ink); }
#cx .cx-nav.on { color: var(--c); border-bottom-color: var(--c); }
.cx-top-r { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: none; }
.cx-venue { padding: 6px 9px; border: 2px solid var(--rule-strong); font: 600 9.5px/1 var(--mono); letter-spacing: .08em; color: var(--t2); }
.cx-wallet { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 2px solid var(--green); background: var(--surface); font: 600 10.5px/1 var(--mono); color: var(--ink); }
.cx-wallet:hover { background: var(--hover); }
.cx-mock { display: flex; align-items: baseline; gap: 12px; padding: 9px 20px; background: var(--panel-2); border-bottom: 2px solid var(--c2); font: 500 12px/1.45 var(--body); color: var(--t3); }
.cx-mock .pix { flex: none; font-size: calc(13px * var(--pxs)); line-height: 1; color: var(--c2); }

/* the body: the side column and the main column */
.cx-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; padding: 20px; align-items: start; }
.cx-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 16px; }
.cx-card { padding: 16px 18px; }
.cx-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cx-acct { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-top: 12px; }
.cx-mini { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 4px; border: none; border-bottom: 1px solid var(--rule-faint); background: none; text-align: left; color: var(--t2); }
.cx-mini:hover, .cx-mini.on { background: var(--hover); }
.cx-mini.on { box-shadow: inset 3px 0 0 var(--c1); }
.cx-sdot { flex: none; width: 8px; height: 8px; }
#cx .cx-add { display: block; margin-top: 10px; font: 600 10px/1 var(--mono); letter-spacing: .08em; color: var(--c3); }
#cx .cx-back { font: 600 10px/1 var(--mono); color: var(--t4); }
.cx-two { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }

/* buttons */
.cx-primary { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border: none; background: var(--c3); color: var(--chip-fg); box-shadow: 3px 3px 0 var(--desk); font: 400 calc(12px * var(--pxs)) / 1 var(--pix); white-space: nowrap; }
.cx-primary:hover { filter: brightness(1.08); }
.cx-primary.big { width: 100%; height: 48px; font-size: calc(14px * var(--pxs)); }
.cx-primary.sm { height: 34px; padding: 0 12px; }
.cx-primary[aria-disabled="true"] { background: var(--bar-empty); color: var(--t4); box-shadow: none; cursor: default; filter: none; }
.cx-danger { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 12px; border: 2px solid var(--red); background: transparent; color: var(--red); font: 400 calc(11px * var(--pxs)) / 1 var(--pix); white-space: nowrap; }
.cx-danger:hover { background: var(--red); color: var(--chip-fg); }
.cx-danger.big { height: 46px; padding: 0 18px; }
.cx-danger[aria-disabled="true"], .btn-out[aria-disabled="true"] { opacity: .4; cursor: default; }
.cx-link, .cx-link-danger { padding: 6px 0; border: none; background: none; font: 600 10px/1 var(--mono); letter-spacing: .08em; color: var(--c2); }
.cx-link-danger { margin-top: 12px; color: var(--red); }
.cx-close { height: 28px; padding: 0 9px; border: 2px solid var(--rule-strong); background: transparent; font: 600 9.5px/1 var(--mono); letter-spacing: .06em; color: var(--t2); }
.cx-close:hover { border-color: var(--red); color: var(--red); }

/* the agent bar, like a market's price bar */
.cx-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 12px 16px; }
.cx-pick { position: relative; }
.cx-agent { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 6px; border: 2px solid var(--rule-strong); background: var(--panel-3); color: var(--ink); }
.cx-agent .pix { font-size: calc(18px * var(--pxs)); line-height: 1; }
.cx-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 280px; padding: 8px; border: 2px solid var(--rule-strong); background: var(--surface); box-shadow: 4px 4px 0 var(--desk); }
.cx-stats { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.cx-stat { display: flex; flex-direction: column; gap: 5px; }
.cx-stat-v { font: 600 14px/1.3 var(--mono); }
.cx-bar-r { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* the terminal: chart and tabs on the left, the limits form on the right */
.cx-term { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.cx-term-l { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cx-chart .card-h { padding: 10px 18px; }
.cx-svg { display: block; width: 100%; height: auto; padding: 6px 0; }
.cx-eq { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.cx-eq.up { stroke: var(--chart-up); } .cx-eq.down { stroke: var(--chart-down); }
.cx-rf { fill: none; stroke: var(--c2); stroke-width: 1.5; stroke-dasharray: 5 5; }
.cx-chart-hid { padding: 60px 18px; text-align: center; font: 400 13px/1.5 var(--body); }
.cx-btm { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cx-btm::-webkit-scrollbar { display: none; }
.cx-btm .thead, .cx-btm .trow { min-width: 740px; }
.cx-btm .cell { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cx-btm .cell.r { justify-content: flex-end; text-align: right; }
.cx-side-b { padding: 3px 6px; font: 700 9px/1 var(--mono); letter-spacing: .06em; }
.cx-side-b.l { background: var(--green); color: var(--chip-fg); } .cx-side-b.s { background: var(--red); color: var(--chip-fg); }
.cx-pad { padding: 16px 18px; }

/* the limits form, like an order form */
.cx-form { position: sticky; top: 80px; }
.cx-form-b { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; }
.cx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cx-pill { height: 36px; border: 2px solid var(--rule-strong); background: var(--panel-3); font: 600 10.5px/1 var(--mono); color: var(--ink); }
.cx-pill:hover { border-color: var(--c2); }
.cx-l { margin-top: 6px; }
.cx-seg { display: flex; border: 2px solid var(--rule-strong); background: var(--panel-3); }
.cx-seg button { flex: 1; height: 34px; padding: 0 8px; border: none; background: none; font: 600 10.5px/1 var(--mono); color: var(--t3); white-space: nowrap; }
.cx-seg button.on { background: var(--c3); color: var(--chip-fg); }
.card-h-note .cx-seg { display: inline-flex; }
.card-h-note .cx-seg button { height: 26px; }
.cx-mkts { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-mkt { height: 32px; padding: 0 10px; border: 2px solid var(--rule-strong); background: none; font: 600 10.5px/1 var(--mono); color: var(--t3); }
.cx-mkt.on { border-color: var(--c3); color: var(--c3); }
.cx-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-wide { grid-column: 1 / -1; }
.cx-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cx-in { display: flex; align-items: center; height: 36px; border: 2px solid var(--rule-strong); background: var(--panel-3); }
.cx-in:focus-within { border-color: var(--c1); }
.cx-in input, .cx-in select { flex: 1; min-width: 0; height: 100%; padding: 0 9px; border: none; background: none; font: 600 12px/1 var(--mono); color: var(--ink); outline: none; }
.cx-in select option { background: var(--surface); }
.cx-unit { flex: none; padding: 0 8px; font: 600 9px/1 var(--mono); letter-spacing: .06em; color: var(--t5); white-space: nowrap; }
.cx-in.sm { display: inline-flex; width: 110px; height: 30px; }
.cx-details { display: grid; gap: 8px; margin-top: 4px; padding: 12px; border: 2px solid var(--rule-2); background: var(--panel-2); font: 500 10.5px/1.35 var(--mono); color: var(--t4); }
.cx-details .kv > :last-child { color: var(--ink); }

/* connect an agent */
.cx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.cx-h1 { margin-top: 8px; font-size: calc(30px * var(--pxs)); line-height: 1; }
.cx-head .p13 { max-width: 640px; }
.cx-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cx-path { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 18px; border-top: 3px solid var(--c); text-align: left; color: var(--ink); }
.cx-path .pix { font-size: calc(17px * var(--pxs)); line-height: 1; color: var(--c); }
.cx-path.on { background: var(--hover); box-shadow: 4px 4px 0 var(--c); }
.cx-wiz { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cx-stepper { display: flex; overflow-x: auto; scrollbar-width: none; border-bottom: 2px solid var(--rule-2); }
.cx-stepper::-webkit-scrollbar { display: none; }
.cx-step { display: flex; align-items: center; gap: 8px; flex: 1; min-height: 46px; padding: 0 12px; border: none; border-bottom: 3px solid transparent; background: none; font: 600 10.5px/1 var(--mono); color: var(--t4); white-space: nowrap; }
.cx-step .pix { font-size: 14px; }
.cx-step.on { color: var(--c3); border-bottom-color: var(--c3); }
.cx-step.done { color: var(--t2); }
.cx-wiz-b { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.cx-wiz-b .cx-primary { align-self: flex-start; }
.cx-wrap { white-space: normal; }
.cx-key { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid var(--rule-strong); background: var(--panel-3); }
.cx-key .ar-mono { flex: 1; overflow-wrap: anywhere; }
.cx-ok { padding: 10px 12px; border: 2px solid var(--green); font: 600 10.5px/1.3 var(--mono); letter-spacing: .06em; color: var(--green); }
.cx-wait { display: flex; align-items: center; gap: 8px; font: 600 10.5px/1 var(--mono); color: var(--amber); }
.cx-wait .dot { background: var(--amber); }

/* funds */
.cx-two-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cx-two-cards .cx-card { display: flex; flex-direction: column; gap: 12px; }
.cx-steps3 { display: flex; gap: 14px; font: 600 9.5px/1 var(--mono); letter-spacing: .08em; color: var(--t5); }
.cx-steps3 .on { color: var(--c3); }

/* modals */
.cx-ov { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(7, 9, 12, .78); }
.cx-modal { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 440px; padding: 22px; box-shadow: 6px 6px 0 var(--desk); }
.cx-modal h2 { font-size: calc(22px * var(--pxs)); line-height: 1; }
.cx-chains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 2px solid var(--rule-strong); }
.cx-chains button { height: 38px; border: none; background: var(--panel-3); font: 600 9.5px/1 var(--mono); color: var(--t3); }
.cx-chains button.on { background: var(--c3); color: var(--chip-fg); }
.cx-chains button[aria-disabled="true"] { color: var(--t5); cursor: default; }
.cx-wallets { display: grid; gap: 8px; }
.cx-wl { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 14px; border: 2px solid var(--rule-strong); background: var(--panel-3); color: var(--ink); }
.cx-wl:hover { border-color: var(--c3); }
.cx-wl .pix { font-size: calc(15px * var(--pxs)); }
.cx-wsteps { margin: 0; padding-left: 18px; display: grid; gap: 8px; font: 500 12px/1.4 var(--mono); color: var(--t5); }
.cx-wsteps .on { color: var(--amber); } .cx-wsteps .done { color: var(--green); }
.cx-levv { font-size: calc(46px * var(--pxs)); line-height: 1; text-align: center; color: var(--c3); }
.cx-modal input[type="range"] { width: 100%; accent-color: var(--c3); }
.cx-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.cx-presets button { height: 34px; border: 2px solid var(--rule-strong); background: var(--panel-3); font: 600 11px/1 var(--mono); color: var(--t2); }
.cx-presets button.on { border-color: var(--c3); color: var(--c3); }
.cx-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 40px; }
.cx-empty h2 { font-size: calc(26px * var(--pxs)); line-height: 1.1; }
.cx-empty .cx-primary { width: auto; padding: 0 22px; }
.cx-toast { position: fixed; top: 74px; right: 20px; z-index: 95; max-width: min(440px, calc(100vw - 40px)); padding: 12px 16px; border: 2px solid var(--green); background: var(--desk); font: 600 12px/1.35 var(--mono); color: var(--green); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .15s, transform .15s; }
.cx-toast.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .cx-toast { transition: none; } }

/* narrower screens, then the phone */
@media (max-width: 1250px) {
  .cx-term { grid-template-columns: minmax(0, 1fr); }
  .cx-form { position: static; }
  .cx-wiz, .cx-two-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 999px) {
  .cx-top { gap: 10px; height: auto; min-height: 56px; flex-wrap: wrap; padding: 8px 14px; }
  .cx-navs { order: 3; flex-basis: 100%; height: 44px; }
  .cx-venue { display: none; }
  .cx-body { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .cx-side { position: static; order: 2; }
  .cx-main { order: 1; }
  .cx-paths { grid-template-columns: minmax(0, 1fr); }
  .cx-bar-r { margin-left: 0; flex-wrap: wrap; }
  .cx-head { flex-direction: column; align-items: flex-start; }
  .cx-grid2 { grid-template-columns: minmax(0, 1fr); }
  .cx-mock { padding: 8px 14px; }
  .cx-primary, .cx-danger, .btn-out, .cx-close, .cx-mkt, .cx-seg button { min-height: 44px; }
  .cx-toast { top: auto; bottom: 20px; right: 14px; left: 14px; }
}
