/* The token page (token.js): the trading-style top of a finalized launch's page, and the address
   chip used wherever a contract address is shown. Same equinox identity as style.css and the
   homepage lists, set tight like a trading terminal. Nothing is loaded from here. */

/* ---------- an address: short form, copy, explorer ---------- */
.addrchip { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; vertical-align: middle; white-space: nowrap; }
.addr-short { font-size: 0.78rem; color: var(--text); }
.addrchip button.copy { padding: 0.05rem 0.4rem; font-size: 0.68rem; line-height: 1.5; }
.addr-x {
  display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; flex: none;
  border: 1px solid var(--line); border-radius: 6px; color: var(--dim); text-decoration: none; font-size: 0.78rem; line-height: 1;
  transition: color var(--ease), border-color var(--ease);
}
.addr-x:hover { color: var(--lime); border-color: var(--lime); }

/* ---------- page frame ---------- */
.tk { --t-small: 0.8125rem; --t-tiny: 0.66rem; --t-soft: rgba(255, 255, 255, 0.03); margin-top: 0.2rem; }
.tk [hidden] { display: none !important; }
.tk .sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tk-label { font-size: var(--t-tiny); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }

.tk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem 1.2rem; }
.tk-ids { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 1.4rem; min-width: 0; }
.tk-id { display: inline-flex; align-items: center; gap: 0.55rem; min-width: 0; }
.tk-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.tk-links .button { padding: 0.45rem 0.95rem; font-size: 0.875rem; border-radius: 8px; white-space: nowrap; }
.tk-links .tk-trade { padding-left: 1.4rem; padding-right: 1.4rem; }
.tk-links .ext { opacity: 0.7; }

/* ---------- stats ---------- */
.tk-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 0.9rem;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.tk-tile { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; padding: 0.7rem 0.9rem 0.75rem; background: var(--panel); }
.tk-val { font-size: 1.12rem; font-weight: 600; line-height: 1.25; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.tk-val.pos { color: var(--lime); }
.tk-val.neg { color: var(--red); }
.tk-sub { font-size: 0.72rem; color: var(--dim); line-height: 1.35; overflow-wrap: anywhere; }
.tk-tile:first-child .tk-val { font-size: 1.35rem; }

/* ---------- chart and trades, side by side ---------- */
.tk-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(25.5rem, 1fr); gap: 1rem; margin-top: 1rem; align-items: stretch; }
.tk-main .panel { margin-top: 0; min-width: 0; }
.tk-chart { display: flex; flex-direction: column; padding: 0.75rem 0.85rem 0.7rem; }
.tk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.6rem; }
.tk-live { margin-left: auto; }
.tseg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.tseg-btn {
  background: transparent; color: var(--dim); border: 0; border-right: 1px solid var(--line); border-radius: 0;
  padding: 0.3rem 0.62rem; font-family: var(--mono); font-size: 0.75rem; font-weight: 500; line-height: 1.3; cursor: pointer;
  transition: color var(--ease), background var(--ease);
}
.tseg-btn:last-child { border-right: 0; }
.tseg-btn:hover { background: var(--t-soft); color: var(--text); box-shadow: none; transform: none; }
.tseg-btn[aria-pressed="true"] { color: var(--lime); background: var(--lime-wash); font-weight: 600; }
.tseg-btn:focus-visible { outline-offset: -2px; border-radius: 0; }
.tseg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.tseg-mode .tseg-btn, .tseg-unit .tseg-btn { font-family: var(--sans); font-size: var(--t-small); }

.tk-legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.85rem; min-height: 1.35rem; margin-top: 0.55rem; font-size: 0.72rem; color: var(--dim); }
.lg { display: inline-flex; align-items: baseline; gap: 0.3rem; white-space: nowrap; }
.lg-k { color: var(--dim); }
.lg-v { color: var(--text); }
.lg-v.pos { color: var(--lime); }
.lg-v.neg { color: var(--red); }
.lg-time { color: var(--dim); }

.tk-plot { position: relative; flex: 1 1 auto; min-height: 26rem; margin-top: 0.3rem; }
.tk-canvas { position: absolute; inset: 0; }
.tk-state {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  text-align: center; padding: 1rem; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel);
}
.tk-state p { margin: 0; max-width: 34rem; }
.tk-empty-title { font-size: var(--step-1); font-weight: 600; color: var(--text); }
.bad-text { color: var(--red); }
.tk-foot { margin: 0.55rem 0 0; max-width: none; font-size: 0.7rem; line-height: 1.5; }
.tk-credit { display: block; margin-top: 0.15rem; }
.tk-credit a { color: var(--dim); }
.tk-credit a:hover { color: var(--lime); }

