:root {
  --ink: #13151a;
  --muted: #707887;
  --line: #e5e7eb;
  --soft-line: #eff0f2;
  --paper: #ffffff;
  --wash: #f5f6f7;
  --red-1: #b5242f;
  --red-2: #d94a55;
  --blue-1: #1f5fbf;
  --blue-2: #55a8ee;
  --green: #14875d;
  --display: "Newsreader", Georgia, serif;
  --sans: "Manrope", sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.topline {
  height: 3px;
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  background: #eceef1;
}

.topline__red { background: var(--red-1); }
.topline__blue { background: var(--blue-1); }

.site-header,
main,
footer {
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -1.1px;
}

.brand svg { width: 32px; height: 32px; }
.brand--header { align-items: flex-start; }
.brand--header svg { margin-top: 0; }
.brand-lockup { display: grid; min-width: 0; gap: 2px; }
.brand-lockup strong { font-size: 19px; line-height: 1.15; letter-spacing: -1.1px; }
.brand-lockup small { color: #7c8490; font-size: 9px; font-weight: 600; letter-spacing: .01em; line-height: 1.35; }
.maker-link { display: inline-flex; align-items: baseline; gap: 4px; width: fit-content; color: #8b929d; font-size: 10px; font-weight: 600; letter-spacing: 0; transition: color .2s ease; }
.maker-link strong { color: #454c57; font-family: var(--mono); font-weight: 500; }
.maker-link:hover, .maker-link:hover strong { color: var(--ink); }
.maker-link--header { margin-left: auto; }

.coin-mark { flex: 0 0 auto; overflow: visible; transform-origin: center; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.brand:hover .coin-mark { transform: rotate(12deg); }
.coin-mark__orbit { fill: none; stroke: #b8bdc5; stroke-width: 1.2; stroke-linecap: round; }
.coin-mark__edge { fill: #15171c; }
.coin-mark__face { stroke: #15171c; stroke-width: 1.35; }
.coin-mark__face--red-dark { fill: var(--red-1); }
.coin-mark__face--red-light { fill: var(--red-2); }
.coin-mark__face--blue-dark { fill: var(--blue-1); }
.coin-mark__face--blue-light { fill: var(--blue-2); }
.coin-mark__glint { fill: none; stroke: rgba(255,255,255,.86); stroke-width: 1; stroke-linecap: round; }

main { padding-top: 42px; }

.content-shell { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 22px; align-items: start; }
.primary-column { min-width: 0; }
.market-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: stretch; }
.chart-panel { border: 1px solid #dfe2e6; border-radius: 11px; background: #fff; }
.chart-panel { min-width: 0; overflow: hidden; }
.chart-topbar { padding: 22px 24px 17px; display: flex; justify-content: space-between; align-items: flex-start; }
.micro-label { display: block; color: #858c97; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; margin-bottom: 4px; }
.combined-value-row { display: flex; align-items: baseline; gap: 11px; }
.combined-value-row strong { font-family: var(--display); font-size: 34px; line-height: 1; letter-spacing: -1.2px; }
.trend { font-family: var(--mono); font-size: 11px; font-weight: 500; }
.trend.positive { color: var(--green); }
.trend.negative { color: var(--red-1); }
.range-switcher { padding: 3px; border: 1px solid #e1e3e7; border-radius: 7px; display: flex; background: #f7f8f9; }
.range-switcher button { min-width: 38px; padding: 6px 9px; border: 0; border-radius: 5px; background: transparent; color: #858c97; font-family: var(--mono); font-size: 10px; cursor: pointer; }
.range-switcher button:hover { color: var(--ink); }
.range-switcher button.active { color: #fff; background: var(--ink); }

.legend { border-top: 1px solid var(--soft-line); border-bottom: 1px solid var(--soft-line); padding: 13px 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.legend-item { appearance: none; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; background: transparent; color: #626a76; font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; transition: opacity .2s ease, color .2s ease; }
.legend-item i { width: 8px; height: 8px; border-radius: 50%; background: var(--candidate-color); }
.legend-item b { color: #30343a; font-family: var(--mono); font-size: 11px; font-weight: 500; }
.legend-item strong { color: var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.legend-item em { color: #8b929d; border-left: 1px solid #dfe2e6; padding-left: 8px; font-family: var(--mono); font-size: 11px; font-style: normal; font-weight: 500; }
.legend-item:hover, .legend-item.isolated { color: var(--ink); }
.legend.has-isolate .legend-item:not(.isolated) { opacity: .35; }

.chart-wrap { position: relative; height: 376px; padding: 10px 10px 0; }
#marketChart { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: pan-y; outline: none; }
#marketChart:focus-visible { box-shadow: inset 0 0 0 2px rgba(31,95,191,.28); }
.chart-footer { border-top: 1px solid var(--soft-line); padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; color: #8b929d; font-size: 11px; }
.chart-footer > span { display: flex; align-items: center; gap: 7px; }
.chart-footer svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.primary-link { height: 45px; border-radius: 7px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; font-weight: 800; transition: .2s ease; }
.primary-link:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(19,21,26,.16); }
.primary-link svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.field-section { padding: 0; }
.market-meta { min-height: 64px; border-bottom: 1px solid #ced2d8; display: flex; align-items: center; gap: 16px; color: #626a76; font-size: 12px; font-weight: 600; }
.market-meta > span { display: flex; align-items: center; gap: 7px; }
.market-meta strong { color: var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.market-meta svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.market-meta > i { width: 1px; height: 18px; background: #d9dce1; }
.candidate-table { border-top: 0; }
.candidate-row { --candidate-color: var(--ink); display: grid; grid-template-columns: 52px minmax(360px, 1.7fr) 132px 170px; align-items: center; gap: 18px; min-height: 112px; border-bottom: 1px solid #e2e4e8; position: relative; cursor: pointer; transition: background .2s; }
.candidate-row::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; background: var(--candidate-color); transform: scaleY(0); transition: transform .2s; }
.candidate-row:hover { background: #fafafa; }
.candidate-row:hover::before, .candidate-row.isolated::before { transform: scaleY(1); }
.candidate-row:last-child { border-bottom: 0; }
.rank { font-family: var(--display); color: #a1a7b0; font-size: 19px; padding-left: 12px; }
.candidate-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mini-avatar { position: relative; width: 47px; height: 47px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: white; background: var(--candidate-color); font-family: var(--display); font-size: 16px; box-shadow: 0 1px 4px rgba(19,21,26,.12); }
.mini-avatar::after { content: ""; position: absolute; z-index: 2; inset: 0; border: 2px solid var(--candidate-color); border-radius: inherit; pointer-events: none; }
.mini-avatar span { position: relative; z-index: 0; }
.mini-avatar img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.identity-text { min-width: 0; }
.candidate-titleline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.candidate-name { display: block; flex: 0 1 auto; min-width: 0; font-size: 15px; letter-spacing: -.25px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.candidate-name > span { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: -.02em; }
.candidate-name > small { color: #6f7783; font-size: 13px; font-weight: 600; }
.candidate-tokenline { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.candidate-capline { display: flex; align-items: baseline; gap: 7px; margin-top: 6px; }
.candidate-capline span { color: #9299a3; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.candidate-capline strong { color: #454c57; font-family: var(--mono); font-size: 12px; font-weight: 500; }
.share-cell span { display: block; color: #9096a0; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px; }
.share-value-row { display: flex; align-items: center; gap: 4px; }
.change { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 10px; line-height: 1; }
.change.up { color: var(--green); }
.change.down { color: var(--red-1); }
.change::before { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.change.up::before { border-bottom: 6px solid currentColor; }
.change.down::before { border-top: 6px solid currentColor; }
.share-cell strong { font-family: var(--display); font-size: 32px; line-height: .95; letter-spacing: -1px; }
.market-link { justify-self: end; width: 160px; height: 40px; border: 1px solid #dfe2e6; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; font-weight: 800; transition: .2s ease; }
.market-link:hover { background: var(--candidate-color); border-color: var(--candidate-color); color: white; }
.market-link svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.copy-contract { flex: 0 0 auto; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: #8b929d; transition: color .2s ease, transform .2s ease; }
.copy-contract:hover { color: var(--candidate-color); transform: translateY(-1px); }
.copy-contract svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.token-social { width: 32px; height: 32px; display: grid; place-items: center; color: #8b929d; transition: color .2s ease, transform .2s ease; }
.token-social:hover { color: var(--candidate-color); transform: translateY(-1px); }
.token-social svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.token-social--x svg { fill: currentColor; stroke: none; }

.trade-sidebar { position: sticky; top: 24px; min-width: 0; }
.trade-sidebar-card { position: relative; overflow: hidden; border: 1px solid #dfe2e6; border-radius: 11px; background: #fff; box-shadow: 0 12px 34px rgba(19,21,26,.055); }
.trade-sidebar-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--red-1) 0 25%, var(--red-2) 25% 50%, var(--blue-1) 50% 75%, var(--blue-2) 75%); }
.trade-sidebar__header { padding: 25px 20px 20px; border-bottom: 1px solid var(--soft-line); }
.trade-sidebar__header h2 { margin: 0; font-family: var(--display); font-size: 24px; line-height: 1.05; letter-spacing: -.55px; }
.fomo-trade-list { display: flex; flex-direction: column; }
.fomo-token { --candidate-color: var(--ink); position: relative; display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 74px; padding: 12px 15px; border-bottom: 1px solid var(--soft-line); transition: background .2s ease; }
.fomo-token:last-child { border-bottom: 0; }
.fomo-token::before { content: ""; position: absolute; left: 0; top: 17px; bottom: 17px; width: 3px; background: var(--candidate-color); transform: scaleY(0); transition: transform .2s ease; }
.fomo-token:hover { background: #fafafa; }
.fomo-token:hover::before { transform: scaleY(1); }
.fomo-token__avatar { position: relative; width: 39px; height: 39px; overflow: hidden; display: grid; place-items: center; border-radius: 50%; background: var(--candidate-color); color: #fff; font-family: var(--display); font-size: 13px; box-shadow: 0 1px 4px rgba(19,21,26,.12); }
.fomo-token__avatar::after { content: ""; position: absolute; z-index: 2; inset: 0; border: 2px solid var(--candidate-color); border-radius: inherit; pointer-events: none; }
.fomo-token__avatar span { position: relative; z-index: 0; }
.fomo-token__avatar img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.fomo-token__body { min-width: 0; display: grid; gap: 3px; }
.fomo-token__body strong { overflow: hidden; color: #30343a; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.fomo-token__body strong small { color: #737b87; font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.fomo-token__body > span { color: #9299a3; font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.fomo-token__action { display: inline-flex; align-items: center; gap: 4px; color: #4f5661; font-size: 10px; font-weight: 800; }
.fomo-token__action svg { width: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .2s ease; }
.fomo-token:hover .fomo-token__action { color: var(--candidate-color); }
.fomo-token:hover .fomo-token__action svg { transform: translateX(2px); }
footer { border-top: 1px solid #dfe2e6; min-height: 120px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 30px; color: #7f8792; font-size: 11px; }
.footer-lockup { min-width: 0; display: grid; gap: 5px; }
.brand--small { color: var(--ink); font-size: 18px; }
.brand--small svg { width: 23px; height: 23px; }
.footer-lockup p { margin: 0 0 0 33px; max-width: 680px; line-height: 1.6; }
.maker-link--footer { justify-self: end; }

.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; border-radius: 7px; padding: 10px 15px; font-size: 11px; font-weight: 700; box-shadow: 0 8px 25px rgba(0,0,0,.18); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(24,163,110,.1); } 50% { box-shadow: 0 0 0 7px rgba(24,163,110,0); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.market-layout, .field-section, .trade-sidebar { animation: rise .6s both; }
.market-layout { animation-delay: .08s; }
.field-section { animation-delay: .16s; }
.trade-sidebar { animation-delay: .2s; }

@media (max-width: 1120px) {
  .content-shell { grid-template-columns: 1fr; }
  .trade-sidebar { position: static; }
  .fomo-trade-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fomo-token:nth-child(odd) { border-right: 1px solid var(--soft-line); }
}

@media (max-width: 1050px) {
  .candidate-row { grid-template-columns: 42px minmax(280px,1.4fr) 112px 125px; gap: 12px; }
  .market-link { width: 122px; }
}

@media (max-width: 790px) {
  .site-header, main, footer { width: min(100% - 28px, 1280px); }
  .site-header { min-height: 0; padding: 19px 0 20px; }
  .brand--header { width: 100%; }
  .brand-lockup { gap: 3px; }
  .brand-lockup small { font-size: 10px; }
  .maker-link--header { display: none; }
  main { padding-top: 34px; }
  .market-layout { grid-template-columns: 1fr; }
  .chart-wrap { height: 325px; }
  .candidate-row { grid-template-columns: 34px minmax(0, 1fr) 92px; grid-template-areas: "rank identity share" ". trade trade"; min-height: 0; padding: 14px 0 16px; gap: 10px 10px; }
  .rank { grid-area: rank; }
  .candidate-identity { grid-area: identity; }
  .share-cell { grid-area: share; }
  .market-link { grid-area: trade; display: flex; width: auto; height: 38px; justify-self: stretch; }
  .trade-sidebar { display: none; }
  .share-cell { text-align: center; }
  .share-value-row { flex-direction: column; align-items: center; gap: 6px; }
  footer { grid-template-columns: 1fr; padding: 28px 0; gap: 14px; }
  .footer-lockup p { font-size: 11px; line-height: 1.65; }
  .maker-link--footer { justify-self: start; margin-left: 33px; font-size: 11px; }
}

@media (max-width: 500px) {
  .chart-topbar { display: block; padding: 18px; }
  .micro-label { font-size: 11px; }
  .trend { font-size: 12px; }
  .range-switcher { margin-top: 14px; width: 100%; }
  .range-switcher button { flex: 1; font-size: 11px; }
  .legend { display: grid; grid-template-columns: 1fr; padding: 0 18px; gap: 0; }
  .legend-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; width: 100%; min-height: 44px; gap: 9px; border-bottom: 1px solid var(--soft-line); white-space: nowrap; }
  .legend-item:last-child { border-bottom: 0; }
  .legend-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .legend-item b { font-size: 11px; }
  .legend-item strong { font-size: 12px; }
  .legend-item em { font-size: 11px; }
  .chart-wrap { height: 280px; padding-inline: 0; }
  .chart-footer { font-size: 11px; }
  .market-meta { min-height: 60px; gap: 10px; font-size: 11px; }
  .market-meta strong { font-size: 11px; }
  .candidate-row { grid-template-columns: 24px minmax(0, 1fr) 78px; gap: 8px 7px; }
  .rank { padding-left: 9px; font-size: 17px; }
  .candidate-identity { gap: 10px; }
  .mini-avatar { width: 42px; height: 42px; font-size: 15px; }
  .candidate-titleline { gap: 6px; }
  .candidate-name { font-size: 13px; }
  .candidate-name > span, .candidate-name > small { font-size: 11px; }
  .candidate-tokenline { gap: 0; }
  .candidate-capline span { font-size: 10px; }
  .candidate-capline strong { font-size: 12px; }
  .share-cell span { font-size: 10px; }
  .share-cell strong { font-size: 29px; }
  .market-link { font-size: 12px; }
}

@media (hover: none) {
  .candidate-row:hover::before { transform: scaleY(0); }
  .candidate-row.isolated::before { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
