:root {
  --bg: #09090a;
  --panel: #0b0b0d;
  --raise: #15161a;
  --sunk: #09090b;
  --ink: #f5f3ed;
  --ink2: #d4d1c8;
  --ink3: #b0ada4;
  --ink4: #8a8780;
  --line: #f1efe821;
  --line-soft: #f1efe812;
  --line-strong: #f1efe833;
  --accent: #3cf0a8;
  --up: #3cf0a8;
  --danger: #ff9382;
  --amber: #ffcc66;
  --cyan: #5ec8ff;
  --violet: #a98cff;
  --c-ethereum: #8c8dfb;
  --c-base: #2f7cff;
  --c-robinhood: #35e07a;
  --c-bsc: #f0b90b;
  --c-solana: #9945ff;
  --chart-grid: #f1efe80c;
  --chart-vol: #f1efe826;
  --skel: #1c1d22;
  --on-accent: #09090a;
  --sans: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r: 16px;
}
/* Light theme (web/theme.js), Pangea's own light palette (pangea.trade, 2026-10-28): paper background, white cards,
   ink #17131c. Greens/reds/ambers are darker than in the dark theme so text in them stays readable on white. */
:root[data-theme="light"] {
  --bg: #f8f6f2;
  --panel: #ffffff;
  --raise: #ebe7df;
  --sunk: #f1eee8;
  --ink: #17131c;
  --ink2: #2f2a35;
  --ink3: #575160;
  --ink4: #7a7480;
  --line: #17131c21;
  --line-soft: #17131c12;
  --line-strong: #17131c38;
  --accent: #23d896;
  --up: #0a9b68;
  --danger: #d64535;
  --amber: #b7791f;
  --cyan: #1a86c9;
  --violet: #6a4bd6;
  --chart-grid: #17131c0d;
  --chart-vol: #17131c22;
  --skel: #f3f0ea;
  --on-accent: #09090a;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.dim { color: var(--ink3); }
.dimmer { color: var(--ink4); }
.up { color: var(--up); }
.down { color: var(--danger); }
.amber { color: var(--amber); }

/* header */
header.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.brand svg { width: 28px; height: 28px; }
.search { flex: 1; max-width: 520px; margin-left: auto; position: relative; }
.search input { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px 9px 34px; font-size: 14px; outline: none; }
.search input:focus { border-color: var(--line-strong); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink4); }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; padding: 9px 14px; font-weight: 600; font-size: 14px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); }
.btn.primary { background: var(--accent); color: #09090a; border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; border-radius: 999px; padding: 8px 14px; }

main { max-width: 1200px; margin: 0 auto; padding: 16px 20px 60px; }
.status { font-size: 12px; color: var(--ink3); display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.dot.ok { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.dot.err { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin-bottom: 26px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.hero .card { padding: 22px; position: relative; overflow: hidden; min-height: 190px; }
.chip { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink2); }
.chip.live { background: var(--accent); color: #09090a; border-color: var(--accent); }
.display { font-weight: 900; font-size: 30px; letter-spacing: -0.03em; line-height: 1.05; margin: 14px 0 10px; }
.lede { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink2); max-width: 42ch; margin: 0; }
.stats { display: flex; gap: 22px; margin-top: 16px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; flex-wrap: wrap; }
.stats b { display: block; font-size: 18px; font-family: var(--sans); letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin-top: 3px; }
.globe { position: absolute; right: -60px; top: -40px; width: 300px; height: 300px; opacity: 0.9; pointer-events: none; }
.globe.heroimg { width: 250px; height: 250px; right: -40px; top: 50%; transform: translateY(-50%); border-radius: 50%; opacity: .95;
  box-shadow: 0 0 60px color-mix(in srgb, var(--accent) 18%, transparent); }
.hero .card .lede, .hero .card .display, .hero .card .stats { position: relative; z-index: 1; }
@media (max-width: 640px) { .globe.heroimg { width: 150px; height: 150px; right: -40px; top: 70px; transform: none; opacity: .35; } }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 104px; margin-top: 8px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .fill { width: 100%; border-radius: 3px; background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.28) 3px 4px); min-height: 4px; transition: height .6s; }
.bars span { font-family: var(--mono); font-size: 11px; color: var(--ink4); }
.bars em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ink2); }

