/* Coinlytica – public site styles */
:root {
  --bg: #f5f6f8; --card: #ffffff; --card2: #f8f9fb; --line: #e6e8ec; --line2: #eff1f4;
  --text: #1d2330; --muted: #6b7384; --faint: #9aa1af;
  --accent: #0d9488; --accent-ink: #ffffff; --accent-soft: rgba(13,148,136,.1);
  --up: #0f9d6b; --down: #e5484d; --up-rgb: 15,157,107; --down-rgb: 229,72,77;
  --warn: #d97706; --shadow: 0 1px 2px rgba(16,24,40,.04);
  --radius: 10px; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0e1116; --card: #161a22; --card2: #1b202a; --line: #262c38; --line2: #1f2530;
  --text: #e7eaf0; --muted: #98a1b3; --faint: #6c7586;
  --accent: #2dd4bf; --accent-ink: #062321; --accent-soft: rgba(45,212,191,.12);
  --up: #2ebd85; --down: #f6465d; --up-rgb: 46,189,133; --down-rgb: 246,70,93;
  --shadow: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 16px; padding-bottom: 32px; min-height: 60vh; }
.up { color: var(--up); } .down { color: var(--down); } .muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- ticker bar ---------- */
.tickerbar { background: var(--card); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.tickerbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 36px; }
.tb-stats { display: flex; gap: 22px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.tb-stats::-webkit-scrollbar { display: none; }
.tb-stats b { color: var(--accent); font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }
.tb-right { display: flex; align-items: center; gap: 10px; flex: none; }
.live { display: inline-flex; align-items: center; gap: 6px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.live em { font-style: normal; }
.live.ok i { background: var(--up); box-shadow: 0 0 0 3px rgba(var(--up-rgb), .18); }
.live.err i { background: var(--down); }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--card2); color: var(--text); }

