/* The trade terminal and the agents board share the console's frame (css/console.css) and these blocks. */

.ctop .tabs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(12, 14, 17, .06); margin-right: auto; }
.ctop .tabs a { text-decoration: none; font-size: 13px; padding: 6px 12px; border-radius: 9px; color: var(--slate); white-space: nowrap; }
.ctop .tabs a[aria-current='page'] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .3); }
.ctop .tabs + .crumbs { display: none; }
@media (max-width: 760px) { .ctop .tabs a { padding: 6px 9px; font-size: 12.5px; } .ctop .brand span { display: none; } }

/* terminal grid */
.tgrid { display: grid; grid-template-columns: 240px minmax(0, 1fr) 340px; gap: 14px; padding: 14px clamp(12px, 2vw, 22px) 22px; min-height: calc(100svh - 62px); align-items: start; }
.watch { position: sticky; top: 76px; max-height: calc(100svh - 90px); }
.wl { display: grid; gap: 2px; }
.wl button { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; width: 100%; text-align: left; padding: 9px 10px; border-radius: 11px; border: 1px solid transparent; background: none; font: inherit; color: inherit; cursor: pointer; }
.wl button:hover { background: rgba(255, 255, 255, .55); }
.wl button[aria-current='true'] { background: #fff; border-color: rgba(111, 183, 233, .5); box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .35); }
.wl b { font-size: 13.5px; font-weight: 640; }
.wl small { font-size: 11.5px; color: var(--stone); grid-column: 1; }
.wl .px { font-family: var(--mono); font-size: 12.5px; text-align: right; }
.wl .ch { font-family: var(--mono); font-size: 11px; text-align: right; grid-column: 2; }
.up { color: #23885a; } .dn { color: #c2463f; }
.mid { display: grid; gap: 14px; min-width: 0; }
.quote-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 24px; padding: 18px 20px 6px; }
.quote-head .sym { font-size: 28px; font-weight: 680; letter-spacing: -.03em; line-height: 1; }
.quote-head .nm { font-size: 13px; color: var(--stone); }
.quote-head .big { font-family: var(--mono); font-size: 28px; font-weight: 520; letter-spacing: -.03em; line-height: 1; }
.quote-head .chg { font-family: var(--mono); font-size: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 20px 16px; }
.kpi { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .45); border: 1px solid rgba(12, 14, 17, .05); }
.kpi span { display: block; font-size: 11px; color: var(--stone); letter-spacing: .02em; }
.kpi b { font-family: var(--mono); font-size: 14px; font-weight: 540; }
.kpi.warn b { color: #a46a12; }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chart-card { padding: 10px 12px 12px; }
.chart-tools { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; }
.chart-tools .carved { margin-left: auto; font-size: 10px; opacity: .55; }
.chart { position: relative; height: clamp(260px, 42vh, 440px); }
.chart canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart .ohlc { position: absolute; left: 10px; top: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--slate); pointer-events: none; }
.chart .msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--stone); font-size: 13px; }
.tape { padding: 4px 16px 14px; }
.tape table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.tape th { text-align: left; font-family: var(--sans); font-weight: 560; font-size: 11px; color: var(--stone); padding: 8px 6px; border-bottom: 1px solid rgba(12, 14, 17, .08); }
.tape td { padding: 6px; border-bottom: 1px dashed rgba(12, 14, 17, .06); }
.tape td:last-child, .tape th:last-child { text-align: right; }
.ticket { position: sticky; top: 76px; }
.ticket .pb { padding-top: 0; }
.side-tog { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: rgba(12, 14, 17, .06); margin-bottom: 14px; }
.side-tog button { border: 0; height: 38px; border-radius: 10px; background: none; font-weight: 600; font-size: 14px; color: var(--slate); }
.side-tog button[aria-pressed='true'][data-side='buy'] { background: linear-gradient(180deg, #4fbf8a, #2f9a66); color: #fff; }
.side-tog button[aria-pressed='true'][data-side='sell'] { background: linear-gradient(180deg, #e27d76, #c4504a); color: #fff; }
.amt-box { display: flex; align-items: center; gap: 8px; border-radius: 14px; border: 1px solid rgba(12, 14, 17, .12); background: rgba(255, 255, 255, .8); padding: 4px 6px 4px 14px; }
.amt-box input { flex: 1; min-width: 0; height: 46px; border: 0; background: none; font: inherit; font-size: 20px; font-family: var(--mono); outline: none; }
.amt-box span { font-family: var(--mono); font-size: 13px; color: var(--stone); }
.quick { display: flex; gap: 6px; margin: 8px 0 14px; flex-wrap: wrap; }
.quick button { border: 1px solid rgba(12, 14, 17, .1); background: rgba(255, 255, 255, .6); border-radius: 99px; padding: 5px 10px; font-size: 12px; font-family: var(--mono); }
.preview { border-radius: 14px; padding: 12px; background: rgba(255, 255, 255, .5); border: 1px solid rgba(12, 14, 17, .06); font-size: 13px; }
.preview .row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.preview .row span:first-child { color: var(--stone); }
.preview .row b { font-family: var(--mono); font-weight: 520; font-size: 12.5px; }
.preview .ck { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preview .ckp { background: rgba(12, 14, 17, .05); color: var(--slate); }
.ticket .go { display: grid; gap: 8px; margin-top: 12px; }
.ticket .go .btn { width: 100%; }
.mobile-trade { display: none; }

@media (max-width: 1180px) {
  .tgrid { grid-template-columns: minmax(0, 1fr) 330px; }
  .watch { grid-column: 1 / -1; position: static; max-height: none; }
  .watch .pb { overflow-x: auto; }
  .wl { grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); }
}
@media (max-width: 860px) {
  .tgrid { grid-template-columns: 1fr; padding: 10px 10px 100px; }
  .ticket { position: static; display: none; }
  .ticket.open { display: flex; position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; z-index: 70; max-height: 86svh; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
  .ticket.open .pb { overflow-y: auto; }
  .mobile-trade { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60; padding: 8px; border-radius: 18px; background: rgba(250, 251, 252, .85); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .45); }
  .mobile-trade .btn { width: 100%; }
  body.console .companion { display: none; }
  .wl { grid-auto-columns: minmax(132px, 1fr); }
  .quote-head .sym, .quote-head .big { font-size: 24px; }
}

/* agents board */
.agrid { padding: 14px clamp(12px, 2vw, 22px) 40px; display: grid; gap: 14px; max-width: 1400px; margin: 0 auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { padding: 14px 16px; border-radius: 16px; }
.tile span { display: block; font-size: 11.5px; color: var(--stone); }
.tile b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 560; letter-spacing: -.03em; margin-top: 4px; }
.tile small { font-size: 11.5px; color: var(--stone); }
.board { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 980px) { .board { grid-template-columns: 1fr; } }
.lb { width: 100%; border-collapse: collapse; font-size: 13px; }
.lb th { text-align: left; font-weight: 560; font-size: 11px; color: var(--stone); padding: 10px 8px; border-bottom: 1px solid rgba(12, 14, 17, .08); white-space: nowrap; }
.lb td { padding: 10px 8px; border-bottom: 1px dashed rgba(12, 14, 17, .07); vertical-align: middle; }
.lb td.num, .lb th.num { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.lb .rank { font-family: var(--carved); font-size: 14px; width: 26px; color: var(--stone); }
.lb .agent { display: flex; align-items: center; gap: 10px; }
.lb .agent .orb { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #d8dde2 60%, #aab2ba); box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .15); display: grid; place-items: center; flex: none; }
.lb .agent .orb i { width: 16px; height: 10px; border-radius: 5px; background: #0c0e11; position: relative; }
.lb .agent .orb i::before, .lb .agent .orb i::after { content: ''; position: absolute; top: 3px; width: 2px; height: 4px; border-radius: 2px; background: #fff; }
.lb .agent .orb i::before { left: 4px; } .lb .agent .orb i::after { right: 4px; }
.lb .agent b { display: block; font-size: 13px; }
.lb .agent small { font-size: 11px; color: var(--stone); font-family: var(--mono); }
.bar-mini { height: 6px; border-radius: 6px; background: rgba(12, 14, 17, .07); overflow: hidden; min-width: 60px; }
.bar-mini i { display: block; height: 100%; background: var(--dawn); }
.lb-wrap { overflow-x: auto; }
.feed2 { display: grid; gap: 6px; }
.ev { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .45); border: 1px solid rgba(12, 14, 17, .05); font-size: 13px; }
.ev .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: #3fae7a; }
.ev .ic.m { background: #7c66d6; } .ev .ic.a { background: linear-gradient(140deg, #9d8be0, #e59a6c); } .ev .ic.c { background: #9aa1a9; }
.ev .ic svg { width: 14px; height: 14px; }
.ev b { font-weight: 600; } .ev small { display: block; font-size: 11.5px; color: var(--stone); }
.ev time { font-family: var(--mono); font-size: 11px; color: var(--stone); white-space: nowrap; }
.burn-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .burn-row { grid-template-columns: 1fr; } .lb .hide-s { display: none; } }
.agrid .ph, .mid .ph { display: flex; align-items: center; gap: 10px; }
.agrid .ph h2, .mid .ph h2 { margin: 0; letter-spacing: -.01em; font-weight: 620; }

.ctop .gh-btn { width: 36px; height: 36px; color: var(--slate); }
.ctop .gh-btn:hover { background: rgba(255, 255, 255, .6); }
@media (max-width: 760px) { .ctop .tabs a[href="/docs"] { display: none; } }

/* watchlist rows and the quote head carry the stock's mark */
.wl button { grid-template-columns: auto 1fr auto; column-gap: 10px; }
.wl button .tk { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 50%; }
.wl small { grid-column: 2; }
.wl .ch { grid-column: 3; }
.quote-head #qTok { display: flex; align-self: center; margin-right: -12px; }
.quote-head #qTok .tk { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(140deg, #5b6470, #20252c); }
