/* CoinRank Live — page styles (2026-11-29)
   Light, quiet, data-first. Deliberately not the dark neon of a DEX front end:
   this is a reading surface, the swap happens elsewhere. */

:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #fbfcff;
  --ink: #0d1225;
  --ink-2: #596079;
  --ink-3: #6f7691;
  --line: #e6e9f2;
  --line-2: #d8dcea;
  --brand: #4a5cff;
  --brand-2: #7b5cff;
  --brand-soft: #eef1ff;
  --up: #0a9d63;
  --up-soft: #e6f8ef;
  --down: #d83a4b;
  --down-soft: #fdecee;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(13, 18, 37, .04), 0 12px 32px rgba(13, 18, 37, .05);
  --font: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Liberation Sans", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: inherit; }

.shell { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 22px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- header */

.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 247, 251, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex; align-items: center; gap: 18px;
  height: 66px;
}

.logo {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; font-weight: 800; letter-spacing: -.02em;
  color: var(--brand);
  flex: 0 0 auto;
}
.logo .logo-bg { fill: currentColor; }
.logo-word { color: var(--ink); font-size: 19px; }
.logo-live {
  font-size: 10px; font-weight: 800; letter-spacing: .1em;
  color: #fff; background: var(--up);
  padding: 3px 6px; border-radius: 6px;
  transform: translateY(-1px);
}
.logo.small .logo-word { font-size: 16px; }