/* ---------- nav ---------- */
.nav { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.nav-in { display: flex; align-items: center; gap: 22px; height: 56px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: -.2px; flex: none; }
.menu { display: flex; gap: 4px; flex: 1; min-width: 0; }
.menu a { padding: 7px 11px; border-radius: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.menu a:hover { color: var(--text); background: var(--card2); }
.menu a.on { color: var(--accent); background: var(--accent-soft); }
.burger { display: none; }
.search { position: relative; display: flex; align-items: center; gap: 8px; width: 240px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card2); color: var(--muted); flex: none; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 11px var(--font); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--faint); }
.search-res { position: absolute; top: 42px; left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.14); max-height: 360px; overflow: auto; padding: 4px; z-index: 50; }
.search-res a { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; color: var(--text); }
.search-res a.sel, .search-res a:hover { background: var(--card2); }
.search-res .sr-n { color: var(--muted); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-res .sr-empty { padding: 10px; color: var(--muted); }

/* ---------- ads ---------- */
.ad { position: relative; display: flex; justify-content: center; align-items: center; margin: 0 auto 16px; max-width: 100%; }
.ad[hidden] { display: none; }
.ad-label { position: absolute; left: 0; top: -1px; font-size: 10px; line-height: 1; padding: 2px 5px; background: rgba(0,0,0,.45); color: #fff; border-radius: 3px 0 4px 0; z-index: 2; letter-spacing: .3px; }
.ad-close { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; z-index: 2; display: grid; place-items: center; padding: 0; }
.ad-close:hover { background: rgba(0,0,0,.7); }
.ad-img { display: block; line-height: 0; border-radius: 8px; overflow: hidden; }
.ad-img img { display: block; max-width: 100%; height: auto; max-height: 250px; }
.ad-html { max-width: 100%; overflow: hidden; }
.ad-text { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; width: 100%; padding: 16px 44px; border-radius: var(--radius); background: linear-gradient(90deg, #0f766e, #155e75); color: #fff; text-align: center; }
.ad-header_banner, .ad-home_inline, .ad-content_bottom { width: fit-content; min-width: min(728px, 100%); }
.ad-header_banner.ad-t-text, .ad-home_inline.ad-t-text, .ad-content_bottom.ad-t-text { width: min(970px, 100%); }
.ad-content_bottom { margin-top: 24px; margin-bottom: 0; }
.ad-badge { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.22); }
.ad-title { font-weight: 700; font-size: 15px; }
.ad-desc { opacity: .9; }
.ad-cta { font-weight: 700; padding: 5px 12px; border-radius: 7px; background: rgba(255,255,255,.95); color: #111; white-space: nowrap; }
.ad-cd { display: inline-flex; gap: 4px; font-variant-numeric: tabular-nums; font-size: 12px; }
.ad-cd b { background: rgba(0,0,0,.28); border-radius: 4px; padding: 2px 5px; font-weight: 600; }
.ad-top_strip { margin: 0; width: 100%; }
.ad-top_strip .ad-text { border-radius: 0; padding: 7px 40px; font-size: 13px; }
.ad-top_strip .ad-title { font-size: 13px; }
.ad-top_strip .ad-cta { padding: 2px 10px; }
.ad-top_strip .ad-img { border-radius: 0; } .ad-top_strip .ad-img img { max-height: 44px; }
.ad-top_strip .ad-close { top: 50%; transform: translateY(-50%); right: 10px; background: transparent; font-size: 18px; }

/* ---------- cards / grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 16px 4px; }
.card-h h3 { font-size: 14px; font-weight: 600; }
.card-b { padding: 6px 16px 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 76px; }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 18px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 12px; font-weight: 500; margin-left: 6px; }
.stat svg { flex: none; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.page-h h1 { font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.page-h p { color: var(--muted); margin-top: 3px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 22px 0 10px; }
.sec-h h2 { font-size: 17px; font-weight: 600; }
.note { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* list rows inside widgets */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li, .rows a.row { display: flex; align-items: center; gap: 8px; padding: 7px 0; min-height: 36px; }
.rows a.row:hover .sym { color: var(--accent); }
.rows .rk { width: 16px; color: var(--faint); font-size: 12px; flex: none; }
.rows .sym { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .lbl { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .sub { display: block; color: var(--faint); font-size: 11px; font-weight: 400; }
.rows .sp { flex: 1; min-width: 4px; }
.rows .val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows .val.w { min-width: 68px; text-align: right; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* segmented tabs */
.seg { display: inline-flex; background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 3px 9px; border-radius: 6px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }
.seg.lg button { padding: 6px 13px; font-size: 13px; }
.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inp, .sel { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); outline: 0; }
.inp:focus, .sel:focus { border-color: var(--accent); }
.inp { width: 180px; }

/* coin icon */
.ci { width: 22px; height: 22px; border-radius: 50%; flex: none; object-fit: cover; background: var(--card2); }
.ci-l { display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }
.ci.lg { width: 36px; height: 36px; font-size: 16px; }

/* ---------- data table ---------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 0 12px; height: 48px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line2); }
.tbl th { height: 42px; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--card2); position: sticky; top: 0; user-select: none; }
.tbl th.sort { cursor: pointer; }
.tbl th.sort:hover { color: var(--text); }
.tbl th.sort::after { content: "↕"; margin-left: 4px; opacity: .35; font-size: 10px; }
.tbl th.asc::after { content: "↑"; opacity: 1; color: var(--accent); }
.tbl th.desc::after { content: "↓"; opacity: 1; color: var(--accent); }
.tbl td.l, .tbl th.l { text-align: left; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl tbody tr:hover td { background: var(--card2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .asset { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; }
.tbl .asset small { color: var(--faint); font-weight: 400; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.tbl td.heat { padding: 0; }
.tbl td.heat span { display: block; padding: 0 12px; line-height: 47px; }
.tbl .fav { border: 0; background: transparent; cursor: pointer; color: var(--faint); font-size: 16px; line-height: 1; padding: 4px; }
.tbl .fav.on { color: #f5a524; }
.tbl td.flash-up { animation: fu .9s ease-out; } .tbl td.flash-down { animation: fd .9s ease-out; }
@keyframes fu { from { background: rgba(var(--up-rgb), .28); } to { background: transparent; } }
@keyframes fd { from { background: rgba(var(--down-rgb), .28); } to { background: transparent; } }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line2); color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pager button { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pager button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pager button:disabled { opacity: .4; cursor: default; }
.skel td { color: transparent !important; }
.skel td::after { content: ""; display: inline-block; width: 70%; height: 12px; border-radius: 4px; background: var(--line2); animation: sk 1.2s infinite ease-in-out; }
@keyframes sk { 50% { opacity: .45; } }

/* long/short split bar */
.split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line2); min-width: 80px; }
.split i { display: block; height: 100%; }
.split .l { background: var(--up); } .split .s { background: var(--down); }
.split.tall { height: 22px; border-radius: 6px; font-size: 11px; color: #fff; font-weight: 600; }
.split.tall i { display: flex; align-items: center; padding: 0 7px; overflow: hidden; white-space: nowrap; }
.split.tall .s { justify-content: flex-end; }
.bar { height: 8px; border-radius: 4px; background: var(--line2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* gauge */
.gauge { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #e5484d, #f5a524, #9aa1af, #84cc16, #0f9d6b); width: 150px; }
.gauge i { position: absolute; top: -4px; width: 3px; height: 16px; background: var(--text); border-radius: 2px; transform: translateX(-50%); }

/* heatmap / treemap */
.treemap { position: relative; width: 100%; height: 440px; border-radius: var(--radius); overflow: hidden; background: var(--card); }
.tm { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; border: 1px solid var(--bg); overflow: hidden; text-align: center; line-height: 1.25; transition: filter .15s; }
.tm:hover { filter: brightness(1.12); z-index: 2; }
.tm b { font-size: 14px; } .tm span { font-size: 11px; opacity: .92; }
.tm.s b { font-size: 11px; } .tm.s span { display: none; } .tm.xs b { display: none; }

/* charts */
.chart { width: 100%; height: 340px; position: relative; }
.chart.sm { height: 240px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; z-index: 3; background: var(--card); }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

/* coin header */
.coin-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 14px; }
.coin-h h1 { font-size: 22px; font-weight: 700; }
.coin-h h1 small { color: var(--muted); font-size: 14px; font-weight: 400; margin-left: 6px; }
.coin-h .px { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.coin-h .fav-btn { border: 1px solid var(--line); background: var(--card); border-radius: 8px; height: 34px; padding: 0 12px; cursor: pointer; }
.coin-h .fav-btn.on { color: #f5a524; border-color: #f5a524; }
.kv { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin-bottom: 12px; }
.kv div { padding: 12px 16px; border-right: 1px solid var(--line2); }
.kv div:last-child { border-right: 0; }
.kv span { display: block; color: var(--muted); font-size: 12px; }
.kv b { display: block; font-size: 15px; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* feed */
.feed { max-height: 420px; overflow: auto; }
.feed .tbl td, .feed .tbl th { height: 36px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.tag.long { background: rgba(var(--up-rgb), .14); color: var(--up); }
.tag.short { background: rgba(var(--down-rgb), .14); color: var(--down); }
.alert { padding: 11px 14px; border-radius: var(--radius); border: 1px solid rgba(var(--down-rgb), .35); background: rgba(var(--down-rgb), .08); color: var(--text); margin-bottom: 12px; }

/* footer */
.footer { background: var(--card); border-top: 1px solid var(--line); margin-top: 20px; color: var(--muted); font-size: 13px; }
.footer-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding-top: 28px; padding-bottom: 18px; }
.f-brand strong { color: var(--text); font-size: 16px; }
.f-brand p { margin-top: 8px; max-width: 520px; }
.f-col h4 { color: var(--text); font-size: 13px; margin-bottom: 8px; }
.f-col a, .f-col span { display: block; padding: 3px 0; }
.f-col a:hover { color: var(--accent); }
.f-copy { border-top: 1px solid var(--line2); padding-top: 14px; padding-bottom: 18px; font-size: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kv div:nth-child(3n) { border-right: 0; }
  .kv div:nth-child(-n+3) { border-bottom: 1px solid var(--line2); }
  .search { width: 190px; }
}
@media (max-width: 1180px) {
  .burger { display: inline-grid; order: 3; }
  .nav-in { gap: 10px; }
  .search { flex: 1; width: auto; max-width: 420px; margin-left: auto; order: 2; }
  .search kbd { display: none; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 56px; flex-direction: column; background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 12px 12px; box-shadow: 0 14px 24px rgba(0,0,0,.12); }
  .menu.open { display: flex; }
  .menu a { padding: 11px 12px; }
}
@media (max-width: 860px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
  .treemap { height: 360px; }
  .live em { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .grid4, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .logo span { display: none; }
  .tbl th, .tbl td { padding: 0 9px; }
  .tbl td.heat span { padding: 0 9px; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv div { border-right: 0 !important; border-bottom: 1px solid var(--line2); }
  .kv div:nth-last-child(-n+2) { border-bottom: 0; }
  .chart { height: 280px; } .chart.sm { height: 210px; }
  .ad-text { padding: 12px 34px; }
  .inp { width: 140px; }
  .page-h h1, .coin-h h1 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== theme v2: sidebar shell, violet palette, pill figures (overrides the base rules above) ===== */
:root, :root[data-theme="light"] {
  --bg: #f2f3f9; --card: #ffffff; --card2: #f6f7fc; --line: #e2e5f0; --line2: #edeff6;
  --text: #171a26; --muted: #646c82; --faint: #98a0b5;
  --accent: #5b4bdb; --accent-ink: #ffffff; --accent-soft: rgba(91,75,219,.1);
  --up: #0c9a6a; --down: #e0244f; --up-rgb: 12,154,106; --down-rgb: 224,36,79;
  --shadow: 0 1px 2px rgba(23,26,38,.05), 0 8px 24px -18px rgba(23,26,38,.25);
  --radius: 14px; --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0a0c13; --card: #12151f; --card2: #181c29; --line: #242a3b; --line2: #1b2030;
  --text: #eaedf7; --muted: #8f98af; --faint: #5d667d;
  --accent: #8f7dff; --accent-ink: #0a0c13; --accent-soft: rgba(143,125,255,.15);
  --up: #2fd39a; --down: #ff5c7a; --up-rgb: 47,211,154; --down-rgb: 255,92,122;
  --shadow: none;
}
body { font-size: 14px; letter-spacing: -.005em; }

/* shell */
.shell { display: flex; align-items: flex-start; min-height: 100vh; }
.side { width: 232px; flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px 16px; background: var(--card); border-right: 1px solid var(--line); z-index: 60; }
.side .logo { padding: 2px 8px 18px; font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.side .menu { display: flex; flex-direction: column; gap: 3px; flex: 0 1 auto; position: static; padding: 0; background: none; border: 0; box-shadow: none; }
.side .menu a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: var(--muted); font-weight: 600; }
.side .menu a svg { flex: none; opacity: .85; }
.side .menu a:hover { color: var(--text); background: var(--card2); }
.side .menu a.on { color: var(--accent-ink); background: var(--accent); }
.side-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 6px 0; border-top: 1px solid var(--line2); font-size: 12px; color: var(--muted); }
.side-foot .live { min-width: 0; } .side-foot .live em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.page .main { flex: 1; width: 100%; padding-top: 22px; }
.wrap { max-width: 1320px; padding-left: 26px; padding-right: 26px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; height: 62px; padding: 0 26px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line2); }
.topbar .burger { display: none; }
.topbar .search { width: 300px; max-width: none; margin: 0; height: 40px; border-radius: 12px; background: var(--card); order: 0; flex: none; }
.tb-stats { display: flex; gap: 8px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.tb-stats span { display: inline-flex; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); white-space: nowrap; }
.tb-stats em { font-style: normal; font-size: 10.500px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.tb-stats b { margin: 0; color: var(--text); font-weight: 700; font-size: 13px; }

/* headings, cards */
.page-h h1, .coin-h h1 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.sec-h h2 { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.sec-h { margin: 28px 0 12px; }
.card-h h3 { font-size: 13.500px; font-weight: 700; }
.card { border-radius: var(--radius); }
.pulse { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 4px; overflow: hidden; }
.pulse .stat { border-right: 1px solid var(--line2); min-height: 92px; padding: 18px 20px; }
.pulse .stat:last-child { border-right: 0; }
.stat .k { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.stat .v { font-size: 22px; font-weight: 800; letter-spacing: -.4px; margin-top: 5px; }
.stat .sx { font-size: 12px; text-align: right; line-height: 1.5; }
.widgets .card-b { padding-bottom: 12px; }

/* segmented controls become outlined pills */
.seg { background: transparent; border: 0; padding: 0; gap: 5px; }
.seg button { border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; background: var(--card); font-weight: 600; }
.seg button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); box-shadow: none; }
.seg.lg button { padding: 7px 15px; }
.inp, .sel { border-radius: 999px; padding: 0 14px; height: 36px; }

/* tables: quiet header, pill figures instead of filled cells */
.tbl th { background: transparent; font-size: 10.500px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--faint); border-bottom: 1px solid var(--line); height: 44px; }
.tbl th, .tbl td { padding: 0 14px; height: 52px; }
.tbl tbody tr:hover td { background: var(--accent-soft); }
.tbl tbody tr td:first-child { border-left: 3px solid transparent; }
.tbl tbody tr:hover td:first-child { border-left-color: var(--accent); }
.tbl td.heat { padding: 0 14px; }
.tbl td.heat span { display: inline-block; min-width: 72px; padding: 4px 10px; line-height: 1.35; border-radius: 999px; text-align: center; font-weight: 600; font-size: 13px; }
.tbl .asset { font-weight: 700; }
.pager button { border-radius: 999px; min-width: 34px; height: 34px; }
.rows a.row { border-bottom: 1px dashed var(--line2); } .rows a.row:last-child { border-bottom: 0; }
.rows .sym { font-weight: 700; }
.split { height: 6px; border-radius: 999px; } .split.tall { height: 24px; border-radius: 999px; }
.bar { height: 6px; border-radius: 999px; } .bar i { border-radius: 999px; }
.gauge { height: 6px; border-radius: 999px; } .gauge i { top: -5px; }
.tag { padding: 2px 10px; }

/* market map: rounded tiles with gaps */
.treemap { background: transparent; border-radius: 0; overflow: visible; }
.tm { border: 3px solid var(--bg); border-radius: 12px; }
.chart-empty { border-radius: var(--radius); }
.coin-h .px { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.coin-h .fav-btn { border-radius: 999px; padding: 0 16px; font-weight: 600; }
.kv b { font-size: 16px; font-weight: 700; }
.kv span { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.footer { background: transparent; border-top: 1px solid var(--line2); }
.note { line-height: 1.6; max-width: 980px; }
.ad-top_strip .ad-text { border-radius: 0; }

/* responsive */
@media (max-width: 1280px) {
  .tb-stats span:nth-child(4) { display: none; }
}
@media (max-width: 1100px) {
  .side { position: fixed; left: 0; top: 0; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 0 0 0 100vmax rgba(0,0,0,0); }
  .side:has(.menu.open) { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .topbar .burger { display: inline-grid; order: 0; }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar .search { flex: 1; width: auto; min-width: 0; }
  .tb-stats { display: none; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .menu { display: flex; }
  .pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pulse .stat:nth-child(2) { border-right: 0; }
  .pulse .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line2); }
}
@media (max-width: 860px) {
  .grid3.widgets { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .pulse { grid-template-columns: minmax(0, 1fr); }
  .pulse .stat { border-right: 0; border-bottom: 1px solid var(--line2); }
  .pulse .stat:last-child { border-bottom: 0; }
  .tbl th, .tbl td, .tbl td.heat { padding: 0 10px; }
  .tbl td.heat span { min-width: 62px; padding: 3px 8px; }
  .page-h h1, .coin-h h1 { font-size: 20px; }
  .logo span { display: inline; }
}
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid var(--bg); }
.logo-m { display: none; }
@media (max-width: 1100px) { .logo-m { display: inline-flex; } }
/* grouped sidebar + four-column footer */
.side { padding-bottom: 12px; }
.side .menu { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-right: -8px; padding-right: 8px; gap: 1px; }
.side .menu a { padding: 8px 12px; font-size: 13.5px; }
.menu-g { padding: 14px 12px 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.menu-g:first-child { padding-top: 2px; }
.footer-in { grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .footer-in { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 600px) { .footer-in { grid-template-columns: 1fr 1fr; } }
/* ---- components for the indicator and tool pages ---- */
.treemap.tall { height: 620px; }
.tbl.matrix th, .tbl.matrix td { height: 40px; padding: 0 10px; }
.tbl.matrix td.mx { text-align: center; font-size: 12.5px; font-weight: 600; border-left: 2px solid var(--card); border-bottom: 2px solid var(--card); }
.tbl.matrix th { text-align: center; } .tbl.matrix th.l { text-align: left; }
.tbl.matrix tbody tr:hover td { background-color: transparent; }
.tbl.matrix tbody tr:hover td.l { background: var(--accent-soft); }
.strikes { display: grid; gap: 3px; }
.sk { display: grid; grid-template-columns: 1fr 84px 1fr; align-items: center; gap: 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.sk b { text-align: center; font-weight: 700; padding: 3px 0; border-radius: 6px; }
.sk.at b { background: var(--accent); color: var(--accent-ink); }
.sk .pk, .sk .ck { display: flex; align-items: center; gap: 7px; height: 16px; }
.sk .pk { justify-content: flex-end; } .sk i { display: block; height: 100%; border-radius: 4px; min-width: 1px; }
.sk .pk i { background: var(--down); } .sk .ck i { background: var(--up); }
.sk em { font-style: normal; color: var(--muted); white-space: nowrap; }
.sk-h { color: var(--faint); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.sk-h span:first-child { text-align: right; } .sk-h b { background: none; }
.rsi-plot { position: relative; height: 290px; border-radius: 12px; overflow: hidden; background: linear-gradient(90deg, rgba(var(--up-rgb),.16) 0 30%, transparent 30% 70%, rgba(var(--down-rgb),.16) 70% 100%); border: 1px solid var(--line2); }
.rsi-plot .rz { position: absolute; top: 6px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--faint); }
.rsi-plot .rz-l { left: 10px; } .rsi-plot .rz-r { right: 10px; }
.rsi-plot .rl { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--line); }
.rsi-plot .rl em { position: absolute; bottom: 4px; left: 4px; font-style: normal; font-size: 10px; color: var(--faint); }
.rsi-plot .rc { position: absolute; transform: translateX(-50%); padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: var(--card2); border: 1px solid var(--line); white-space: nowrap; }
.rsi-plot .rc:hover { z-index: 3; border-color: var(--accent); color: var(--accent); }
.rsi-plot .rc.hot { background: rgba(var(--down-rgb),.2); border-color: var(--down); } .rsi-plot .rc.cold { background: rgba(var(--up-rgb),.2); border-color: var(--up); }
.calc { padding: 20px; display: grid; gap: 14px; align-content: start; }
.fld2 { display: grid; gap: 6px; } .fld2 label, .fld2 .lab { font-size: 12px; font-weight: 700; color: var(--muted); }
.fld2 .inp, .fld2 .sel { width: 100%; height: 42px; border-radius: 12px; }
.fld2 .hint { font-size: 12px; color: var(--faint); min-height: 16px; }
.btn-main { height: 44px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 800; cursor: pointer; }
.btn-main:hover { filter: brightness(1.08); }
.btn-ghost { height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font-weight: 600; cursor: pointer; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.chk2 { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; } .chk2 input { width: 16px; height: 16px; accent-color: var(--accent); }
.calc-msg { font-size: 13px; }
.calc-out { padding: 22px; align-content: start; display: grid; gap: 2px; }
.co-big { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.co { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line2); } .co span { color: var(--muted); }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast { padding: 13px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--accent); box-shadow: 0 14px 40px rgba(0,0,0,.35); font-weight: 600; }
.prose { max-width: 820px; line-height: 1.7; } .prose h2 { font-size: 17px; margin: 26px 0 8px; } .prose p, .prose li { color: var(--muted); } .prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 20px; } .prose a { color: var(--accent); font-weight: 600; } .prose code, .api code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--card2); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; color: var(--text); }
.api .ep { padding: 18px 20px; margin-bottom: 12px; } .api .ep h3 { font-size: 15px; margin-bottom: 6px; } .api .ep p { color: var(--muted); margin-bottom: 8px; }
.api pre { margin: 8px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--card2); border: 1px solid var(--line2); overflow-x: auto; font: 12.5px/1.5 ui-monospace, Consolas, monospace; }
.glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .glossary .card { padding: 18px 20px; } .glossary h3 { font-size: 15px; margin-bottom: 6px; } .glossary p { color: var(--muted); line-height: 1.6; }
.pane-toggles { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 860px) { .glossary { grid-template-columns: 1fr; } .treemap.tall { height: 460px; } .sk { grid-template-columns: 1fr 70px 1fr; } .sk em { display: none; } }
.chart.big { height: 520px; }
@media (max-width: 600px) { .chart.big { height: 340px; } }
/* liquidation page */
.feed-sum { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line2); }
.feed-sum .k { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.feed-sum .v { font-size: 22px; font-weight: 800; margin: 3px 0; font-variant-numeric: tabular-nums; }
.feed-sum svg { max-width: 55%; height: auto; flex: none; }
.feed-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.feed-filters .sel { flex: 1; min-width: 120px; }
.feed .tbl tr.big td { background: rgba(245,165,36,.16); }
.map-key { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.map-key i { width: 120px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--up), var(--down)); }
div.tm { cursor: default; }
/* small screens: filter groups wrap instead of pushing the page sideways; comfortable tap targets */
.seg { flex-wrap: wrap; max-width: 100%; }
.tools { min-width: 0; max-width: 100%; }
@media (max-width: 860px) {
  .page-h .tools, .sec-h .tools { width: 100%; }
  .page-h > div:first-child { min-width: 0; }
  .seg button, .btn-ghost { min-height: 34px; }
  .seg.lg button { padding: 7px 13px; }
  .tools .sel { flex: 1; min-width: 130px; }
  .coin-h .sel { flex: 1; min-width: 110px; }
}
/* very small map tiles show the coin name only (never a bare number) */
.tm.xs b { display: block; font-size: 9.5px; font-weight: 700; }
.tm.xs span { display: none; }
.tm { padding: 2px; }

/* site-wide data notice and data-provider credit */
.f-note { border-top: 1px solid var(--line2); padding-top: 14px; padding-bottom: 12px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.f-note p { max-width: 1100px; margin: 0 0 6px; }
.f-note strong { color: var(--text); }
.f-note a { color: var(--accent); text-decoration: underline; }
.f-note .f-credit { font-size: 12.5px; margin-bottom: 0; }

.stat .k a.src { font-weight: 500; font-size: 11px; color: var(--faint); text-decoration: underline; margin-left: 4px; text-transform: none; letter-spacing: 0; }

/* asset-type chips above coin tables */
.seg.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.seg.chips[hidden] { display: none; }
.seg.chips button { padding: 5px 12px; font-size: 12.5px; }
.seg.chips button small { font-weight: 500; color: var(--faint); margin-left: 3px; font-size: 11px; }
.seg.chips button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: none; }
.seg.chips button.on small { color: inherit; opacity: .8; }
@media (max-width: 640px) { .seg.chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; } .seg.chips button { flex: 0 0 auto; } }

.seg.chips.page-chips { align-items: center; margin: 0 0 14px; }
.seg.chips .chips-l { font-size: 12px; color: var(--faint); font-weight: 600; margin-right: 2px; flex: 0 0 auto; }

/* plain-text summary of the page's figures (also what search engines and AI assistants read) */
.ssr { margin-top: 18px; }
.ssr .card-b p { line-height: 1.65; margin: 0 0 12px; max-width: 980px; }
.ssr caption { text-align: left; font-weight: 700; padding: 10px 0 8px; color: var(--text); font-size: 13px; }
.ssr .tbl-wrap { margin-bottom: 14px; }
.ssr .tbl td a { color: var(--text); font-weight: 600; }
.ssr .ssr-when { font-size: 12px; color: var(--muted); margin: 6px 0 0; word-break: break-word; }

/* contact page */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.cf-card { padding: 22px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cf-fld { margin-bottom: 15px; min-width: 0; }
.cf-fld label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text); }
.cf-fld input, .cf-fld select, .cf-fld textarea { width: 100%; box-sizing: border-box; background: var(--card2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 15px; line-height: 1.4; }
.cf-fld textarea { resize: vertical; min-height: 150px; }
.cf-fld input:focus, .cf-fld select:focus, .cf-fld textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.cf-fld.has-err input, .cf-fld.has-err textarea { border-color: var(--down); }
.cf-msg { color: var(--down); font-size: 12.5px; margin-top: 5px; font-weight: 600; }
.cf-hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.cf-hint a { color: var(--accent); text-decoration: underline; }
.cf-alert { border: 1px solid var(--down); background: rgba(var(--down-rgb), .08); color: var(--text); border-radius: 10px; padding: 11px 13px; margin-bottom: 15px; font-size: 14px; }
.cf-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.cf-foot .cf-hint { margin: 0; flex: 1 1 220px; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-done { text-align: center; padding: 26px 10px; }
.cf-done h2 { margin: 14px 0 8px; font-size: 20px; }
.cf-done p { color: var(--muted); margin: 0 0 18px; }
.cf-done-b { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cf-side { display: grid; gap: 14px; }
.cf-info { padding: 18px; }
.cf-info h2 { font-size: 14px; margin: 0 0 9px; }
.cf-info p, .cf-info li { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.cf-info ul { margin: 0; padding-left: 18px; }
.cf-info li { margin-bottom: 6px; }
.cf-info a { color: var(--accent); text-decoration: underline; word-break: break-all; }
.contact .btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.contact .btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.contact .btn:hover { filter: brightness(1.06); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cf-row { grid-template-columns: 1fr; gap: 0; } .cf-card { padding: 16px; } .cf-foot .btn { width: 100%; } }
@media (max-width: 640px) { .cf-fld input, .cf-fld select, .cf-fld textarea { font-size: 16px; } }
