/* v2 additions on top of app.css */
:root {
  --buy: #1f9d55;
  --sell: #e5484d;
  --thesis: #7c3aed;
  --signal: #d97706;
  --verified: #0e9384;
  --chip-bg: #f1eeee;
}

.nav-links a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

/* avatars */
.av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-card); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-fallback { font-weight: 700; color: var(--mute); font-size: 14px; }
.av-sm { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-card); font-size: 11px; }
.av-sm img { width: 100%; height: 100%; object-fit: cover; }
.av-lg { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-card); font-size: 20px; }
.av-lg img { width: 100%; height: 100%; object-fit: cover; }
.av-stack { display: inline-flex; }
.av-stack > span { margin-left: -6px; box-shadow: 0 0 0 2px var(--canvas); }
.av-stack > span:first-child { margin-left: 0; }

/* chips & toggles */
.tchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { padding: 2px 10px; border: 1px solid var(--hairline); border-radius: 999px; font-size: 13px; color: var(--mute); line-height: 24px; background: var(--canvas); }
.tchip.on { color: var(--ink); border-color: var(--ink); background: var(--surface-soft); font-weight: 500; }
.tchip:disabled { opacity: .4; cursor: default; }
.cbadge { font-size: 11px; padding: 0 6px; border-radius: 3px; background: var(--chip-bg); color: var(--charcoal); line-height: 18px; display: inline-block; font-weight: 500; letter-spacing: .02em; }
.pbadge { font-size: 11px; padding: 0 6px; border-radius: 3px; line-height: 18px; display: inline-block; border: 1px solid currentColor; }
.k-buy { color: var(--buy); }
.k-sell { color: var(--sell); }
.k-thesis { color: var(--thesis); }
.k-consensus, .k-mover, .k-clan { color: var(--signal); }
.k-verified { color: var(--verified); }
.k-swap, .k-cash, .k-other { color: var(--accent); }

/* live layout */
.live-shell { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.live-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.status-pill { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--surface-card); color: var(--mute); }
.status-pill.live { background: rgba(48, 209, 88, .15); color: #137333; }
.status-pill.live::before { content: "● "; }
.status-pill.warn { background: rgba(255, 159, 10, .15); color: #8a5300; }
.filters { display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-row > .lbl { font-size: 12px; color: var(--mute); width: 40px; flex: none; }
.filter-row .input-field { height: 32px; padding: 0 10px; font-size: 13px; width: auto; min-width: 0; }
.feed { display: flex; flex-direction: column; }
.ev { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.ev.fresh { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(0, 122, 255, .08); } to { background: transparent; } }
.ev-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--mute); }
.ev-top .who { color: var(--ink); font-weight: 600; font-size: 14px; }
.ev-top .time { margin-left: auto; font-size: 12px; }
.ev-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.ev-main .kind { font-weight: 700; }
.ev-main .amt { font-weight: 700; font-size: 16px; }
.ev-main .sym { font-weight: 600; }
.ev-text { margin-top: 6px; font-size: 14px; color: var(--body); white-space: pre-wrap; word-break: break-word; }
.ev-text .zh { display: block; color: var(--mute); margin-top: 4px; font-size: 13px; }
.ev-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--mute); margin-top: 6px; align-items: center; }
.ev-meta a { color: var(--accent); }
.ev-meta .ca { cursor: pointer; border-bottom: 1px dotted var(--ash); }
.ev-members { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 12px; color: var(--body); }
.ev-members span.m { display: inline-flex; align-items: center; gap: 4px; }
.feed-more { padding: 16px 0; text-align: center; }
.newbar { position: sticky; top: 64px; z-index: 5; text-align: center; margin: 6px 0; }
.newbar button { background: var(--ink); color: var(--on-dark); border-radius: 999px; padding: 4px 14px; font-size: 13px; }
.side { position: sticky; top: 80px; display: grid; gap: 18px; }
.side-box { border: 1px solid var(--hairline); border-radius: 6px; padding: 14px; }
.side-box h3 { font-size: 13px; color: var(--mute); font-weight: 500; margin-bottom: 10px; display: flex; justify-content: space-between; }
.wl { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow: auto; }
.wl-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; font-size: 13px; cursor: pointer; }
.wl-row:hover, .wl-row.on { background: var(--surface-soft); }
.wl-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-row .x { color: var(--ash); padding: 0 4px; }
.wl-row .x:hover { color: var(--danger); }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--canvas); border: 1px solid var(--hairline); border-radius: 4px; max-height: 260px; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.suggest-list .wl-row { border-radius: 0; }
.empty { padding: 40px 0; text-align: center; color: var(--mute); font-size: 14px; }

