/* /app: the perp dashboard. The coin on the fluid band, a tape of tiny caps, then rail | chart + table | ticket.
   Square corners, hairlines, Unbounded for the big type, Plex Mono for every number. Magenta long, blue short.
   (rem follows the template: 1rem = 8px at 1440, about 10.4px at 390.) */
.pp-app .pp-body { min-height: 0; }
.num { font-family: space-mono; font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.lev { color: var(--pink); }
.ap-dim { color: #636363; }
.ap-empty { margin: 0; padding: 2rem 1.6rem; color: #636363; }
@keyframes ap-in { from { opacity: 0; transform: translateY(.4rem); } to { opacity: 1; transform: none; } }

/* ---- band */
.ap-band { position: relative; overflow: hidden; padding: 16rem 0 0; border-bottom: 1px solid var(--line); }
.ap-band-bg { position: absolute; inset: 0; }
.ap-band-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 10% 70%; display: block; }
.ap-band-in { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 4rem; }
.ap-ident { min-width: 0; flex: 1; padding-bottom: 4rem; }
.ap-kicker { color: #fff; margin: 0 0 1.6rem; display: block; }
.ap-link { font: inherit; text-transform: none; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .3em; }
.ap-title { display: flex; align-items: center; gap: 2.4rem; min-width: 0; }
.ap-title img { flex: none; width: 9rem; height: 9rem; object-fit: cover; background: #121415; outline: 1px solid hsla(0, 0%, 100%, .3); }
.ap-title img:not([src]) { display: none; }
.ap-title h1 { margin: 0; min-width: 0; font-family: clash; font-weight: 800; font-size: 14rem; line-height: .9; letter-spacing: -.04em; text-transform: uppercase; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-name { margin: 1.4rem 0 0; font-size: 2rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-pricebox { flex: none; width: 56rem; background: #121415; padding: 3.6rem 4rem 4rem; display: flex; flex-direction: column; align-items: flex-start; }
.ap-pricebox .ap-kicker { color: #a1a1aa; margin-bottom: 1rem; }
.ap-price { font-family: clash; font-weight: 700; font-size: 6.4rem; line-height: 1; letter-spacing: -.03em; transition: color .6s; }
.ap-price.flash-up { color: var(--up); transition: none; }
.ap-price.flash-down { color: var(--down); transition: none; }
.ap-chg { margin-top: 1rem; font-size: 1.6rem; }
.ap-search { position: relative; display: flex; align-items: center; gap: 1.2rem; width: 100%; height: 5.6rem; margin-top: 3rem; padding: 0 1.4rem; border: 1px solid var(--line); background: #121415; transition: border-color .2s; }
.ap-search:focus-within { border-color: #fff; }
.ap-search svg { flex: none; width: 1.8rem; height: 1.8rem; color: #a1a1aa; }
.ap-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: #fff; font: 400 1.6rem/1 space-mono; }
.ap-search input::placeholder { color: #636363; }
.ap-search input::-webkit-search-cancel-button { display: none; }
.ap-search kbd { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid var(--line); font: 400 1.3rem/1 space-mono; color: #a1a1aa; }
.ap-results { position: absolute; top: calc(100% + 1px); left: -1px; right: -1px; z-index: 20; max-height: 44rem; overflow-y: auto; background: #121415; border: 1px solid #fff; }
.ap-results button { cursor: pointer; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; width: 100%; padding: 1.2rem 1.4rem; border: 0; border-bottom: 1px solid var(--line); background: none; color: #fff; text-align: left; font: inherit; }
.ap-results button:hover, .ap-results button.on { background: hsla(0, 0%, 100%, .06); }
.ap-results img, .ap-results i { width: 3rem; height: 3rem; background: #2c2e2f; object-fit: cover; display: block; }
.ap-results b { display: block; font-weight: 700; font-size: 1.5rem; }
.ap-results small { display: block; color: #636363; font-size: 1.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-results .r { font: 400 1.3rem/1.4 space-mono; text-align: right; }
.ap-results p { margin: 0; padding: 1.6rem; color: #a1a1aa; }

/* ---- tape */
.ap-tape { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: #121415; }
.ap-tape-in { display: flex; width: max-content; animation: ap-tape 90s linear infinite; }
.ap-tape:hover .ap-tape-in { animation-play-state: paused; }
@keyframes ap-tape { to { transform: translateX(-50%); } }
.ap-tape button { cursor: pointer; display: flex; align-items: center; gap: 1.2rem; height: 6.4rem; padding: 0 2.8rem; border: 0; border-right: 1px solid var(--line); background: none; color: #fff; white-space: nowrap; font: 400 1.4rem/1 space-mono; text-transform: uppercase; }
.ap-tape button:hover { background: hsla(0, 0%, 100%, .05); }
.ap-tape img, .ap-tape i { width: 2.6rem; height: 2.6rem; background: #2c2e2f; object-fit: cover; display: block; }
.ap-tape b { font-weight: 700; }
.ap-tape .mc { color: #a1a1aa; }
.ap-tape svg { width: 6.4rem; height: 2.2rem; }
.ap-tape-empty { height: 6.4rem; }

/* ---- the desk: rail | centre | ticket, hairlines between */
.ap-desk { display: grid; grid-template-columns: 36rem minmax(0, 1fr) 46rem; align-items: start; border-bottom: 1px solid var(--line); }
.ap-rail { position: sticky; top: 9rem; display: flex; flex-direction: column; max-height: calc(100vh - 9rem); border-right: 1px solid var(--line); min-height: 0; }
.ap-tabs { display: grid; grid-template-columns: repeat(4, auto); border-bottom: 1px solid var(--line); }
.ap-tabs button { cursor: pointer; padding: 1.6rem .8rem; border: 0; border-right: 1px solid var(--line); background: none; color: #a1a1aa; font: 400 1.3rem/1 space-mono; text-transform: uppercase; }
.ap-tabs button:last-child { border-right: 0; }
.ap-tabs button[aria-selected="true"] { color: #fff; box-shadow: inset 0 -2px 0 var(--pink); }
.ap-pick { display: none; }
.ap-rail-note { margin: 0; padding: 1.2rem 1.6rem; color: #636363; font-size: 1.2rem; border-bottom: 1px solid var(--line); }
.ap-rail-h { display: grid; grid-template-columns: minmax(0, 1fr) 10rem 7.4rem; gap: 1rem; padding: 1rem 1.6rem; color: #636363; font-size: 1.2rem; border-bottom: 1px solid var(--line); }
.ap-rail-h span:not(:first-child) { text-align: right; }
.ap-rail-list { overflow-y: auto; min-height: 0; flex: 1; }
.ap-rrow { cursor: pointer; display: grid; grid-template-columns: 3rem minmax(0, 1fr) 10rem 7.4rem; gap: 1rem; align-items: center; width: 100%; padding: 1.2rem 1.6rem; border: 0; border-bottom: 1px solid var(--line); background: none; color: #fff; text-align: left; font: 400 1.4rem/1.2 space-mono; animation: ap-in .35s ease both; }
.ap-rrow:hover { background: hsla(0, 0%, 100%, .05); }
.ap-rrow[aria-current="true"] { background: hsla(0, 0%, 100%, .08); box-shadow: inset 3px 0 0 var(--pink); }
.ap-rrow img, .ap-rrow i { width: 3rem; height: 3rem; background: #2c2e2f; object-fit: cover; display: block; }
.ap-rrow b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-rrow small { display: block; color: #636363; font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-rrow .num { text-align: right; }

.ap-centre { min-width: 0; }
.ap-head { display: flex; align-items: center; justify-content: space-between; gap: 2rem 3rem; flex-wrap: wrap; padding: 1.8rem 2.4rem; border-bottom: 1px solid var(--line); }
.ap-pairname { display: flex; align-items: baseline; gap: 1.4rem; }
.ap-pairname b { font-family: clash; font-weight: 800; font-size: 2.6rem; letter-spacing: -.02em; }
.ap-pairname .label { color: #636363; font-size: 1.2rem; }
.ap-stats { display: flex; flex-wrap: wrap; gap: 1.2rem 3rem; margin: 0; }
.ap-stats div { display: flex; flex-direction: column; gap: .5rem; }
.ap-stats dt { color: #636363; font: 400 1.2rem/1 space-mono; text-transform: uppercase; }
.ap-stats dd { margin: 0; font: 400 1.5rem/1 space-mono; }
.ap-frame { position: relative; height: min(64rem, 62vh); min-height: 44rem; border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 5rem 5rem; }
.ap-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ap-timeframes { display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; padding:1rem 2.4rem; border-bottom:1px solid var(--line); }
.ap-timeframes button { cursor:pointer; border:1px solid var(--line); background:none; color:#a1a1aa; font:400 1.3rem/1 space-mono; padding:1rem 1.2rem; min-height:3.8rem; }
.ap-timeframes button[aria-pressed="true"] { color:#fff; border-color:var(--pink); box-shadow:inset 0 -2px var(--pink); }
.ap-timeframes .label { margin-left:auto; font-size:1.1rem; color:#a1a1aa; }

.ap-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding: 3.2rem 2.4rem 1.8rem; border-bottom: 1px solid var(--line); }
.ap-sec-h .h3 { margin: 0; }
.ap-sec-h .label { color: #636363; font-size: 1.2rem; }
.ap-pos { border-bottom: 1px solid var(--line); }
.ap-pos-empty { padding: 2.4rem; color: #636363; }
.ap-pos-rows > div { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, 1fr) 8rem; gap: 1.4rem; align-items: center; padding: 1.4rem 2.4rem; border-bottom: 1px solid var(--line); font: 400 1.4rem/1.3 space-mono; animation: ap-in .35s ease both; }
.ap-pos-rows > div.h { color: #636363; font-size: 1.2rem; text-transform: uppercase; animation: none; }
.ap-pos-rows button { cursor: pointer; border: 0; background: none; padding: 0; color: #fff; font: inherit; text-decoration: underline; text-underline-offset: .3em; justify-self: end; }

.ap-tr { display: grid; grid-template-columns: minmax(0, 1.7fr) 1fr .7fr .7fr .8fr .9fr .9fr 9.6rem 5rem; gap: 1.4rem; align-items: center; padding: 0 2.4rem; }
.ap-th { height: 4.4rem; color: #636363; font-size: 1.2rem; border-bottom: 1px solid var(--line); }
.ap-th span:not(:first-child), #rows .ap-tr > :not(:first-child) { text-align: right; justify-self: end; }
#rows .ap-tr { cursor: pointer; width: 100%; height: 6.4rem; border: 0; border-bottom: 1px solid var(--line); background: none; color: #fff; text-align: left; font: 400 1.4rem/1 space-mono; animation: ap-in .35s ease both; }
#rows .ap-tr:hover { background: hsla(0, 0%, 100%, .05); }
#rows .ap-tr[aria-current="true"] { background: hsla(0, 0%, 100%, .08); box-shadow: inset 3px 0 0 var(--pink); }
.ap-coin { display: flex; align-items: center; gap: 1.2rem; min-width: 0; }
.ap-coin img, .ap-coin i { flex: none; width: 3.2rem; height: 3.2rem; background: #2c2e2f; object-fit: cover; display: block; }
.ap-coin span { min-width: 0; }
.ap-coin b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-coin small { display: block; margin-top: .3rem; color: #636363; font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spark { width: 9.6rem; height: 3rem; display: block; }
.ap-max { font-family: clash; font-weight: 800; font-size: 1.8rem; color: var(--pink); }

/* ---- ticket */
.ap-ticket { position: sticky; top: 9rem; border-left: 1px solid var(--line); background: #121415; }
.ap-sides { position: relative; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.ap-sides button { cursor: pointer; padding: 2rem 0 1.8rem; border: 0; background: none; color: #636363; font: 800 2.4rem/1 clash; letter-spacing: -.02em; text-transform: uppercase; transition: color .25s; }
.ap-sides button[data-side="long"][aria-selected="true"] { color: var(--pink); }
.ap-sides button[data-side="short"][aria-selected="true"] { color: var(--blue); }
.ap-ink { position: absolute; left: 0; bottom: -1px; height: 3px; width: 50%; background: var(--pink); transition: transform .35s cubic-bezier(.2, .8, .2, 1), background .35s; }
.ap-t-body { padding: 2.2rem 2.4rem 2.4rem; }
.ap-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ap-row .label { font-size: 1.2rem; color: #a1a1aa; }
.ap-field { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; padding: 0 1.6rem; border: 1px solid var(--line); transition: border-color .15s; }
.ap-field:focus-within { border-color: #fff; }
.ap-field input { flex: 1; min-width: 0; height: 6.4rem; border: 0; outline: 0; background: none; color: #fff; font-size: 3rem; font-weight: 700; }
.ap-field span { color: #a1a1aa; font: 400 1.5rem/1 space-mono; }
.ap-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: 1rem; }
.ap-chips button { cursor: pointer; height: 3.8rem; border: 1px solid var(--line); background: none; color: #a1a1aa; font: 400 1.4rem/1 space-mono; }
.ap-chips button:hover, .ap-chips button.on { color: #fff; border-color: #fff; }
.ap-lev-head { margin: 3rem 0 .4rem; align-items: flex-end; }
.ap-lev-head b { font-family: clash; font-weight: 800; font-size: 6.4rem; line-height: .85; letter-spacing: -.03em; }
.ap-range { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; margin: 1.6rem 0 1rem; background: linear-gradient(90deg, var(--tone, var(--pink)) var(--fill, 0%), hsla(0, 0%, 100%, .25) var(--fill, 0%)); outline: 0; }
.ap-range::-webkit-slider-thumb { -webkit-appearance: none; width: 2rem; height: 2rem; background: #fff; border: 0; border-radius: 0; cursor: pointer; }
.ap-range::-moz-range-thumb { width: 2rem; height: 2rem; background: #fff; border: 0; border-radius: 0; cursor: pointer; }
.ap-ticks { display: flex; justify-content: space-between; }
.ap-ticks button { cursor: pointer; border: 0; background: none; padding: .2rem 0; color: #636363; font: 400 1.3rem/1 space-mono; }
.ap-ticks button:hover { color: #fff; }
.ap-meter { margin-top: 3rem; }
.ap-meter b { font-size: 1.5rem; }
.ap-wire { position: relative; height: 1px; margin: 4rem .4rem 1.6rem; background: hsla(0, 0%, 100%, .25); }
.ap-wire::before { content: ''; position: absolute; top: -1px; height: 3px; left: var(--from, 0); width: var(--span, 0); background: var(--pink); transition: left .4s cubic-bezier(.2, .8, .2, 1), width .4s cubic-bezier(.2, .8, .2, 1); }
.ap-wire.short::before { background: var(--blue); }
.ap-wire i { position: absolute; top: 50%; width: 1rem; height: 1rem; margin: -.5rem 0 0 -.5rem; transition: left .4s cubic-bezier(.2, .8, .2, 1); }
.ap-wire .liq { background: #fff; outline: 2px solid #121415; }
.ap-wire .entry { background: var(--pink); }
.ap-wire.short .entry { background: var(--blue); }
.ap-wire .tag { position: absolute; transform: translateX(-50%); font: 400 1.1rem/1 space-mono; text-transform: uppercase; letter-spacing: .08em; color: #a1a1aa; white-space: nowrap; transition: left .4s cubic-bezier(.2, .8, .2, 1); }
.ap-wire .liq-tag { bottom: 1.4rem; color: #fff; }
.ap-wire .entry-tag { top: 1.4rem; transform: translateX(-100%); }
.ap-wire.short .entry-tag { transform: none; }
.ap-sum { margin: 2.6rem 0 0; font-size: 1.4rem; }
.ap-sum > div { display: flex; justify-content: space-between; gap: 1.2rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.ap-sum dt { color: #a1a1aa; text-transform: uppercase; font-size: 1.2rem; }
.ap-sum dd { margin: 0; text-align: right; }
.ap-go { cursor: pointer; width: 100%; height: 6.4rem; margin-top: 2.2rem; border: 0; font: 400 1.6rem/1 space-mono; text-transform: uppercase; transition: opacity .15s; }
.ap-go.long { background: var(--pink); color: #fff; }
.ap-go.short { background: var(--blue); color: #121415; }
.ap-go:hover { opacity: .9; }
.ap-go[disabled] { cursor: default; opacity: .45; }
.ap-term { min-height: 14rem; padding: 1.6rem 2.4rem 2rem; border-top: 1px solid var(--line); font: 400 1.35rem/1.9 space-mono; }
.ap-term p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: ap-in .35s ease both; }
.ap-term .cmd { color: #fff; }
.ap-term .cmd::before { content: '$ '; color: #636363; }
.ap-term .step { color: #a1a1aa; }
.ap-term .step::before { content: '+ '; color: #636363; }
.ap-term .ok { color: var(--pink); }
.ap-term .ok::before { content: '+ '; }
.ap-term .bad { color: var(--blue); }
.ap-term .bad::before { content: 'x '; }
.ap-term .wait { color: #636363; }
.ap-term .wait::after { content: ''; display: inline-block; width: .8rem; height: 1.5rem; margin-left: .5rem; vertical-align: -.2rem; background: currentColor; animation: ap-blink 1s steps(1) infinite; }
@keyframes ap-blink { 50% { opacity: 0; } }

/* the header's primary button is Connect Phantom on this page */
.pp-app header #connect { cursor: pointer; border: 0; }

@media (max-width: 1100px) and (min-width: 650px) {
  .ap-desk { grid-template-columns: 30rem minmax(0, 1fr) 40rem; }
  .ap-tr { grid-template-columns: minmax(0, 1.6fr) 1fr .8fr .9fr 9.6rem 5rem; }
  .ap-tr > :nth-child(3), .ap-tr > :nth-child(4), .ap-tr > :nth-child(6) { display: none; }
}
@media (max-width: 649px) {
  .ap-band { padding-top: 12rem; }
  .ap-search input::placeholder { font-size: 1.2rem; }
  .ap-band-in { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
  .ap-ident { padding: 0 2.3rem 3rem; }
  .ap-title { gap: 1.4rem; }
  .ap-title img { width: 5rem; height: 5rem; }
  .ap-title h1 { font-size: 6.4rem; }
  .ap-name { font-size: 1.6rem; }
  .ap-pricebox { width: 100%; padding: 2.4rem 2.3rem 2.8rem; }
  .ap-price { font-size: 4.4rem; }
  .ap-search kbd { display: none; }
  .ap-search input { font-size: 1.4rem; }
  .ap-desk { display: flex; flex-direction: column; align-items: stretch; }
  .ap-centre { display: contents; }
  .ap-chartbox { order: 1; }
  .ap-ticket { order: 2; position: relative; top: 0; border-left: 0; border-top: 1px solid var(--line); }
  .ap-rail { order: 3; position: relative; top: 0; max-height: none; border-right: 0; border-top: 1px solid var(--line); }
  .ap-pos { order: 4; border-top: 1px solid var(--line); }
  .ap-table { order: 5; }
  .ap-tabs { display: none; }
  .ap-pick { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; padding: 1.4rem 2.3rem; border-bottom: 1px solid var(--line); }
  .ap-pick select { flex: 1; max-width: 22rem; height: 4.4rem; padding: 0 1.2rem; border: 1px solid #fff; border-radius: 0; background: #121415; color: #fff; font: 400 1.4rem/1 space-mono; text-transform: uppercase; }
  .ap-rail-note, .ap-rail-h, .ap-rrow { padding-left: 2.3rem; padding-right: 2.3rem; }
  .ap-rail-list { max-height: 40rem; }
  .ap-head { padding: 1.6rem 2.3rem; }
  .ap-stats { gap: 1.2rem 2.2rem; }
  .ap-frame { height: 36rem; min-height: 0; }
  .ap-t-body { padding: 2rem 2.3rem 2.4rem; }
  .ap-term { padding: 1.4rem 2.3rem 1.8rem; }
  .ap-sec-h { padding: 2.8rem 2.3rem 1.4rem; }
  .ap-pos-empty { padding: 2rem 2.3rem; }
  .ap-pos-rows > div { grid-template-columns: minmax(0, 1.4fr) 1fr 1fr 6rem; padding: 1.2rem 2.3rem; }
  .ap-pos-rows > div > :nth-child(3), .ap-pos-rows > div > :nth-child(4) { display: none; }
  .ap-tr { grid-template-columns: minmax(0, 1fr) 9rem 7rem; gap: 1rem; padding: 0 2.3rem; }
  .ap-tr > :nth-child(2), .ap-tr > :nth-child(3), .ap-tr > :nth-child(4), .ap-tr > :nth-child(6), .ap-tr > :nth-child(7), .ap-tr > :nth-child(9) { display: none; }
  .spark { width: 7rem; }
}
