/* console: rail round (Nov 5) */
/* The right rail: Trade panel, then Automations. With those two (the default) the rail is a grid on the left side's own
   rows: Trade lines up with the chart row, Automations with the bottom tabs, and both follow the chart / tabs splitter
   (--cx-top). The old Actions list is gone (its actions moved to the token strip and the All stats drawer). An
   automation row swaps the whole rail for that engine's panel (.cx-ap, below). */

/* ---------- rail: two blocks on the left side's rows ---------- */
@media (min-width: 1101px) {
  .cx-grid { position: relative; }
  .cx-grid:has(> .cx-left:not(.one)) > .cx-rail.al2 { display: grid; grid-template-rows: var(--cx-top, 60%) minmax(0, 1fr); row-gap: var(--cx-g); overflow: hidden; }
  .cx-grid:has(> .cx-left:not(.one)) > .cx-rail.al2 > .cx-rs { min-height: 0; overflow: hidden; }
  .cx-grid:has(> .cx-left:not(.one)) > .cx-rail.al2 > .cx-rs > .cx-pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .cx-grid:has(> .cx-left:not(.one)) > .cx-rail.al2 > .cx-rs.s-autos > .cx-pane { display: flex; flex-direction: column; }
  /* Automations: spare height goes to the rows (54px is the floor), the list never leaves a gap under it */
  .cx-grid:has(> .cx-left:not(.one)) > .cx-rail.al2 > .cx-rs.s-autos .cx-autol { flex: 1 0 auto; grid-auto-rows: minmax(54px, 1fr); max-height: 100%; }
  .cx-grid:has(> .cx-left:not(.one)) > .cx-rail.al2 > .cx-rs.s-autos .cx-auto { height: auto; min-height: 54px; max-height: 76px; align-self: stretch; }
  .cx-grid:has(> .cx-left:not(.one)) > .cx-rail.al2 > .cx-rs.s-autos .cx-autol { align-content: start; }
  .cx-grid:has(> .cx-left:not(.one)) > .cx-rail.al2 > .cx-rs.s-autos .cx-asum { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .cx-rail.ap-off { visibility: hidden; }
}
.cx-rail .cx-zh { min-height: 32px; }

/* ---------- Trade panel in the rail: header, position, wallet set, Buy / Sell, amount, action, Smart settings (styles below) ---------- */
html:root .cx .cx-rail .cx-trade .trade.rp-trade { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 12px 12px; align-content: start; }
html:root .cx .cx-rail .cx-trade .trade.rp-trade > * { min-width: 0; margin: 0; }
html:root .cx .cx-rail .cx-trade .trade.rp-trade .buyb { height: 36px; }

/* ---------- Share PnL in the All stats drawer header ---------- */
.cx-dh .cx-dshare { height: 28px; margin-right: 4px; gap: 6px; }

/* ---------- token strip: Liquidity, locks & burns, an icon button beside Claim fees ---------- */
.cx-acts .cx-btn.cx-liqb { width: 30px; padding: 0; justify-content: center; }
.cx-acts .cx-btn.cx-liqb.on { color: var(--ac-ice, var(--tx)); }

/* ---------- the automation panel: replaces the rail (same column, same height); its body scrolls ---------- */
.cx-grid > .cx-ap { position: absolute; z-index: 6; top: 0; bottom: 0; right: 0; width: var(--cx-rail, 340px); display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  isolation: isolate; border-radius: var(--cx-r); background: var(--cx-fz); box-shadow: var(--cx-edge), var(--fz-sh, 0 18px 40px -26px rgba(0,0,0,.7)); }
.cx-grid > .cx-ap::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; -webkit-backdrop-filter: var(--cx-blur); backdrop-filter: var(--cx-blur); }
.cx-grid.one > .cx-ap { left: 0; width: auto; }
.cx-aph { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; flex: none; height: 44px; padding: 0 6px 0 4px; box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); }
.cx-aph > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13.5px var(--f); letter-spacing: -.01em; }
.cx-aph .sp { flex: 1 1 0; min-width: 0; }
.cx-aph .cx-ib { flex: none; width: 28px; height: 28px; background: transparent; }
.cx-aph .cx-ib:hover { background: var(--cx-fill2); }
.cx-apbk .i { transform: rotate(180deg); }
.cx-apic { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; color: var(--cx-ice); background: color-mix(in srgb, var(--cx-ice) 9%, transparent); }
.cx-aph .cx-apl { flex: none; min-width: 0; padding: 0 8px; gap: 5px; }
.cx-aph { container-type: inline-size; }
@container (max-width: 320px) { .cx-aph .cx-apic { display: none; } }
.cx-aph .cx-sw { flex: none; }
.cx-apnav { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: none; margin: 8px 10px 0; }
.cx-apnav button { min-width: 0; padding: 0 4px; }
.cx-apb { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 10px 10px 14px; outline: none; }
.cx-apst { display: grid; gap: 8px; margin-bottom: 10px; }
.cx-apst .cx-asum { color: var(--tx3); font: 500 11.5px/1.35 var(--f); }
html:root[data-theme="light"] .cx-aph { box-shadow: inset 0 -1px 0 rgba(20,40,70,.07); }
html:root[data-theme="light"] .cx-apic { color: var(--ac); background: color-mix(in srgb, var(--ac) 10%, transparent); }
@media (max-width: 1100px) { .cx-grid > .cx-ap { display: none; } }