.tk-trades { display: flex; flex-direction: column; padding: 0.75rem 0 0.4rem; }
.tk-trades-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; padding: 0 0.85rem; }
.tk-trades-head .panel-title { margin: 0; font-size: 1rem; }
.tk-count { font-size: 0.7rem; color: var(--dim); white-space: nowrap; }
.tk-trades-scroll { position: relative; flex: 1 1 0; min-height: 16rem; max-height: 34rem; overflow: auto; margin-top: 0.5rem; }
.tk-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.75rem; }
.tk-table th {
  position: sticky; top: 0; z-index: 1; background: #0b0d10; text-align: right; font-weight: 500; white-space: nowrap;
  font-size: var(--t-tiny); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim);
  padding: 0.4rem 0.4rem; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line);
}
.tk-table td { text-align: right; padding: 0.34rem 0.4rem; border-bottom: 1px solid rgba(28, 32, 38, 0.6); white-space: nowrap; }
.tk-table th.left, .tk-table td.left { text-align: left; }
.tk-table th:first-child, .tk-table td:first-child { padding-left: 0.85rem; }
.tk-table th:last-child, .tk-table td:last-child { padding-right: 0.85rem; }
.tk-table tbody tr:hover td { background: var(--t-soft); }
.tk-table .c-time { color: var(--dim); }
.tk-table .c-time a { color: inherit; text-decoration: none; }
.tk-table .c-time a:hover { color: var(--lime); text-decoration: underline; }
.tk-table .c-who { color: var(--dim); }
.tk-buy .c-side { color: var(--lime); font-weight: 600; }
.tk-sell .c-side { color: var(--red); font-weight: 600; }
.tk-trades-empty { margin: 0; padding: 1.4rem 0.85rem; font-size: var(--t-small); }
.tk-localnote { margin-top: 0.6rem; max-width: none; }

/* a finalized launch's own facts, lower on the page */
.launch-details > :first-child { margin-top: 1rem; }

/* ---------- addresses in the homepage lists ---------- */
.dc-addr { display: flex; align-items: center; gap: 0.5rem; height: 2rem; padding: 0 0.8rem; border-top: 1px solid var(--line); }
.dc-addr .d-label { flex: none; }
.dc-addr .addrchip { margin-left: auto; }
.dcard-launched { display: flex; flex-direction: column; height: calc(var(--d-card-h) + 2rem); }
.dcard-launched .dcard-main { height: auto; flex: 1 1 auto; min-height: 0; }
.dt-addr { display: block; margin-top: 0.15rem; line-height: 1; }
.dt-addr .addr-short { font-size: 0.68rem; color: var(--dim); }
.dt-addr .addrchip { gap: 0.3rem; }
.dt-addr button.copy { font-size: 0.62rem; padding: 0 0.3rem; }
.dt-addr .addr-x { width: 1.1rem; height: 1.1rem; font-size: 0.68rem; border-radius: 5px; }
.dtable tbody tr.row-link { cursor: pointer; }
.q-row .addrchip { justify-content: flex-end; }

/* ---------- narrower screens ---------- */
@media (max-width: 68rem) {
  .tk-main { grid-template-columns: minmax(0, 1fr); }
  .tk-trades-scroll { flex: none; max-height: 24rem; min-height: 0; }
  .tk-plot { min-height: 24rem; }
}
@media (max-width: 52rem) {
  .tk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-live { margin-left: 0; }
}
@media (max-width: 36rem) {
  .tk-head { flex-direction: column; align-items: stretch; }
  .tk-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-links .button { text-align: center; padding: 0.5rem 0.3rem; font-size: 0.8125rem; }
  .tk-links .tk-trade { grid-column: 1 / -1; }
  .tk-plot { min-height: 19rem; }
  .tk-val { font-size: 1rem; }
  .tk-tile:first-child .tk-val { font-size: 1.15rem; }
  .tk-tile { padding: 0.6rem 0.7rem 0.65rem; }
  .tseg-tf { display: flex; width: 100%; }
  .tseg-tf .tseg-btn { flex: 1; padding-left: 0; padding-right: 0; }
  .tk-table .c-tok, .tk-table .c-who { display: none; }
  .tk-table th:nth-child(5), .tk-table td:nth-child(5) { padding-right: 0.85rem; }
  .tk-chart { padding: 0.65rem 0.6rem 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tk .flash, .tk .flash-up, .tk .flash-down, .tk .slide-in { animation: none !important; }
}

/* prices and the view switch on the token page */
.tk-val .px-hype { font-size: 0.62em; }
.tk-table .c-usd { color: var(--text); }
.tk-table .c-hype, .tk-table .c-tok { color: var(--dim); }
.dc-big.px .px-hype { font-size: 0.5em; }
.dtable td.c-price .px { flex-direction: column; align-items: flex-end; gap: 0; }
.dtable td.c-price .px-hype { font-size: 0.68rem; line-height: 1.2; }
@media (max-width: 36rem) {
  .tseg-view { display: flex; width: 100%; }
  .tseg-view .tseg-btn { flex: 1; }
  .tk-table .c-hype { display: none; }
}

.tk-legrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; margin-top: 0.55rem; }
.tk-legrow .tk-legend { margin-top: 0; }
.tk-legrow .tk-live { margin-left: 0; flex: none; height: 1.35rem; }
.tk-val .px-hype { margin-left: 0.55em; }
.tk-table.has-usd .c-hype, .tk-table.no-usd .c-usd { display: none; }
/* cards: the dollar price, and the HYPE price under it */
.dcard-launched { height: calc(var(--d-card-h) + 2.6rem); }
.dcard-launched .dc-lead { height: 2.5rem; }
.dc-big.px { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 0.28rem; }
.dc-big.px .px-hype { font-size: 0.68rem; line-height: 1; }