/* tabs */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 13px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink2); }
.tab.on { border-color: var(--ink3); color: var(--ink); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.toolbar .count { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink3); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.coin .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin { padding: 14px 14px 12px; display: block; transition: border-color .15s; }
.coin:hover { border-color: var(--line-strong); }
.coin .row1 { display: flex; gap: 12px; align-items: flex-start; }
.logo { width: 46px; height: 46px; border-radius: 10px; background: var(--raise); flex: none; overflow: hidden; display: grid; place-items: center; font-weight: 800; color: var(--ink3); font-size: 15px; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.coin .name { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.coin .sub { font-family: var(--mono); font-size: 12px; color: var(--ink3); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.cdots { display: inline-flex; gap: 3px; }
.cdots i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; opacity: .25; }
.cdots i.on { opacity: 1; }
.coin .right { margin-left: auto; text-align: right; font-family: var(--mono); }
.coin .right b { font-family: var(--sans); font-size: 15px; display: block; }
.coin .row2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; font-size: 12px; color: var(--ink3); }
.coin .row2 b { display: block; font-family: var(--mono); font-weight: 500; font-size: 14px; color: var(--ink); margin-top: 3px; }
.spreadbar { display: flex; gap: 3px; margin-top: 12px; height: 26px; align-items: flex-end; }
.spreadbar div { flex: 1; border-radius: 2px; min-height: 3px; }
.coin .foot { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--ink4); }

.side .card { padding: 14px; }
.side h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink3); display: flex; align-items: center; gap: 8px; }
.feed { display: flex; flex-direction: column; gap: 2px; max-height: 70vh; overflow: auto; }
.ev { display: flex; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 8px; font-size: 13px; }
.ev:hover { background: var(--raise); }
.ev .k { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; padding: 3px 6px; border-radius: 4px; flex: none; }
.ev .k.launch { background: color-mix(in srgb, var(--cyan) 16%, transparent); color: var(--cyan); }
.ev .k.gap { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.ev .t { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink4); }