/* ---------- Automations: header count, big frosted rows ---------- */
.cx-acnt { display: inline-flex; align-items: center; gap: 6px; color: var(--tx3); font: 500 11.5px var(--f); font-variant-numeric: tabular-nums; }
.cx-acnt.on { color: var(--tx2); }
.cx-acnt.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 18%, transparent); }
.cx-autol { display: grid; gap: 0; padding: 0 6px 6px; }
.cx-auto { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 12px; align-items: center; column-gap: 10px; height: 54px; padding: 0 8px; border: 0; border-radius: 10px;
  background: none; color: var(--tx); font: 500 12.5px var(--f); text-align: left; cursor: pointer; transition: background .15s ease; }
.cx-auto + .cx-auto::before { content: ""; position: absolute; top: 0; left: 48px; right: 8px; height: 1px; background: rgba(255,255,255,.06); pointer-events: none; transition: opacity .15s ease; }
.cx-auto:is(:hover, .cur, :focus-visible)::before, .cx-auto:is(:hover, .cur, :focus-visible) + .cx-auto::before { opacity: 0; }
.cx-auto:hover, .cx-auto.cur { background: var(--cx-fill2); }
.cx-auto:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--cx-ice); }
.cx-aic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--cx-ice);
  background: color-mix(in srgb, var(--cx-ice) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cx-ice) 12%, transparent); transition: color .2s ease, background-color .2s ease; }
.cx-aic .i { display: block; }
.cx-auto:has(.cx-apl.on) .cx-aic { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--up) 18%, transparent); }
.cx-auto:has(.cx-apl.set) .cx-aic { color: var(--tx3); background: var(--cx-fill); box-shadow: none; }
.cx-auto .cx-at { gap: 3px; }
.cx-auto .cx-at b { font: 600 13.5px/1.2 var(--f); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-auto .cx-asum { font: 500 11.5px/1.25 var(--f); color: var(--tx3); }
.cx-auto .cx-apl { justify-self: end; }
.cx-apl.on i { box-shadow: 0 0 0 0 currentColor; }
.cx-chv { display: grid; place-items: center; color: var(--tx3); transition: color .15s ease, transform .15s ease; }
.cx-auto:hover .cx-chv, .cx-auto.cur .cx-chv { color: var(--tx2); transform: translateX(2px); }

/* ---------- the cards: one frosted column (its own solid backing), cards 8px apart, never overlapping ---------- */
.cx-cards { position: absolute; z-index: 38; right: 6px; bottom: 6px; max-height: calc(100% - 12px); width: min(356px, calc(100% - 24px));
  display: flex; flex-direction: column; padding: 6px; overflow: hidden; isolation: isolate; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01) 30%), rgba(13,16,22,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.06), 0 40px 90px -30px rgba(0,0,0,.95), 0 12px 30px -16px rgba(0,0,0,.7); }
.cx-cards::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; -webkit-backdrop-filter: blur(30px) saturate(1.2); backdrop-filter: blur(30px) saturate(1.2); }
.cx-cards:empty { display: none; }
/* it drops down from the token strip (top of the grid); with the right rail showing it sits just left of it: the rail stays clear */
@media (min-width: 1101px) { .cx-cards { top: 6px; bottom: auto; } .cx-body:has(> .cx-grid:not(.one) > .cx-rail) .cx-cards { right: calc(var(--cx-rail, 340px) + var(--cx-g) + 6px); } }
.cx-card { position: relative; display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; max-height: 440px; margin-top: 8px; overflow: hidden;
  border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025) 50%); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 0 1px rgba(255,255,255,.05); }