/* KOL grid v2 */
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 20px; }
.kcard { border: 1px solid var(--hairline); border-radius: 6px; padding: 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; background: var(--canvas); }
.kcard:hover { border-color: var(--hairline-strong); }
.kcard-top { display: flex; gap: 10px; align-items: center; }
.kcard-top .nm { flex: 1; min-width: 0; }
.kcard-top .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard-top .nm span { font-size: 12px; color: var(--mute); }
.star { font-size: 18px; color: var(--ash); line-height: 1; padding: 4px; }
.star.on { color: #f5a524; }
.kstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-size: 12px; color: var(--mute); }
.kstats b { display: block; color: var(--ink); font-size: 13px; }
.kfoot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--mute); }
.gate-note { margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--hairline-strong); border-radius: 6px; font-size: 13px; color: var(--body); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

dialog.sheet { width: min(720px, calc(100% - 24px)); max-height: 86vh; border: 1px solid var(--hairline); border-radius: 8px; padding: 0; margin: auto; }
dialog.sheet::backdrop { background: rgba(0,0,0,.3); }
.sheet-head { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--hairline); position: sticky; top: 0; background: var(--canvas); z-index: 2; }
.sheet-body { padding: 0 20px 20px; }

/* alerts v2 */
.note-warn { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--warning); background: rgba(255, 159, 10, .08); font-size: 13px; color: var(--body); }
.rule-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

@media (max-width: 900px) {
  .live-shell { grid-template-columns: minmax(0, 1fr); }
  .live-shell > * { min-width: 0; }
  .side { position: static; order: -1; }
  .wl { max-height: 180px; }
}
@media (max-width: 560px) {
  .filter-row > .lbl { width: 100%; }
  .kgrid { grid-template-columns: 1fr; }
  .ev-top .time { margin-left: 0; }
}

/* home: 2x2 feature grid, shared borders */
@media (min-width: 700px) {
  .use-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .use-card, .use-card:first-child { border: 1px solid var(--hairline); margin: 0 -1px -1px 0; }
}
.use-card h2.h3 { font-size: 16px; font-weight: 700; margin: 4px 0 12px; }

/* header: tools menu, language switch, buy button */
.nav-links { align-items: center; }
.nav-links > li { display: flex; align-items: center; }
.nav-links a, .nav-tools-btn { display: inline-flex; align-items: center; gap: 4px; line-height: 24px; }
.nav-tools-btn { font-weight: 500; padding: 8px 12px; color: var(--ink); }
.nav-tools-btn span { font-size: 11px; color: var(--mute); }
.dropdown-menu.tools-menu { left: 0; right: auto; width: 340px; padding: 6px 0; box-shadow: 0 16px 40px -20px rgba(15, 0, 0, .35); }
.tools-menu a { display: block; padding: 8px 14px; line-height: 1.45; }
.tools-menu a:hover { background: var(--surface-soft); }
.tools-menu b { display: block; font-size: 14px; font-weight: 600; }
.tools-menu span { display: block; font-size: 12px; color: var(--mute); }
.lang-switch { font-size: 13px; font-weight: 600; color: var(--mute); padding: 4px 8px; border: 1px solid var(--hairline); border-radius: var(--rounded-sm); line-height: 22px; }
.lang-switch:hover { color: var(--ink); border-color: var(--hairline-strong); }
.mnav-label { margin: 12px 0 4px; font-size: 12px; color: var(--ash); }
.mnav-actions { display: flex; gap: 8px; margin-top: 12px; }
.mnav-actions .btn { flex: 1; }
.mnav-actions .lang-switch { color: var(--ink); font-size: 14px; }
@media (max-width: 1000px) { .brand-sub { display: none; } .nav-inner { gap: 16px; } .nav-links a, .nav-tools-btn { padding: 8px 8px; } }
@media (max-width: 480px) { .nav-buy { display: none; } }