.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a {
  text-decoration: none; color: var(--ink-2); font-size: 14.5px; font-weight: 600;
  padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { color: var(--ink); background: #eef0f8; }
.nav a[aria-current="page"] { color: var(--ink); }

.bar-actions { margin-left: auto; display: flex; gap: 9px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer;
  padding: 10px 16px; border-radius: 11px;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn-solid {
  background: linear-gradient(180deg, var(--brand), #3d4df0);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 18px rgba(74, 92, 255, .24);
}
.btn-solid:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 12px 24px rgba(74, 92, 255, .3); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: #b9c0d8; background: #fff; }
.btn-lg { padding: 13px 20px; font-size: 15.5px; border-radius: 12px; }

/* ------------------------------------------------------------------ hero */

.hero { padding: 54px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
  gap: 40px; align-items: start;
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line);
  padding: 6px 12px 6px 10px; border-radius: 999px;
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--up);
  box-shadow: 0 0 0 3px rgba(10, 157, 99, .16);
}

h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.06; letter-spacing: -.035em; font-weight: 800;
}
.grad {
  background: linear-gradient(96deg, var(--brand) 0%, var(--brand-2) 62%, #b45cff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin: 0 0 24px; color: var(--ink-2); font-size: 17px; max-width: 62ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-fine { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }

.hero-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow);
}
.stat-k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--ink-3); text-transform: uppercase; }
.stat-v { display: block; margin: 5px 0 2px; font-size: 23px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-d { display: block; font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- movers */

.movers { padding: 6px 0 30px; }
.movers-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.movers-head h2 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.muted { color: var(--ink-3); font-size: 13px; }
.mover-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mover {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 14px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease;
}
.mover:hover { border-color: #c3c9e4; transform: translateY(-1px); box-shadow: var(--shadow); }
.mover-top { display: flex; align-items: center; gap: 8px; }
.mover-top img, .mover-av {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--brand-soft);
  font-size: 10px; font-weight: 800; color: var(--brand); display: grid; place-items: center;
}
.mover-sym { font-weight: 800; font-size: 14px; letter-spacing: -.01em; }
.mover-pct { margin-left: auto; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.mover-price { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- markets */

.markets { padding: 6px 0 20px; }
.m-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.m-title { margin: 0; font-size: clamp(21px, 2.4vw, 26px); letter-spacing: -.028em; }
.m-sub { margin: 5px 0 0; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.m-tools { display: flex; gap: 9px; align-items: center; }

.search {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 11px;
  padding: 0 12px; height: 42px; color: var(--ink-3);
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(74,92,255,.12); color: var(--brand); }
.search input {
  border: 0; outline: 0; background: transparent; font: inherit; font-size: 14.5px;
  color: var(--ink); width: 210px; height: 100%;
}
.search input::placeholder { color: var(--ink-3); }
.btn-refresh { height: 42px; }
.btn-refresh svg { transition: transform .5s ease; }
.btn-refresh.is-spin svg { transform: rotate(360deg); }

.sort-wrap { display: none; }
.sort-sel {
  font: inherit; font-size: 14px; font-weight: 650; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 11px;
  height: 42px; padding: 0 10px; cursor: pointer;
}

.chips {
  display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  font: inherit; font-size: 13.5px; font-weight: 650; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line-2); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; white-space: nowrap;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.chip:hover { border-color: #bfc5dc; color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* sponsor band */
.sponsor {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(104deg, #eef1ff 0%, #f4efff 55%, #fff 100%);
  border: 1px solid #dfe3fb; border-radius: 14px;
  padding: 14px 18px; margin-bottom: 14px;
}
.sponsor-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sponsor-copy b { font-size: 14.5px; letter-spacing: -.01em; }
.sponsor-copy span:last-child { font-size: 13px; color: var(--ink-2); }
.sponsor-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--brand);
  background: #fff; border: 1px solid #dfe3fb; border-radius: 5px;
  padding: 2px 6px; align-self: flex-start; margin-bottom: 2px;
}
.sponsor .btn { margin-left: auto; flex: 0 0 auto; }

/* table */
.table-wrap {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  /* clip, not hidden: `overflow: hidden` would make this card the scroll container
     and the sticky column header would never stick */
  overflow: clip;
}
@supports not (overflow: clip) {
  .table-wrap { overflow: hidden; }
}
.tbl {
  width: 100%;
  /* separate, not collapse: Chrome does not stick a header cell inside a
     collapsed table, and the sticky header is worth more than shared borders */
  border-collapse: separate;
  border-spacing: 0;
}
.tbl thead th {
  position: sticky; top: 66px; z-index: 5;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 11px 12px; text-align: left; white-space: nowrap;
}
.tbl thead th.num { text-align: right; }
.th-sort {
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit;
  background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 3px;
}
.th-sort:hover { color: var(--ink); }
.th-sort.is-on { color: var(--ink); }
.th-sort.is-on::after { content: "▾"; font-size: 9px; opacity: .75; }
.th-sort.is-on.is-asc::after { content: "▴"; }

.tbl tbody td {
  padding: 9px 12px; border-bottom: 1px solid #f0f2f9;
  font-size: 14px; vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafbff; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.c-rank { width: 46px; }
.c-rank, .rank { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.c-coin { min-width: 190px; }
.c-price { white-space: nowrap; font-weight: 650; }
.c-pct { width: 78px; white-space: nowrap; }
.c-mcap { width: 118px; white-space: nowrap; }
.c-vol { width: 118px; white-space: nowrap; }
.c-spark { width: 104px; }
.tbl.no-spark .c-spark { display: none; }
.c-act { width: 148px; }

.coin { display: flex; align-items: center; gap: 10px; min-width: 0; }
.coin img, .coin .av {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto;
  background: var(--brand-soft); color: var(--brand);
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.coin-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.coin-sym { font-weight: 750; letter-spacing: -.01em; font-size: 14.5px; }
.coin-name { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.m-price { display: none; }

.pct { display: inline-block; min-width: 62px; padding: 3px 7px; border-radius: 7px; font-weight: 650; font-size: 13px; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--ink-3); }
.pct.up { background: var(--up-soft); }
.pct.down { background: var(--down-soft); }
.pct.flat { background: #f3f4f9; }

.spark { display: block; width: 88px; height: 26px; }
.spark path { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark.up path { stroke: var(--up); }
.spark.down path { stroke: var(--down); }
.spark.flat path { stroke: var(--ink-3); }

.acts { display: flex; gap: 6px; justify-content: flex-end; }
.act {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 11px; border-radius: 8px;
  font-size: 12.5px; font-weight: 750; letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.act-swap { background: var(--brand-soft); color: var(--brand); }
.act-swap:hover { background: #e2e6ff; }
.act-scan { background: #fff; color: var(--ink-2); border-color: var(--line-2); }
.act-scan:hover { border-color: #b9c0d8; color: var(--ink); }
.act-no { background: #f4f5fa; color: var(--ink-3); cursor: default; }

/* skeleton + state */
.skel td { padding: 0; border-bottom: 1px solid #f0f2f9; }
.skel span {
  display: block; height: 44px;
  background: linear-gradient(90deg, #f2f4fa 25%, #e9ecf6 37%, #f2f4fa 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.noscript { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 14px; color: var(--ink-2); }
.noscript code { font-family: var(--mono); font-size: 12.5px; }

.state { padding: 42px 20px; text-align: center; }
.state-msg { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; }
.empty-row td { padding: 34px 12px; text-align: center; color: var(--ink-2); }

.under-table {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 12px 2px 0; font-size: 12.5px; color: var(--ink-3);
}
.sep { opacity: .6; }

/* ------------------------------------------------------------------ band */

.band { padding: 46px 0 8px; }
.band-title { margin: 0 0 8px; font-size: clamp(21px, 2.4vw, 26px); letter-spacing: -.028em; }
.band-lede { margin: 0 0 20px; color: var(--ink-2); font-size: 15px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; box-shadow: var(--shadow);
}
.card-ico {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 13px;
  margin-bottom: 12px;
}
.card h3 { margin: 0 0 7px; font-size: 15.5px; letter-spacing: -.015em; }
.card p { margin: 0; color: var(--ink-2); font-size: 13.8px; }

.band-cta {
  margin-top: 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 20px 22px;
}
.band-cta b { display: block; font-size: 16px; letter-spacing: -.02em; }
.band-cta span { font-size: 13.5px; color: #b9bfd4; }
.band-cta-btns { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }
.band-cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.24); }
.band-cta .btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }

/* ------------------------------------------------------------------- faq */

.faq { padding: 46px 0 10px; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 0 16px; margin-bottom: 9px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 14.8px;
  letter-spacing: -.01em; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--ink-3); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0 0 15px; color: var(--ink-2); font-size: 14px; max-width: 82ch; }

/* ------------------------------------------------------------------ foot */

.foot { margin-top: 46px; border-top: 1px solid var(--line); background: #fff; padding: 30px 0 26px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; }
.foot-note { margin: 10px 0 6px; color: var(--ink-2); font-size: 13.5px; max-width: 46ch; }
.foot-fine { margin: 0; font-size: 12.5px; color: var(--ink-3); max-width: 52ch; }
.foot-fine a { color: var(--ink-2); }
.foot-cols { display: flex; gap: 34px; flex-wrap: wrap; }
.foot-col { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.foot-k { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.foot-col a { color: var(--ink-2); text-decoration: none; }
.foot-col a:hover { color: var(--brand); }
.foot-legal { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }

/* --------------------------------------------------------- breakpoints */

@media (max-width: 1080px) {
  .c-vol { display: none; }
  .tbl thead .c-vol { display: none; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero { padding: 34px 0 30px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .mover-row { grid-template-columns: 1fr 1fr; }
  /* on a phone the table is the point: it comes right after the hero, and the
     movers strip follows it instead of pushing it 400px down the page */
  main { display: flex; flex-direction: column; }
  .hero { order: 1; }
  .markets { order: 2; }
  /* a phone gets the table first; the movers strip would land 9,000px below it,
     so it is left to the desktop layout rather than shown where nobody reaches it */
  .movers { display: none; }
  .band { order: 4; }
  .faq { order: 5; }
  .cards { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .c-spark, .tbl thead .c-spark { display: none; }
  .c-pct { width: 66px; }
  .c-mcap { width: 104px; }
}

@media (max-width: 760px) {
  .bar { height: 60px; gap: 10px; }
  .bar-actions .btn-ghost { display: none; }
  .tbl thead th { top: 60px; }
  .shell { padding: 0 16px; }

  /* one list row: coin cell carries price and 24h change, trade cell carries the buttons */
  .tbl thead .c-rank, .tbl thead .c-price, .tbl thead .c-pct,
  .tbl thead .c-mcap, .tbl thead .c-vol, .tbl thead .c-spark { display: none; }
  .tbl tbody .c-rank, .tbl tbody .c-price, .tbl tbody .c-pct,
  .tbl tbody .c-mcap, .tbl tbody .c-vol, .tbl tbody .c-spark { display: none; }
  .tbl tbody td { padding: 11px 4px; }
  .tbl thead th { padding: 10px 4px; }
  .tbl thead th.c-coin { padding-left: 4px; }
  .tbl { table-layout: fixed; }
  .c-coin { min-width: 0; width: auto; }
  .coin { max-width: 100%; }
  .coin-txt { overflow: hidden; }
  .c-act { width: 128px; }
  .coin-name { max-width: 100%; }
  .m-price {
    display: flex; align-items: center; gap: 8px;
    margin-top: 2px; font-size: 13px; color: var(--ink-2);
  }
  .m-price .mp-num { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
  .m-price .pct { min-width: 0; padding: 2px 6px; font-size: 12px; }
  .act { height: 32px; padding: 0 10px; font-size: 12px; }
  .c-act .acts { gap: 5px; }

  .sponsor { flex-direction: column; align-items: flex-start; gap: 12px; }
  .sponsor .btn { margin-left: 0; width: 100%; }
  .m-head { align-items: flex-start; }
  .m-tools { width: 100%; flex-wrap: wrap; }
  .search { flex: 1 1 100%; }
  .search input { width: 100%; min-width: 0; }
  .sort-wrap { display: block; flex: 1 1 auto; }
  .sort-sel { width: 100%; }
  .btn-refresh { flex: 0 0 auto; }
  .band-cta { flex-direction: column; align-items: flex-start; }
  .band-cta-btns { margin-left: 0; width: 100%; }
  .band-cta-btns .btn { flex: 1 1 auto; }
  .hero-cta .btn { flex: 1 1 auto; }
}

@media (max-width: 420px) {
  h1 { font-size: 30px; }
  .mover-row { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px 13px; }
  .stat-v { font-size: 20px; }
  .c-act { width: 120px; }
  .act { padding: 0 9px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