.cx-card:first-child { margin-top: 0; }
.cx-card.col { flex: none; }
.cx-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px var(--cx-ice); opacity: 0; transition: opacity .3s ease; }
.cx-ch { display: flex; align-items: center; gap: 8px; height: 40px; flex: none; padding: 0 4px 0 12px; cursor: pointer; box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); transition: box-shadow .2s ease, background .15s ease; }
.cx-card.col .cx-ch { box-shadow: inset 0 -1px 0 transparent; }
.cx-card.col .cx-ch:hover { background: rgba(255,255,255,.03); }
.cx-ch > .i { color: var(--cx-ice); flex: none; }
.cx-ch b { flex: none; font: 600 13px var(--f); letter-spacing: -.01em; white-space: nowrap; }
.cx-csum { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx3); font: 500 11.5px var(--f); font-variant-numeric: tabular-nums; }
.cx-card.col .cx-csum { display: block; }
.cx-card.col .cx-cexp { display: none; }
.cx-ch .sp { min-width: 0; }
.cx-ch .cx-ib { width: 28px; height: 28px; background: transparent; }
.cx-ch .cx-ib:hover { background: var(--cx-fill2); }
.cx-ctog .i { transform: rotate(180deg); transition: transform .2s ease; }
.cx-card.col .cx-ctog .i { transform: none; }
.cx-cexp { height: 24px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--tx3); font: 500 11.5px var(--f); cursor: pointer; transition: background .15s, color .15s; }
.cx-cexp:hover { background: var(--cx-fill2); color: var(--tx); }
/* the body folds with a grid-rows transition: 1fr open, 0fr folded */
.cx-cbw { display: grid; grid-template-rows: 1fr; flex: 1 1 auto; min-height: 0; transition: grid-template-rows .2s cubic-bezier(.4,0,.2,1); }
.cx-card.col .cx-cbw { grid-template-rows: 0fr; }
.cx-cb { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 12px; scrollbar-width: thin; transition: padding .2s cubic-bezier(.4,0,.2,1); }
.cx-card.col .cx-cb { padding-top: 0; padding-bottom: 0; overflow: hidden; }

/* the reused panes, compacted to one column */
.cx-cb .page { padding: 0 !important; margin: 0 !important; max-width: none !important; min-height: 0 !important; display: grid; gap: 10px; }
.cx-cb .ph, .cx-cb .tstrip { display: none !important; }
.cx-cb :is(.split, .g2, .g3) { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; margin: 0 !important; }
html:root .cx .cx-cb .card { margin: 0 !important; padding: 10px 12px !important; border: 0 !important; border-radius: 10px !important; background: var(--cx-fill) !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html:root .cx .cx-cb .card::before, html:root .cx .cx-cb .card::after { content: none !important; }
.cx-cb .kv > div { padding: 4px 0 !important; font-size: 12px !important; }
.cx-cb .field { margin-top: 8px; } .cx-cb .field .fl { font-size: 11.5px; } .cx-cb .field .fh { font-size: 11px; }
.cx-cb .inp { height: 34px !important; min-height: 0 !important; }
.cx-cb .btn { height: 30px; }
.cx-cb .presets button { height: 28px; }
.cx-cb p.muted, .cx-cb .hint { font-size: 11.5px; margin: 4px 0; }
.cx-cb .feed li { padding: 5px 0; font-size: 12px; }
.cx-cb .card > .ch { margin: 0 0 6px !important; padding: 0 !important; min-height: 0; }
.cx-cb .card > .ch h3 { font-size: 12.5px; }
.cx-cb .big-n { font-size: 22px; }
.cx-cb .row { flex-wrap: wrap; gap: 6px; }

/* motion: slide + fade in, a nudge when an open card is asked for again */
@keyframes cx-card-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes cx-card-ping { 0% { transform: none; } 30% { transform: translateX(-7px); } 62% { transform: translateX(3px); } 100% { transform: none; } }
.cx-card.in { animation: cx-card-in .2s cubic-bezier(.2,.7,.2,1) both; }
.cx-card.ping { animation: cx-card-ping .42s cubic-bezier(.3,.7,.3,1); }
.cx-card.ping::after { opacity: .55; transition: opacity .12s ease; }
@media (prefers-reduced-motion: reduce) {
  .cx-card.in, .cx-card.ping { animation: none; }
  .cx-cbw, .cx-cb, .cx-ctog .i, .cx-ch { transition: none; }
  .cx-auto, .cx-auto .cx-chv { transition: none; }
}

/* narrow screens: the console is one column; the cards become a fixed stack */
@media (max-width: 1100px) {
  .cx-cards { position: fixed; top: auto; bottom: calc(var(--cx-stb, 26px) + 10px); right: 10px; max-height: 70vh; z-index: 69; }
}

/* ---------- light theme ---------- */
html:root[data-theme="light"] .cx-cards { background: var(--pop-bg); box-shadow: var(--pop-sh); }
html:root[data-theme="light"] .cx-card { background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px rgba(20,40,70,.08), 0 1px 2px rgba(20,40,70,.05); }
html:root[data-theme="light"] .cx-card.col .cx-ch:hover { background: rgba(20,40,70,.03); }
html:root[data-theme="light"] .cx-card.col .cx-ch { box-shadow: inset 0 -1px 0 transparent; }
html:root[data-theme="light"] .cx-card::after { box-shadow: inset 0 0 0 1px var(--ac); }
html:root[data-theme="light"] .cx-ch { box-shadow: inset 0 -1px 0 rgba(20,40,70,.07); }
html:root[data-theme="light"] .cx-ch > .i { color: var(--ac); }
html:root[data-theme="light"] .cx-cb .card { background: rgba(20,40,70,.035) !important; }

/* ---------- Liquidity, locks & burns card: three small tabs, one part at a time ---------- */
.cx-ltab { display: grid; gap: 10px; }
.cx-ltab .cx-lts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-self: stretch; }
.cx-ltab .cx-lts button { height: 26px; }
.cx-ltab .cx-ltp > .g3 { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; }
.cx-ltab .cx-ltp > .g3 > :nth-child(3) { display: none; }                      /* Burn has its own tab: the full burn form */
.cx-ltab[data-cx-lt="liq"] .cx-ltp > .g3 > :nth-child(2), .cx-ltab[data-cx-lt="lock"] .cx-ltp > .g3 > :nth-child(1) { display: none; }
.cx-ltab[data-cx-lt="burn"] .cx-ltp.ll, .cx-ltab:not([data-cx-lt="burn"]) .cx-ltp.lb { display: none; }