/* ---------- logos, the creator's info, and the Create page's preview ---------- */
.logo-box { display: inline-flex; flex: none; border-radius: 22%; overflow: hidden; background: var(--panel); vertical-align: middle; }
.logo-box .tk-logo { display: block; width: 100%; height: 100%; object-fit: cover; }
.d-logo { display: inline-flex; flex: none; align-self: center; }
.launchhead { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; }
.launchhead h1 { margin: 0; }
.tk-info { margin: 0.2rem 0 1rem; }
.tk-info-body:empty { display: none; }
.tk-desc { margin: 0 0 0.6rem; max-width: 70ch; overflow-wrap: anywhere; white-space: pre-line; }
.tk-extlinks { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 0.6rem; max-width: none; }
.tk-ext { padding: 0.3rem 0.75rem; font-size: 0.8125rem; border-radius: 8px; }
.tk-info-foot { margin: 0; max-width: none; }
.tk-info-foot:empty { display: none; }
.tk-info-foot .report { color: var(--dim); }
.tk-info-foot .report:hover { color: var(--amber); }
.q-about-row { display: block; }
.q-about { display: block; font-size: 0.72rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-link .d-logo { margin-right: 0.1rem; }
.dup-box:empty { display: none; }
.dup-box .note { margin: 0 0 1rem; }
.info-fields .hint { display: block; }
.info-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.2rem; margin-top: 0.8rem; align-items: start; }
.info-grid textarea { width: 100%; font: inherit; color: var(--text); background: var(--night); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.75rem; resize: vertical; }
.info-grid input[type="file"] { display: block; width: 100%; font: inherit; font-size: 0.875rem; color: var(--dim); }
.info-grid input[type="url"] { font-family: var(--mono); font-size: 0.875rem; }
.small-btn { padding: 0.25rem 0.7rem; font-size: 0.8125rem; margin-top: 0.4rem; }
.preview-label { margin: 0 0 0.4rem; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.66rem; }
.preview-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 0.9rem; position: sticky; top: 1rem; }
.preview-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.preview-head .logo-box { width: 56px; height: 56px; }
.preview-name { font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.preview-links { margin: 0; overflow-wrap: anywhere; color: var(--dim); }
@media (max-width: 52rem) { .info-grid { grid-template-columns: minmax(0, 1fr); } .preview-card { position: static; } }
.info-fields [hidden] { display: none !important; }
.info-grid .field { margin-bottom: 0.9rem; }
.info-grid textarea { margin-top: 0.45rem; }
.info-grid input[type="file"] { margin-top: 0.45rem; }
.info-fields { margin-bottom: 1.4rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
/* price tiles: the HYPE price drops to its own line when there is no room beside the dollar price */
.tk-tile .tk-val { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.55em; white-space: normal; }
.tk-val .px-hype { margin-left: 0; }
.preview-links > span { display: block; }

/* a name that is, or looks like, a well-known token's */
.d-fam { color: var(--red); border-color: rgba(255, 77, 46, 0.5); }
.famous-note { border-left-color: var(--red); }
.famous-note strong { color: var(--red); }
.fam-box .note { margin: 0 0 1rem; }

/* a card's or row's name always keeps some room beside its marks */
.dc-top .d-name, .dt-link .d-name { flex: 1 1 auto; min-width: 4ch; }
.dc-top .d-name { flex: 0 1 auto; }
.dc-top .d-dup, .dt-link .d-dup, .dc-top .d-sym, .dt-link .d-sym { flex: 0 0 auto; }
.dtable-launched .dt-link { max-width: 17rem; }

/* the auto-finalizer's address, where the site names it */
.finalizer-line { max-width: 72ch; }
.foot-bot { margin: 0.6rem 0; }
.finalizer-line .addrchip { margin: 0 0.15rem; }