/* token page */
.thead { padding: 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.thead .logo { width: 64px; height: 64px; border-radius: 14px; }
.thead h1 { margin: 0; font-weight: 900; font-size: 30px; letter-spacing: -0.03em; }
.thead .kpis { margin-left: auto; display: flex; gap: 26px; font-size: 12px; color: var(--ink3); flex-wrap: wrap; }
.thead .kpis b { display: block; font-family: var(--mono); font-weight: 500; color: var(--ink); font-size: 18px; margin-top: 3px; }
.badge { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.badge.ok { background: var(--accent); color: #09090a; }
.badge.bad { background: var(--danger); color: #09090a; }
.badge.warn { border: 1px solid var(--amber); color: var(--amber); }
.tgrid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
.panel { padding: 16px; }
.panel h2 { margin: 0 0 12px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel h2 .dim { font-weight: 400; font-size: 12px; margin-left: auto; font-family: var(--mono); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--ink4); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 0 8px 8px; font-family: var(--mono); }
td { padding: 10px 8px; border-top: 1px solid var(--line-soft); font-family: var(--mono); }
td.num, th.num { text-align: right; }
.cname { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-family: var(--sans); }
.cname i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.tag { font-size: 10px; letter-spacing: .08em; padding: 2px 6px; border-radius: 4px; font-family: var(--mono); margin-left: 6px; }
.tag.lo { background: color-mix(in srgb, var(--up) 18%, transparent); color: var(--up); }
.tag.hi { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.addr { color: var(--ink3); cursor: pointer; }
.addr:hover { color: var(--ink); }
.buyrow { display: grid; grid-template-columns: 64px 1fr 110px; gap: 10px; align-items: center; margin: 8px 0; font-family: var(--mono); font-size: 13px; }
.buyrow .track { height: 22px; background: var(--sunk); border-radius: 4px; overflow: hidden; border: 1px solid var(--line-soft); }
.buyrow .track div { height: 100%; transition: width .5s; }
.buyrow .v { text-align: right; }
.amount { display: flex; gap: 6px; }
.amount button { border: 1px solid var(--line); background: var(--sunk); border-radius: 6px; padding: 4px 9px; font-family: var(--mono); font-size: 12px; cursor: pointer; color: var(--ink3); }
.amount button.on { color: var(--ink); border-color: var(--ink3); }
.note { font-size: 12px; color: var(--ink4); margin-top: 10px; line-height: 1.5; }
.warnbox { border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); background: color-mix(in srgb, var(--amber) 7%, transparent); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 10px; line-height: 1.5; }
.badbox { border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.okbox { border-color: color-mix(in srgb, var(--up) 45%, transparent); background: color-mix(in srgb, var(--up) 6%, transparent); }
.field { display: flex; gap: 8px; }
.field input { flex: 1; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-family: var(--mono); font-size: 12px; outline: none; min-width: 0; }
.skel { background: linear-gradient(90deg, var(--raise), var(--skel), var(--raise)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 6px; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { padding: 40px; text-align: center; color: var(--ink3); }

/* top nav */
.topnav { display: flex; gap: 4px; }
.topnav a { padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink3); }
.topnav a:hover { color: var(--ink); background: var(--raise); }

/* $PANGEA tracker */
.pg-hero { padding: 22px; }
.pg-title { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pg-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.pg-kpis > div { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--sunk); }
.pg-kpis span { display: block; font-size: 12px; color: var(--ink3); }
.pg-kpis b { display: block; font-family: var(--mono); font-weight: 500; font-size: 22px; margin: 6px 0 2px; }
.pg-kpis small { color: var(--ink4); font-size: 11px; }

/* radar + creators */
.badge .ic { width: 1.15em; height: 1.15em; vertical-align: -0.22em; }
.radarcard .pimg { width: 72px; height: 72px; }
.radarcard .pname a { display: flex; gap: 6px; min-width: 0; }
.reasons { margin: 4px 0 2px; padding-left: 16px; font-size: 12px; color: var(--ink2); line-height: 1.45; }
.pcard.is-dead { opacity: .5; }

/* developers */
.ep { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.ep:first-of-type { border-top: 0; }
.ep code { font-family: var(--mono); font-size: 13px; }
.ep .addr { font-size: 11px; word-break: break-all; }
.code { background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-family: var(--mono); font-size: 11px; white-space: pre-wrap; word-break: break-all; color: var(--ink2); margin: 10px 0; }

/* monochrome icon set (icons.js) */
.ic { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
.tab .ic { margin-right: 2px; }
/* emojis inside creators' descriptions render in grey too, so the board stays black and white */
.pdesc, .tdesc, .hot-name, .pname { filter: grayscale(1); }
.chip .ic { width: 1.25em; height: 1.25em; vertical-align: -0.28em; }

/* intro + 3D planet */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: center; margin: 4px 0 18px; }
.intro .display { font-size: 40px; margin: 14px 0 12px; }
.intro .lede { font-size: 14px; max-width: 48ch; }
.intro-cta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.planet { width: 340px; height: 340px; position: relative; }
.planet-fallback { width: 100%; height: 100%; }
.logo-anim { width: 100%; height: 100%; perspective: 900px; }
.logo-tilt { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; will-change: transform; }
.logo-base, .logo-eye { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; }
.logo-shine { position: absolute; inset: 4%; border-radius: 50%; pointer-events: none; mix-blend-mode: soft-light; --x: -60%;
  background: linear-gradient(115deg, transparent calc(var(--x) - 12%), rgba(255,255,255,.85) var(--x), transparent calc(var(--x) + 12%)); }

.intro .stats { margin-top: 20px; }

/* featured: Pangea · Pangaia · Hottest */
.featured3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.fcard { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 170px; transition: border-color .15s; }
a.fcard:hover { border-color: var(--line-strong); }
.fcard .frow { display: flex; gap: 14px; align-items: center; }
.fcard .pimg { width: 72px; height: 72px; }
.fcard .hot-name { font-size: 20px; margin: 0 0 4px; }
.fcard .pdesc { -webkit-line-clamp: 2; }
.fcard .chip { align-self: flex-start; }
.fcard.hot { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 7%, transparent); }
.fcard.ours { border-color: var(--line-strong); background: linear-gradient(160deg, var(--raise), var(--panel) 60%); }

/* full-width board + deal ribbon */
.board.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pcard.is-deal { border-color: color-mix(in srgb, var(--amber) 40%, var(--line-soft)); }
/* sits on the bottom edge of the coin picture, so the name stays readable */
.deal { position: absolute; left: 12px; top: 88px; width: 96px; z-index: 1; text-align: center; font-family: var(--mono); font-size: 10px; font-weight: 500;
  padding: 3px 4px; border-radius: 0 0 10px 10px; background: var(--amber); color: #09090a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more { display: flex; justify-content: center; margin: 16px 0 24px; }
.bridgecard { padding: 14px; max-width: 520px; }
.bridgecard h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink3); }

/* ticker */
.ticker { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-bottom: 12px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: inline-flex; gap: 14px; white-space: nowrap; padding: 9px 0; animation: tick 60s linear infinite; font-size: 13px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track a { color: var(--ink2); }
.ticker-track a:hover { color: var(--ink); }
.ticker-track .sep { color: var(--ink4); }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* featured */
.featured { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; margin-bottom: 22px; }
.featured .card { padding: 18px; }
.hot { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 7%, transparent); }
.hot-in { display: flex; gap: 18px; align-items: flex-start; }
.hot-name { font-weight: 900; font-size: 26px; letter-spacing: -0.03em; margin: 10px 0 4px; }
.side-stats .stats { margin-top: 12px; }
.side-stats .bars { height: 80px; }

/* pump-style coin cards */
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard { position: relative; display: flex; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line-soft); background: var(--panel); transition: border-color .15s, background .15s; min-height: 124px; overflow: hidden; }
.pcard:hover { border-color: var(--line-strong); background: var(--raise); }
.pimg { width: 96px; height: 96px; flex: none; border-radius: 10px; background: var(--raise); overflow: hidden; display: grid; place-items: center; font-weight: 800; color: var(--ink3); font-size: 22px; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg.big { width: 120px; height: 120px; border-radius: 14px; font-size: 30px; }
.pbody { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pname { font-weight: 800; font-size: 15px; display: flex; gap: 6px; min-width: 0; }
.pname span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pname .dim { font-family: var(--mono); font-weight: 400; font-size: 12px; flex: none; padding-top: 2px; }
.pmeta { font-size: 11px; color: var(--ink4); display: flex; align-items: center; gap: 6px; }
.pmc { font-size: 13px; color: var(--ink3); }
.pmc b { color: var(--accent); font-family: var(--mono); font-weight: 500; }
.pdesc { font-size: 12px; color: var(--ink3); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 0; }
.pfoot { font-size: 11px; color: var(--ink4); margin-top: auto; }
.pfoot b { color: var(--ink2); font-weight: 500; }
.chg { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 4px; }
.chg.up { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.chg.down { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.spark { position: absolute; right: 10px; top: 12px; width: 72px; height: 26px; opacity: .85; }

/* coin page */
.thead .tmain { flex: 1; min-width: 0; }
.tdesc { color: var(--ink2); font-size: 14px; line-height: 1.5; margin: 10px 0 12px; max-width: 70ch; }
.tdesc:empty { display: none; }
.kpis.card { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; padding: 14px 18px; margin-top: 12px; font-size: 12px; color: var(--ink3); }
.kpis b { display: block; font-family: var(--mono); font-weight: 500; font-size: 18px; color: var(--ink); margin-top: 4px; }
.kpis small { display: block; color: var(--ink4); font-size: 10px; margin-top: 2px; }
.tgrid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.tgrid .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.chart-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--sunk); max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 6px 10px; font-size: 12px; font-family: var(--mono); color: var(--ink3); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.seg button i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.seg button.on { background: var(--raise); color: var(--ink); }
.chart-legend { font-family: var(--mono); font-size: 13px; min-height: 20px; margin-bottom: 6px; }
.chart { height: 400px; position: relative; }
.chart .empty { padding-top: 160px; }
table.trades td { padding: 7px 8px; font-size: 12px; }
.contracts { display: grid; gap: 6px; margin-top: 12px; font-size: 12px; }

footer { border-top: 1px solid var(--line); padding: 20px; text-align: center; font-size: 12px; color: var(--ink4); font-family: var(--mono); line-height: 1.7; }

@media (max-width: 980px) {
  .layout, .tgrid, .hero, .featured { grid-template-columns: minmax(0, 1fr); }
  .featured3 { grid-template-columns: minmax(0, 1fr); }
  .pg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feed { max-height: 240px; }
}
@media (max-width: 640px) {
  header.top { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .topnav { order: 4; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { white-space: nowrap; }
  main { padding: 12px 16px 40px; }
  .grid, .board, .board.wide { grid-template-columns: minmax(0, 1fr); }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .intro .planet { order: -1; width: 240px; height: 240px; margin: 0 auto -6px; }
  .intro .display { font-size: 28px; }
  .pimg { width: 76px; height: 76px; }
  .deal { top: 70px; width: 76px; font-size: 9px; }
  .pimg.big { width: 84px; height: 84px; }
  .hot-in { gap: 12px; }
  .hot-name { font-size: 20px; }
  .kpis.card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart { height: 300px; }
  .display { font-size: 25px; }
  .thead .kpis { margin-left: 0; gap: 16px; }
  .btn.hide-s { display: none; }
  td, th { padding-left: 4px; padding-right: 4px; }
  .hide-s { display: none; }
}

/* ---- radar home (bubble map + ecosystem panel) ---- */
.rhero { padding: 18px 0 14px; }
.rhero .display { font-size: 46px; margin: 14px 0 12px; }
.rhero .lede { font-size: 14px; max-width: 60ch; }
.radar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; margin-bottom: 18px; }
.rmap { padding: 14px; min-width: 0; }
.rmap-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rmap-title b { font-size: 16px; }
.rmap-title .mono { font-size: 12px; margin-left: 6px; }
.rmap-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.bubbles { position: relative; height: 540px; border-radius: 12px; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%), var(--sunk); border: 1px solid var(--line-soft); overflow: hidden; touch-action: pan-y; }
.bub { position: absolute; left: 0; top: 0; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 1px; text-align: center; background: var(--raise); border: 2px solid var(--ring, var(--line-strong)); box-shadow: 0 0 0 1px #0006, 0 6px 18px #0007; cursor: grab; user-select: none; touch-action: none; overflow: hidden; will-change: transform; }
.bub:active { cursor: grabbing; }
.bub:hover { z-index: 2; box-shadow: 0 0 0 1px var(--ring), 0 8px 24px #000a; }
.bub:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bub-img { position: absolute; inset: 0; opacity: .55; }
.bub-img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.bub-sym, .bub-val, .bub-rank { position: relative; font-family: var(--mono); text-shadow: 0 1px 3px #000, 0 0 8px #000; pointer-events: none; }
.bub-sym { font-weight: 700; color: var(--ink); line-height: 1.1; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bub-val { font-size: 11px; color: var(--ink2); }
.bub-rank { position: absolute; top: 12%; font-size: 10px; color: var(--ink3); }
.bub.hot .bub-sym::before { content: '▲ '; color: var(--up); font-size: .8em; }
.rmap-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; color: var(--ink4); margin-top: 8px; }
.rside { padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rstats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rstats div { min-width: 0; }
.rstats .wide { grid-column: 1 / -1; }
.rstats span { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.rstats b { display: block; font-size: 20px; letter-spacing: -.01em; margin-top: 3px; }
.rstats em { display: block; font-style: normal; font-size: 12px; color: var(--ink3); margin-top: 2px; }
.rside h4 { margin: 10px 0 2px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); font-weight: 500; }
.rrow { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 8px; font-size: 13px; }
.rrow:hover { background: var(--raise); }
.rrow-img { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; background: var(--raise); display: grid; place-items: center; font-size: 9px; font-weight: 800; color: var(--ink3); flex: none; }
.rrow-img img { width: 100%; height: 100%; object-fit: cover; }
.rrow-r { margin-left: auto; font-family: var(--mono); font-size: 12px; }
.rcta { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--accent); }

/* ---- safety ---- */
.ctable { display: flex; flex-direction: column; }
.crow { display: grid; grid-template-columns: auto minmax(0, 1.4fr) auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.crow:last-child { border-bottom: 0; }
.safelist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.safelist .ic { color: var(--accent); }

@media (max-width: 980px) {
  .radar { grid-template-columns: 1fr; }
  .rside { order: 2; }
}
@media (max-width: 640px) {
  .rhero .display { font-size: 34px; }
  .bubbles { height: 420px; }
  .crow { grid-template-columns: auto 1fr; }
  .crow > :nth-child(n+3) { grid-column: 2; }
}
/* The Eye: our animated logo fixed in the middle of the bubble map */
.bub-eye { position: absolute; left: 0; top: 0; border-radius: 50%; overflow: hidden; pointer-events: none; z-index: 1; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), 0 0 28px color-mix(in srgb, var(--accent) 30%, transparent); }
.bub-eye { display: grid; place-items: center; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), 0 0 16px color-mix(in srgb, var(--accent) 30%, transparent); pointer-events: auto; cursor: default; }
.bub-eye-art { position: absolute; inset: 0; }
.bub-eye .logo-anim { transform: scale(1.12); }
.bub-eye .bub-sym { position: absolute; bottom: 14%; z-index: 1; }

/* ---- coin terminal: 5-chain chart legend, order flow ---- */
.kdots { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 4px; }
.kdots i { width: 7px; height: 7px; border-radius: 50%; opacity: .25; }
.kdots i.on { opacity: 1; }
.lg5 { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; margin-right: 10px; }
.lg5 span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.lg5 i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.lg5 b { font-weight: 500; color: var(--ink); }
.flowk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.flowk span { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.flowk b { display: block; font-family: var(--mono); font-weight: 500; font-size: 16px; margin-top: 3px; }
.flowk em { display: block; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ink3); }
.flowbar { height: 6px; border-radius: 3px; background: var(--danger); overflow: hidden; margin: 12px 0 4px; }
.flowbar i { display: block; height: 100%; background: var(--up); }
.flowh { margin: 14px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); font-weight: 500; }
.buyrow .track i { display: block; height: 100%; }
@media (max-width: 640px) { .flowk { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ghost coins: market cap only on paper */
.bub.ghost { border-style: dashed; opacity: .45; }
.rghost { margin-top: 8px; font-size: 12px; color: var(--ink3); line-height: 1.5; }
.rghost .ic { color: var(--amber); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: inherit; text-decoration: underline; }
.ghosttag { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); border: 1px dashed var(--amber); border-radius: 999px; padding: 0 6px; }

/* ---- supply + holder map ---- */
.supk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.supk span { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.supk b { display: block; font-family: var(--mono); font-weight: 500; font-size: 16px; margin-top: 3px; }
.supk em { display: block; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ink3); }
.supbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--sunk); margin: 12px 0; }
.supbar i { display: block; height: 100%; }
.bubbles.hmap { height: 460px; }
.bub-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bub-links { z-index: 2; }
.bub-links line { stroke: var(--ink2); stroke-width: 2; stroke-opacity: .95; stroke-linecap: round; }
.bub.quiet { opacity: .4; }
.hm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 2px; font-size: 13px; }
.hm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hm-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
@media (max-width: 640px) { .supk { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bubbles.hmap { height: 360px; } }
.btn.mini { padding: 4px 10px; font-size: 12px; margin-left: 8px; border-radius: 999px; vertical-align: middle; }

/* ---- docs ---- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.doc-toc { position: sticky; top: 76px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.doc-toc button { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--ink3); cursor: pointer; }
.doc-toc button:hover { color: var(--ink); background: var(--raise); }
.doc-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.doc-sec { scroll-margin-top: 80px; line-height: 1.6; font-size: 14px; color: var(--ink2); }
.doc-sec h2 { margin-top: 0; color: var(--ink); }
.doc-sec h3 { margin: 16px 0 4px; font-size: 14px; color: var(--ink); }
.doc-sec p { margin: 8px 0; max-width: 78ch; }
.doc-sec ul { margin: 8px 0; padding-left: 20px; max-width: 78ch; }
.doc-sec li { margin: 4px 0; }
.doc-sec table { margin: 10px 0; }
.doc-sec td { vertical-align: top; }
.doc-sec code { font-family: var(--mono); font-size: 12.5px; background: var(--sunk); border: 1px solid var(--line-soft); border-radius: 5px; padding: 1px 5px; }
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .doc-toc button { padding: 5px 9px; font-size: 12px; border: 1px solid var(--line); border-radius: 999px; }
}

/* ---- Pangea Trending ---- */
.trtable td { vertical-align: middle; }
.trrank { width: 36px; font-family: var(--mono); color: var(--ink3); }
.trcoin { display: inline-flex; align-items: center; gap: 8px; }
.trcoin:hover b { color: var(--accent); }

/* ---- Pangea Bots ---- */
.bots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.botcard { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.55; color: var(--ink2); }
.botcard .btn { align-self: flex-start; margin-top: 10px; }
.botcard h3 { margin: 12px 0 2px; font-size: 14px; color: var(--ink); }
.bothead { display: flex; align-items: center; gap: 10px; }
.bothead h2 { margin: 0; color: var(--ink); }
.bothead .badge { margin-left: auto; }
.boticon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); flex: none; }
.boticon .ic { width: 20px; height: 20px; }
.botlist { margin: 6px 0; padding-left: 18px; }
.botlist li { margin: 3px 0; }
.botsteps { margin: 6px 0; padding-left: 20px; }
.botsteps li { margin: 5px 0; }
.botcard code, .botcmds code { font-family: var(--mono); font-size: 12px; background: var(--sunk); border: 1px solid var(--line-soft); border-radius: 5px; padding: 1px 5px; }
.botcmds { margin: 8px 0; font-size: 13px; }
.botcmds td { vertical-align: top; }
.flinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 10px; font-size: 12px; }
.flinks a { color: var(--ink3); }
.flinks a:hover { color: var(--accent); }
@media (max-width: 980px) { .bots { grid-template-columns: minmax(0, 1fr); } }

/* Coin page banner from /update (creator or community info) */
/* DexScreener-style header banner: the full 3:1 image (1500×500) across the page, never cropped to a strip. */
.tbanner { margin-top: 12px; overflow: hidden; border-radius: 14px; aspect-ratio: 3 / 1; max-height: 440px; padding: 0; }
.tbanner img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Language switcher (web/i18n.js), next to the Bots button */
.langsel { appearance: none; -webkit-appearance: none; background-color: var(--raise); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 26px 8px 10px; font: 600 13px/1 inherit; cursor: pointer; margin-left: 8px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink3) 50%), linear-gradient(135deg, var(--ink3) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.langsel:focus { outline: 2px solid var(--up); outline-offset: 1px; }
.langsel option { background: var(--raise); color: var(--ink); }
@media (max-width: 640px) { .langsel { padding: 7px 22px 7px 8px; font-size: 12px; } }

/* Theme toggle (web/theme.js), next to the language switcher */
.themebtn { width: 36px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; margin-left: 6px; }
.themebtn:hover { border-color: var(--line-strong); }
.themebtn svg { width: 17px; height: 17px; }
/* Light theme details that the tokens alone do not cover */
:root[data-theme="light"] .bub-sym, :root[data-theme="light"] .bub-val, :root[data-theme="light"] .bub-rank { text-shadow: 0 1px 2px #0006; }
:root[data-theme="light"] .bub:hover { box-shadow: 0 0 0 1px var(--ring), 0 8px 24px #17131c33; }
:root[data-theme="light"] .bars .fill { background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.35) 3px 4px); }

/* Header: longer menus (translations) scroll sideways instead of pushing the language, theme and Bots controls off screen */
.topnav { min-width: 0; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { white-space: nowrap; }
.search { min-width: 44px; }
.themebtn, .langsel, #botlink, .brand { flex: none; }

/* /bots: 4 bot cards (2 × 2) with each bot's own Telegram picture, and the channels row */
.bots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .bots { grid-template-columns: minmax(0, 1fr); } }
.botpic { width: 48px; height: 48px; border-radius: 50%; flex: none; object-fit: cover; background: #000; box-shadow: 0 0 0 1px var(--line-soft); }
.botlinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.botlink { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 12px; color: var(--ink2); text-decoration: none; min-width: 0; }
.botlink:hover { border-color: var(--accent); }
.botlink > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13px; line-height: 1.35; }
.botlink b { color: var(--ink); font-size: 14px; }
.botlink .mono { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }

/* X (@PangaiaApp) at the far right of the header, same size as the theme button */
.xlink { width: 36px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); color: var(--ink); display: grid; place-items: center; flex: none; margin-left: 6px; }
.xlink:hover { border-color: var(--line-strong); }
.xlink svg { width: 15px; height: 15px; }

/* A coin's own banner (set on pangaia.app/update) behind its card, under the card colour so the text stays readable:
   faint on the left where the name and numbers are, clearer to the right. */
.fcard.has-banner, .pcard.has-banner {
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--panel) 72%, transparent) 20%, color-mix(in srgb, var(--panel) 30%, transparent)), var(--banner);
  background-size: cover; background-position: center;
}
.pcard.has-banner:hover {
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--raise) 68%, transparent) 20%, color-mix(in srgb, var(--raise) 22%, transparent)), var(--banner);
}
/* Light theme: the banner sits under more of the white card, so dark text and numbers stay readable on it. */
:root[data-theme="light"] .fcard.has-banner, :root[data-theme="light"] .pcard.has-banner {
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--panel) 90%, transparent) 30%, color-mix(in srgb, var(--panel) 62%, transparent)), var(--banner);
}
:root[data-theme="light"] .pcard.has-banner:hover {
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--raise) 88%, transparent) 30%, color-mix(in srgb, var(--raise) 55%, transparent)), var(--banner);
}