/* ---------- light theme: rail rows ---------- */
html:root[data-theme="light"] .cx-auto + .cx-auto::before { background: rgba(20,40,70,.07); }
html:root[data-theme="light"] .cx-aic { color: var(--ac); background: color-mix(in srgb, var(--ac) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 14%, transparent); }
html:root[data-theme="light"] .cx-auto:has(.cx-apl.on) .cx-aic { color: var(--up); background: color-mix(in srgb, var(--up) 11%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--up) 18%, transparent); }
html:root[data-theme="light"] .cx-auto:has(.cx-apl.set) .cx-aic { color: var(--tx3); background: rgba(20,40,70,.04); box-shadow: none; }
html:root[data-theme="light"] .cx-apl.set { box-shadow: inset 0 0 0 1px rgba(20,40,70,.18); }
html:root[data-theme="light"] .cx-apl:not(.on):not(.set) { background: rgba(20,40,70,.05); }
html:root[data-theme="light"] .cx-auto:focus-visible { box-shadow: inset 0 0 0 1px var(--ac); }

/* trade panel order type: only Market | Limit now (no Ladder) — two equal halves, no empty third slot */
html:root[data-look] .ord-type, html:root[data-look] .seg.ord-type { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* ================= Trade panel (Nov 5): one frosted column, reference-app order ================= */
.rp-trade { position: relative; --tp-h: 30px; container: tp / inline-size; }
.rp-trade .sp { flex: 1 1 0; min-width: 0; }
/* header: Market | Limit tabs, then the 28px glass icon buttons */
.tp-hd { position: relative; display: flex; align-items: center; gap: 4px; height: 28px; }
.tp-tabs { display: flex; gap: 2px; height: 28px; padding: 2px; border-radius: 9px; background: var(--cx-fill); box-shadow: var(--cx-edge); }
.tp-tabs button { height: 24px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--tx3); font: 600 12px var(--f); cursor: pointer; transition: background .15s, color .15s; }
.tp-tabs button:hover { color: var(--tx); }
.tp-tabs button.on { color: var(--tx); background: var(--cx-fill2); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.tp-ib { display: grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: var(--cx-fill); box-shadow: var(--cx-edge); color: var(--tx3); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.tp-ib:hover, .tp-ib.on { color: var(--tx); background: var(--cx-fill2); }
.tp-ib.lit { color: var(--cx-ice); background: color-mix(in srgb, var(--cx-ice) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cx-ice) 22%, transparent); }
.tp-ib:focus-visible, .tp-tabs button:focus-visible, .tp-wc:focus-visible, .tp-sh:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--cx-ice); }
/* pop-overs: quick amounts, slippage, wallet set */
.tp-pop { position: absolute; z-index: 20; display: grid; gap: 8px; padding: 10px; border-radius: 12px; isolation: isolate;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015) 40%), rgba(16,20,27,.94);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(255,255,255,.06), 0 24px 50px -20px rgba(0,0,0,.9); }
.tp-pop::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2); pointer-events: none; }
.tp-pop > b { font: 600 12px var(--f); color: var(--tx); } .tp-pop > b em { font-style: normal; font-weight: 500; color: var(--tx3); margin-left: 4px; }
.tp-hd .tp-pop { top: 34px; right: 0; width: 236px; }
.tp-pre-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tp-pre-in .inp { height: 30px; min-height: 0; padding: 0 8px; } .tp-pre-in input { font: 500 12px var(--f); font-variant-numeric: tabular-nums; text-align: center; min-width: 0; }
.tp-pop .lnk { justify-self: start; font: 500 11.5px var(--f); color: var(--tx3); background: none; border: 0; padding: 0; cursor: pointer; } .tp-pop .lnk:hover { color: var(--tx); }
.rp-trade .tp-seg { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: 28px; }
.rp-trade .tp-seg button { min-width: 0; padding: 0 4px; font-size: 11.5px; }
/* position strip */
.tp-pos { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--cx-fill); box-shadow: var(--cx-edge); }
.tp-pos > div { display: grid; gap: 1px; min-width: 0; } .tp-pos > .r { justify-items: end; text-align: right; }
.tp-pos small { color: var(--tx3); font: 500 11px var(--f); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tp-pos b { font: 600 15px/1.25 var(--f); font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; color: var(--tx); }
.tp-pos .r b { font-size: 13px; } .tp-pos b.up { color: var(--up); } .tp-pos b.dn { color: var(--dn); } .tp-pos b em { font-style: normal; font-weight: 500; font-size: 11.5px; opacity: .85; margin-left: 2px; }
/* wallet-set chip + dropdown */
.tp-from { position: relative; }
.tp-wc { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px 0 8px; border: 0; border-radius: 10px; background: var(--cx-fill); box-shadow: var(--cx-edge); color: var(--tx2); cursor: pointer; text-align: left; transition: background .15s; }
.tp-wc:hover, .tp-wc.on { background: var(--cx-fill2); } .tp-wc > .i { flex: none; color: var(--tx3); transition: transform .15s; } .tp-wc.on > .i { transform: rotate(180deg); }
.tp-avs { display: flex; flex: none; padding-left: 5px; }
.tp-avs i { display: grid; place-items: center; width: 18px; height: 18px; margin-left: -5px; border-radius: 50%; font: 700 9px var(--f); font-style: normal; color: #fff;
  background: linear-gradient(140deg, hsl(var(--h) 55% 52%), hsl(calc(var(--h) + 40) 50% 34%)); box-shadow: 0 0 0 1.5px rgba(14,18,24,.95); }
.tp-wn { display: flex; align-items: baseline; gap: 8px; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.tp-wn b { font: 600 12.5px var(--f); color: var(--tx); overflow: hidden; text-overflow: ellipsis; } .tp-wn small { margin-left: auto; font: 500 11px var(--f); color: var(--tx3); font-variant-numeric: tabular-nums; }
.tp-dd { top: 38px; left: 0; right: 0; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 4px; max-height: 240px; overflow-y: auto; scrollbar-width: thin; }
.tp-dd button { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; height: 34px; padding: 0 8px 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--tx2); cursor: pointer; text-align: left; }
.tp-dd button:hover { background: rgba(255,255,255,.06); } .tp-dd button.on { background: color-mix(in srgb, var(--cx-ice) 8%, transparent); } .tp-dd button > .i { flex: none; color: var(--cx-ice); }
/* Buy | Sell (green / red tint comes from .bs in select.css) */
.rp-trade .tp-bs { display: grid; grid-template-columns: 1fr 1fr; height: 34px; } .rp-trade .tp-bs button { height: 100% !important; min-width: 0; font-size: 12.5px; }
/* amount block */
.tp-amt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.tp-al { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--tx3); font: 500 11.5px var(--f); white-space: nowrap; }
.tp-al > span:first-child { color: var(--tx2); overflow: hidden; text-overflow: ellipsis; } .tp-al em { font-style: normal; color: var(--tx3); margin-left: 3px; font-variant-numeric: tabular-nums; }
.tp-av { font: 500 11px var(--f) !important; font-variant-numeric: tabular-nums; color: var(--tx3); }
.tp-sw { display: grid; place-items: center; flex: none; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 5px; background: var(--cx-fill); color: var(--tx3); cursor: pointer; } .tp-sw:hover { color: var(--tx); background: var(--cx-fill2); }
.tp-in { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 6px 0 12px; border-radius: 11px; background: var(--cx-fill); box-shadow: var(--cx-edge); transition: box-shadow .15s; }
.tp-in:focus-within { box-shadow: var(--cx-edge), inset 0 0 0 1px color-mix(in srgb, var(--cx-ice) 45%, transparent); }
.tp-in input { flex: 1 1 auto; width: 0; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--tx); font: 600 22px var(--f); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tp-in input::placeholder { color: var(--tx3); opacity: .6; }
.tp-u { display: flex; flex: none; gap: 1px; padding: 2px; border-radius: 8px; background: rgba(0,0,0,.18); }
.tp-u button { height: 24px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent; color: var(--tx3); font: 600 11px var(--f); cursor: pointer; } .tp-u button:hover { color: var(--tx); }
.tp-u button.on { color: var(--tx); background: var(--cx-fill2); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.tp-max { flex: none; height: 28px; padding: 0 9px; border: 0; border-radius: 7px; background: color-mix(in srgb, var(--cx-ice) 9%, transparent); color: var(--cx-ice); font: 600 11px var(--f); cursor: pointer; }
.tp-max:hover { background: color-mix(in srgb, var(--cx-ice) 16%, transparent); }
.tp-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tp-chips button { display: grid; justify-items: center; align-content: center; gap: 0; min-width: 0; height: 38px; padding: 0 4px; border: 0; border-radius: 9px; background: var(--cx-fill); box-shadow: var(--cx-edge); color: var(--tx2); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.tp-chips button:hover { background: var(--cx-fill2); color: var(--tx); }
.tp-chips b { font: 600 12.5px/1.2 var(--f); font-variant-numeric: tabular-nums; } .tp-chips small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 10.5px/1.25 var(--f); font-variant-numeric: tabular-nums; color: var(--tx3); }
.tp-chips button.short small { color: color-mix(in srgb, var(--dn) 75%, var(--tx3)); }
.tp-chips button.on { color: var(--tx); background: color-mix(in srgb, var(--cx-ice) 9%, var(--cx-fill)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cx-ice) 35%, transparent); }
.rp-trade:has(.tp-bs .sell.on) .tp-chips button.on { background: color-mix(in srgb, var(--dn) 10%, var(--cx-fill)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dn) 40%, transparent); }
.rp-trade:has(.tp-bs .buy.on) .tp-chips button.on { background: color-mix(in srgb, var(--up) 9%, var(--cx-fill)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--up) 38%, transparent); }
/* limit trigger */
.tp-trig { display: grid; gap: 6px; } .tp-trig .inp { height: var(--tp-h); min-height: 0; } .tp-trig input { font-variant-numeric: tabular-nums; }
.tp-fh { color: var(--tx3); font: 500 11px var(--f); }
/* Smart settings */
.tp-smart { border-radius: 10px; background: var(--cx-fill); box-shadow: var(--cx-edge); }
.tp-sh { display: flex; align-items: center; gap: 7px; width: 100%; height: 30px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--tx2); cursor: pointer; text-align: left; }
.tp-sh:hover { color: var(--tx); } .tp-sh > b { font: 600 11.5px var(--f); white-space: nowrap; } .tp-sh > .i:first-child { color: var(--tx3); flex: none; }
.tp-ss { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx3); font: 500 11px var(--f) !important; }
.tp-sh > .i:last-child { flex: none; color: var(--tx3); transition: transform .15s; } .tp-smart.open .tp-sh > .i:last-child { transform: rotate(180deg); }
.tp-sb { display: grid; gap: 6px; padding: 2px 10px 10px; }
.tp-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; } .tp-row > span { color: var(--tx3); font: 500 11.5px var(--f); }
.tp-sb .kv { margin: 2px 0 0; padding: 0; background: none; } .tp-sb .kv > div { min-height: 22px; padding: 0 !important; border: 0 !important; font-size: 11.5px; }
.tp-sb .kv dt { color: var(--tx3); } .tp-sb .kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.tp-note { margin: 0; color: var(--tx3); font: 500 11px/1.35 var(--f); text-align: center; opacity: .85; }
.rp-trade .oo { margin: 0; }
/* a narrow rail (1280 wide screens): drop the secondary bits, keep the numbers */
@container tp (max-width: 300px) {
  .tp-nw { display: none; }
  .tp-chips { gap: 4px; } .tp-chips small { font-size: 10px; letter-spacing: -.01em; }
  .tp-u button { padding: 0 5px; } .tp-max { padding: 0 7px; }
}
/* light theme */
html:root[data-theme="light"] .tp-pop { background: var(--pop-bg); box-shadow: var(--pop-sh, 0 20px 44px -20px rgba(20,40,70,.35)), inset 0 0 0 1px rgba(20,40,70,.08); }
html:root[data-theme="light"] .tp-tabs button.on, html:root[data-theme="light"] .tp-u button.on { box-shadow: 0 1px 2px rgba(20,40,70,.1), inset 0 0 0 1px rgba(20,40,70,.06); }
html:root[data-theme="light"] .tp-u { background: rgba(20,40,70,.06); }
html:root[data-theme="light"] .tp-avs i { box-shadow: 0 0 0 1.5px #fff; }
html:root[data-theme="light"] .tp-dd button:hover { background: rgba(20,40,70,.05); }
html:root[data-theme="light"] :is(.tp-ib.lit, .tp-max) { color: var(--ac); background: color-mix(in srgb, var(--ac) 10%, transparent); }
html:root[data-theme="light"] .tp-ib.lit { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 25%, transparent); }
html:root[data-theme="light"] .tp-dd button.on { background: color-mix(in srgb, var(--ac) 8%, transparent); } html:root[data-theme="light"] .tp-dd button > .i { color: var(--ac); }
html:root[data-theme="light"] .tp-in:focus-within { box-shadow: var(--cx-edge), inset 0 0 0 1px color-mix(in srgb, var(--ac) 45%, transparent); }
html:root[data-theme="light"] :is(.tp-ib, .tp-wc, .tp-sh, .tp-tabs button):focus-visible { box-shadow: inset 0 0 0 1px var(--ac); }