/* footer */
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px 24px; padding-bottom: 24px; border-bottom: 1px solid var(--hairline); }
.foot-brand b { display: block; font-size: 15px; }
.foot-brand p { margin: 8px 0 14px; font-size: 13px; color: var(--mute); line-height: 1.7; }
.foot-col h4 { font-size: 13px; color: var(--ash); font-weight: 500; margin: 0 0 8px; }
.foot-col a { display: block; font-size: 13px; line-height: 2; color: var(--body); }
.foot-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-meta { align-items: center; font-size: 13px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* contact row (WeChat for zh, Telegram for en) */
.contact-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 10px 10px 12px; margin-top: 12px; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: 6px; }
.contact-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--buy); color: #fff; font-size: 13px; font-weight: 700; }
.contact-row span:not(.contact-ico) { display: block; font-size: 11px; color: var(--mute); line-height: 1.4; }
.contact-row strong { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buy-box { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--hairline-strong); }
.buy-box p { font-size: 13px; color: var(--body); }
html[lang="en"] .contact-ico { background: #229ed9; }

/* bottom-right nudge */
.nudge-card { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 340px; padding: 18px 18px 16px; background: var(--canvas); border: 1px solid var(--hairline-strong); border-radius: 8px; box-shadow: 0 24px 60px -24px rgba(15, 0, 0, .45); animation: nudge-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.nudge-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; color: var(--mute); font-size: 18px; line-height: 1; }
.nudge-close:hover { background: var(--surface-card); color: var(--ink); }
.nudge-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: .06em; color: var(--buy); font-weight: 600; }
.nudge-kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--buy); box-shadow: 0 0 0 3px rgba(31, 157, 85, .2); }
.nudge-title { display: block; margin: 8px 26px 0 0; font-size: 16px; line-height: 1.4; }
.nudge-card p { margin-top: 6px; font-size: 12.5px; color: var(--body); line-height: 1.6; }
@keyframes nudge-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .nudge-card { left: 12px; right: 12px; bottom: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .nudge-card { animation: none; } }

/* home sections */
.home-section { padding-bottom: 64px; }
.section-title { font-size: 24px; font-weight: 700; margin: 4px 0 20px; }
.access-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.access-steps { list-style: none; counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--hairline); }
.access-steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 2px 8px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.access-steps li::before { content: "0" counter(step); grid-row: span 2; color: var(--ash); font-size: 14px; }
.access-steps b { font-size: 15px; }
.access-steps span { font-size: 14px; color: var(--body); }
.access-steps code { background: var(--surface-card); padding: 0 6px; border-radius: var(--rounded-sm); }
.access-card { padding: 20px; border: 1px solid var(--ink); border-radius: 8px; background: var(--canvas); }
.access-card > strong { display: block; margin-top: 8px; font-size: 18px; }
.access-card .caption { margin-top: 12px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tool-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--hairline); border-radius: 6px; transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.tool-card b { font-size: 15px; }
.tool-card span { font-size: 13px; color: var(--body); line-height: 1.6; flex: 1; }
.tool-card em { font-style: normal; font-size: 12px; color: var(--ash); }
.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mute); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 8px; color: var(--body); font-size: 14px; line-height: 1.8; }
@media (max-width: 760px) { .access-grid { grid-template-columns: 1fr; } }

/* docs: raw markdown is in the page for crawlers until JS renders it */
.md-raw { white-space: pre-wrap; font-size: 14px; color: var(--body); }