/* ================= Trade panel quick actions (Nov 5): Send · Burn · Lock · Airdrop, Claim fees, Nuke ================= */
/* In the rail the panel is a column as tall as its block (Trade lines up with the chart): the quick actions sit at its
   foot. The pane is a size container (tph) so the actions tighten as the block gets shorter:
   roomy: labelled row, Claim and Nuke full width · shorter: Claim | Nuke side by side · tight: tighter gaps ·
   tightest (1280×800): icon-only row, slimmer controls, footnote folded into the Buy button's tooltip. */
html:root .cx .cx-rail .cx-trade .trade.rp-trade { display: flex; flex-direction: column; min-height: 100%; padding-bottom: 10px; }
html:root .cx .cx-rail .cx-trade .trade.rp-trade > * { flex: none; }
@media (min-width: 1101px) {
  .cx-grid:has(> .cx-left:not(.one)) > .cx-rail.al2 > .cx-rs > .cx-pane.cx-trade { container: tph / size; }
}
.tp-qa { display: grid; gap: 8px; margin-top: auto !important; }
.tp-qr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tp-qr .tp-q { padding: 0 5px; gap: 5px; }
.tp-qb { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.tp-q { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 30px; padding: 0 8px; border: 0; border-radius: 9px; overflow: hidden;
  background: var(--cx-fill); box-shadow: var(--cx-edge); color: var(--tx2); font: 600 11.5px var(--f); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s; }
.tp-q > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tp-q > .i { flex: none; color: var(--tx3); transition: color .15s; }
.tp-q:hover { background: var(--cx-fill2); color: var(--tx); } .tp-q:hover > .i { color: var(--cx-ice); }
.tp-q:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--cx-ice); }
.tp-claim > .i { color: var(--cx-ice); }
.tp-claim b { font-weight: 600; color: var(--tx); font-variant-numeric: tabular-nums; margin-left: 2px; }
/* Nuke: quiet destructive, red text on a faint red tint (never a solid block) */
.tp-nuke { color: color-mix(in srgb, var(--dn) 82%, var(--tx)); background: color-mix(in srgb, var(--dn) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dn) 20%, transparent); }
.tp-nuke > .i, .tp-nuke:hover > .i { color: var(--dn); }
.tp-nuke:hover { color: var(--dn); background: color-mix(in srgb, var(--dn) 13%, transparent); }
.tp-nuke:focus-visible { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dn) 60%, transparent); }
.tp-nuke:disabled { opacity: .45; cursor: not-allowed; background: color-mix(in srgb, var(--dn) 5%, transparent); }
.tp-nuke.on { color: var(--dn); background: color-mix(in srgb, var(--dn) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dn) 45%, transparent); }
.tp-nuke.on::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--dn); opacity: .55; transform-origin: left; animation: tp-nk 4s linear forwards; }
@keyframes tp-nk { to { transform: scaleX(0); } }
.tp-qb.cf { grid-template-columns: minmax(0, 1fr) 30px !important; }
.tp-qb.cf .tp-claim { display: none; }
.tp-nkx { width: 30px; padding: 0; }
@media (prefers-reduced-motion: reduce) { .tp-nuke.on::after { animation: none; } .tp-q, .tp-q > .i { transition: none; } }
/* narrow rail (1280 wide screens): the row of four is icon-only, the labels stay as tooltips */
@container tp (max-width: 300px) { .tp-qr .tp-q > span { display: none; } .tp-qr .tp-q { padding: 0; } }
/* Tiers by the block's height. Market thresholds; Limit's trigger row needs 58px more, so its thresholds sit 58px
   higher. Each step starts at the first height where the roomier layout no longer fits. */
/* shorter: Claim and Nuke share a line */
@container tph (max-height: 526px) {
  .rp-trade:not(:has(.tp-trig)) .tp-qb { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rp-trade:not(:has(.tp-trig)) .tp-q { padding: 0 6px; gap: 5px; }
}
@container tph (max-height: 584px) {
  .rp-trade:has(.tp-trig) .tp-qb { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rp-trade:has(.tp-trig) .tp-q { padding: 0 6px; gap: 5px; }
}
/* tight: 6px between the parts */
@container tph (max-height: 488px) {
  html:root .cx .cx-rail .cx-trade .trade.rp-trade:not(:has(.tp-trig)) { gap: 6px; }
  .rp-trade:not(:has(.tp-trig)) .tp-qa, .rp-trade:not(:has(.tp-trig)) .tp-qb { gap: 6px; }
}
@container tph (max-height: 546px) {
  html:root .cx .cx-rail .cx-trade .trade.rp-trade:has(.tp-trig) { gap: 6px; }
  .rp-trade:has(.tp-trig) .tp-qa, .rp-trade:has(.tp-trig) .tp-qb { gap: 6px; }
}
/* tightest (1280×800): icon-only row, slimmer controls, the footnote goes (it is the Buy button's tooltip too) */
@container tph (max-height: 470px) {
  .rp-trade:not(:has(.tp-trig)) .tp-qr .tp-q > span, .rp-trade:not(:has(.tp-trig)) .tp-note { display: none; }
  .rp-trade:not(:has(.tp-trig)) .tp-qr .tp-q { padding: 0; }
  html:root .cx .cx-rail .cx-trade .trade.rp-trade:not(:has(.tp-trig)) { padding-top: 8px; padding-bottom: 8px; }
  .rp-trade:not(:has(.tp-trig)) .tp-pos { padding-top: 4px; padding-bottom: 4px; }
  .rp-trade:not(:has(.tp-trig)) .tp-wc, .rp-trade:not(:has(.tp-trig)) .tp-bs { height: 30px; }
  .rp-trade:not(:has(.tp-trig)) .tp-in { height: 38px; } .rp-trade:not(:has(.tp-trig)) .tp-in input { font-size: 20px; }
  .rp-trade:not(:has(.tp-trig)) .tp-chips button { height: 32px; }
  html:root .cx .cx-rail .cx-trade .trade.rp-trade:not(:has(.tp-trig)) .buyb { height: 32px; }
}
@container tph (max-height: 526px) {
  .rp-trade:has(.tp-trig) .tp-qr .tp-q > span, .rp-trade:has(.tp-trig) .tp-note { display: none; }
  .rp-trade:has(.tp-trig) .tp-qr .tp-q { padding: 0; }
  html:root .cx .cx-rail .cx-trade .trade.rp-trade:has(.tp-trig) { padding-top: 8px; padding-bottom: 8px; }
  .rp-trade:has(.tp-trig) .tp-pos { padding-top: 4px; padding-bottom: 4px; }
  .rp-trade:has(.tp-trig) .tp-wc, .rp-trade:has(.tp-trig) .tp-bs { height: 30px; }
  .rp-trade:has(.tp-trig) .tp-in { height: 38px; } .rp-trade:has(.tp-trig) .tp-in input { font-size: 20px; }
  .rp-trade:has(.tp-trig) .tp-chips button { height: 32px; }
  html:root .cx .cx-rail .cx-trade .trade.rp-trade:has(.tp-trig) .buyb { height: 32px; }
}
/* light theme */
html:root[data-theme="light"] .tp-q:hover > .i, html:root[data-theme="light"] .tp-claim > .i { color: var(--ac); }
html:root[data-theme="light"] .tp-q:focus-visible { box-shadow: inset 0 0 0 1px var(--ac); }
html:root[data-theme="light"] .tp-nuke { color: color-mix(in srgb, var(--dn) 88%, #000); background: color-mix(in srgb, var(--dn) 7%, rgba(255,255,255,.4)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dn) 24%, transparent); }
html:root[data-theme="light"] .tp-nuke:hover { background: color-mix(in srgb, var(--dn) 12%, rgba(255,255,255,.5)); }
html:root[data-theme="light"] .tp-nuke.on { background: color-mix(in srgb, var(--dn) 14%, rgba(255,255,255,.5)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dn) 45%, transparent); }

/* ---------- Airdrop card ---------- */
.air { display: grid; gap: 10px; }
.air-f { display: grid; gap: 6px; min-width: 0; }
.air-l { color: var(--tx2); font: 500 11.5px var(--f); } .air-l em { font-style: normal; color: var(--tx3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.air .tp-in { height: 40px; } .air .tp-in input { font-size: 18px; }
.air-seg { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); height: 28px; } .air-seg button { min-width: 0; padding: 0 4px; font-size: 11.5px; }
.air-n { display: flex; align-items: center; gap: 8px; color: var(--tx3); font: 500 11.5px var(--f); }
.air-n .inp { width: 64px; flex: none; height: 30px !important; padding: 0 8px; } .air-n input { min-width: 0; width: 100%; text-align: center; font-variant-numeric: tabular-nums; }
.air-n > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.air-ta { width: 100%; min-height: 64px; resize: vertical; padding: 8px 10px; border: 0; border-radius: 10px; outline: 0; background: var(--cx-fill); box-shadow: var(--cx-edge); color: var(--tx); font: 500 11.5px/1.4 var(--mono, ui-monospace, monospace); }
.air-ta:focus { box-shadow: var(--cx-edge), inset 0 0 0 1px color-mix(in srgb, var(--cx-ice) 45%, transparent); }
.air-h { margin: 0; color: var(--tx3); font: 500 11px/1.35 var(--f); }
.air-pv { margin: 0; padding: 8px 10px; border-radius: 9px; background: var(--cx-fill); color: var(--tx2); font: 500 12px/1.35 var(--f); font-variant-numeric: tabular-nums; }
.air-pv.warn { color: color-mix(in srgb, var(--dn) 80%, var(--tx2)); }
.air .air-go { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px !important; }
.air .air-go:disabled { opacity: .5; cursor: not-allowed; }
.air-demo { margin: 0; text-align: center; color: var(--tx3); font: 500 11px var(--f); }
html:root[data-theme="light"] .air-ta:focus { box-shadow: var(--cx-edge), inset 0 0 0 1px color-mix(in srgb, var(--ac) 45%, transparent); }
