:root {
  --bg:#ffffff; --page:#ffffff; --ink:#16181d; --muted:#6a6f7b; --line:#eaebee; --soft:#f4f5f7; --btn:#16181d; --btn-ink:#ffffff;
  --avoid:#c93b3b; --watch:#b7740a; --entry:#16835a;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) { :root {
  --bg:#121317; --page:#121317; --ink:#f1f2f4; --muted:#979ca8; --line:#2a2d34; --soft:#1f2227; --btn:#f1f2f4; --btn-ink:#16181d;
  --avoid:#f07a7a; --watch:#e7aa45; --entry:#43c08c; } }

* { box-sizing:border-box; margin:0; }
[hidden] { display:none !important; }
html { -webkit-text-size-adjust:100%; }
body { background:var(--page); color:var(--ink); font:15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing:antialiased; }
.price, .coin-sub, .conf, .rows dd, .strength-head, .r-verdict, .usage-line, .usage, .pc-price, .pc-limit, .rank { font-variant-numeric:tabular-nums; }
button { font:inherit; color:inherit; cursor:pointer; background:none; border:0; padding:0; -webkit-tap-highlight-color:transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, label:has(input:focus-visible) { outline:2px solid var(--ink); outline-offset:2px; border-radius:8px; }

.app { max-width:480px; min-height:100dvh; margin:0 auto; display:flex; flex-direction:column;
  padding: calc(env(safe-area-inset-top) + 8px) 20px calc(env(safe-area-inset-bottom) + 20px); }
main { flex:1; }

/* Top bar */
.bar { display:grid; grid-template-columns:40px 1fr 40px; align-items:center; height:52px; margin:0 -10px 8px; }
.brand { grid-column:2; justify-self:center; color:inherit; text-decoration:none; display:flex; align-items:center; gap:7px; font-weight:650; font-size:15px; }
.mark { width:20px; height:20px; }
.icon { width:40px; height:40px; display:grid; place-items:center; border-radius:10px; color:var(--muted); }
.icon svg { width:20px; height:20px; }
.icon:hover { color:var(--ink); background:var(--soft); }
.back { grid-column:1; } .settings-btn { grid-column:3; }

/* Home */
h1 { font-size:30px; line-height:1.15; letter-spacing:-.025em; font-weight:700; margin:28px 0 8px; max-width:12em; }
h1.small { font-size:24px; margin-top:12px; }
.lead { color:var(--muted); font-size:15.5px; margin-bottom:24px; }
.field { display:flex; align-items:center; border:1px solid var(--line); border-radius:14px; background:var(--bg); padding:0 6px 0 14px; }
.field:focus-within { border-color:var(--ink); }
.field input { flex:1; min-width:0; height:52px; border:0; background:none; color:var(--ink); font:inherit; font-size:16px; outline:none; }
.field input::placeholder { color:var(--muted); }
.paste { height:36px; padding:0 12px; border-radius:10px; background:var(--soft); font-weight:600; font-size:13.5px; }
.primary { width:100%; height:52px; margin-top:10px; border-radius:14px; background:var(--btn); color:var(--btn-ink); font-weight:600; font-size:16px; }
.primary:hover { opacity:.92; }
.secondary { height:44px; padding:0 18px; border-radius:12px; background:var(--soft); font-weight:600; font-size:14.5px; }
.link { color:var(--muted); font-size:14px; text-decoration:underline; text-underline-offset:3px; text-decoration-color:var(--line); }
.link:hover { color:var(--ink); }
.error { margin-top:12px; color:var(--avoid); font-size:14px; }

h2 { font-size:14px; font-weight:650; margin:36px 0 6px; }
.recent-list { list-style:none; padding:0; }
.recent-list button { width:100%; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0;
  border-bottom:1px solid var(--line); text-align:left; }
.recent-list li:last-child button { border-bottom:0; }
.r-coin, .r-verdict { display:flex; flex-direction:column; min-width:0; }
.r-coin b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.r-verdict { align-items:flex-end; flex:none; }
.r-coin .muted, .r-verdict .muted { font-size:13px; }
b.avoid { color:var(--avoid); } b.watch { color:var(--watch); } b.entry { color:var(--entry); }

.install { margin-top:36px; padding:16px; border-radius:14px; background:var(--soft); display:flex; align-items:center; gap:14px; font-size:14px; }
.install p { flex:1; } .install .secondary { background:var(--bg); height:38px; }

/* Loading */
.loading { padding-top:20px; }
.status-line { display:flex; align-items:center; gap:10px; font-size:15px; margin-top:28px; }
.spin { width:15px; height:15px; border-radius:50%; border:2px solid var(--line); border-top-color:var(--ink); animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.track { display:grid; grid-template-columns:repeat(3,1fr); gap:4px; margin-top:12px; }
.track i { height:3px; border-radius:3px; background:var(--line); transition:background .3s; }
.track i.on { background:var(--ink); }

/* Result */
.result { padding-top:12px; }
.coin-name { font-size:22px; font-weight:650; letter-spacing:-.015em; }
.coin-name.has-price { display:flex; justify-content:space-between; align-items:baseline; gap:12px; }
.coin-name .muted { font-weight:500; }
.price { font-size:17px; font-weight:600; }
.coin-sub { display:flex; justify-content:space-between; color:var(--muted); font-size:14px; margin-top:2px; }
.verdict { margin-top:24px; }
.action { font-size:44px; line-height:1.05; font-weight:700; letter-spacing:-.03em; }
.avoid .action { color:var(--avoid); } .watch .action { color:var(--watch); } .entry .action { color:var(--entry); }
.conf { display:flex; align-items:center; gap:12px; margin:12px 0 14px; font-size:14px; color:var(--muted); white-space:nowrap; }
.conf .meter { flex:1; }
.meter { height:5px; border-radius:5px; background:var(--soft); overflow:hidden; }
.meter i { display:block; height:100%; border-radius:5px; background:var(--ink); }
.conf .meter i { width:var(--w); animation:fill .7s cubic-bezier(.2,.7,.2,1); }
.avoid .meter i { background:var(--avoid); } .watch .meter i { background:var(--watch); } .entry .meter i { background:var(--entry); }
@keyframes fill { from { width:0; } }
.summary { font-size:16px; line-height:1.55; }
.flags { list-style:none; padding:0; margin-top:14px; }
.flags li { position:relative; padding-left:20px; color:var(--avoid); font-size:14.5px; margin-top:5px; }
.flags li::before { content:"!"; position:absolute; left:0; top:3px; width:14px; height:14px; border-radius:50%;
  background:var(--avoid); color:var(--bg); font-size:10px; font-weight:700; line-height:14px; text-align:center; }

.tabs { display:flex; gap:24px; margin-top:28px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--page); z-index:1; }
.tabs button { padding:12px 0 11px; font-size:15px; font-weight:600; color:var(--muted); margin-bottom:-1px; border-bottom:2px solid transparent; }
.tabs button[aria-selected=true] { color:var(--ink); border-bottom-color:var(--ink); }
.tab { padding-top:16px; font-size:15px; }
.tab p { line-height:1.55; }
h4 { font-size:13.5px; font-weight:600; color:var(--muted); margin:18px 0 4px; }
.tab > h4:first-child { margin-top:0; }
.list { list-style:none; padding:0; }
.list li { position:relative; padding-left:14px; margin:6px 0; line-height:1.45; }
.list li::before { content:""; position:absolute; left:0; top:.6em; width:5px; height:5px; border-radius:50%; background:var(--muted); }
.list.for li::before { background:var(--entry); } .list.against li::before { background:var(--avoid); }
.rows div { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.rows dt { color:var(--muted); } .rows dd { font-weight:550; text-align:right; }
.strength { margin:18px 0 14px; }
.strength-head { display:flex; justify-content:space-between; font-weight:550; margin-bottom:8px; }
.strength p { margin-top:8px; font-size:13.5px; }
.tab .link { display:block; margin-top:8px; }
.sentiment { font-size:16px; margin-bottom:4px; }
.s-bullish { color:var(--entry); } .s-bearish { color:var(--avoid); } .s-mixed { color:var(--watch); }
.posts { list-style:none; padding:0; }
.posts li { display:flex; flex-direction:column; padding:9px 0; border-bottom:1px solid var(--line); }
.posts li:last-child { border-bottom:0; }
.posts a { color:var(--ink); font-weight:600; text-decoration:none; } .posts a:hover { text-decoration:underline; }
.posts span:last-child { color:var(--muted); }
.actions { display:flex; gap:10px; margin-top:28px; }
.actions .secondary { flex:1; }
.usage { text-align:center; color:var(--muted); font-size:13.5px; margin-top:12px; }

/* Settings */
.hint { color:var(--muted); font-size:14px; margin-bottom:12px; }
.settings h2 { margin-top:28px; }
.choices { display:grid; gap:8px; }
.choices label { display:flex; gap:12px; align-items:flex-start; padding:13px 14px; border:1px solid var(--line); border-radius:14px; cursor:pointer; }
.choices label:has(input:checked) { border-color:var(--ink); }
.choices input { margin-top:4px; accent-color:var(--ink); }
.choices b { display:block; } .choices label span span { color:var(--muted); font-size:14px; }
.usage-line b { color:var(--entry); font-size:20px; }
.clear-recent { margin-top:20px; }

.pos { color:var(--entry); } .neg { color:var(--avoid); } .muted { color:var(--muted); }
.fine { margin-top:40px; font-size:12px; line-height:1.45; color:var(--muted); text-align:center; }

@media (min-width:700px) { .app { padding-top:40px; } h1 { font-size:36px; } }
@media (prefers-reduced-motion: reduce) { .conf .meter i, .spin, .track i { animation:none; transition:none; } }

/* Account */
.toast { background:var(--ink); color:var(--page); border-radius:14px; padding:12px 16px; font-size:14.5px; margin:4px 0 8px; }
.upgrade { margin-top:4px; }
.acct h2:first-child { margin-top:20px; }
.acct form + h2 { margin-top:28px; }
.signin .field { margin-bottom:10px; }
.wide { width:100%; }
.plan-line { margin-bottom:4px; }
.acct-in form { margin-top:12px; }
.signout { margin-top:6px; }

/* ---------- Navigation ---------- */
.bar { grid-template-columns:40px 1fr 40px; }
.tier-badge { font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; background:var(--ink); color:var(--page); margin-left:4px; }


/* ---------- Home ---------- */
.home h1 { font-size:26px; margin:16px 0 16px; }
.upgrade-row { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.upgrade-row .primary { margin-top:0; } .upgrade-row .secondary { width:100%; height:48px; }
.block { margin-top:32px; }
.block-head { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:4px; }
.block-head h2 { margin:0; }
.hint-inline { color:var(--muted); font-size:13px; }
.popular-list, .coin-list { list-style:none; padding:0; }
.popular-list button, .coin-list button { width:100%; display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); text-align:left; }
.popular-list li:last-child button, .coin-list li:last-child button { border-bottom:0; }
.rank { flex:none; width:24px; height:24px; border-radius:50%; background:var(--soft); display:grid; place-items:center; font-size:12.5px; font-weight:700; }
.popular-list li:first-child .rank { background:var(--ink); color:var(--page); }
.r-coin { flex:1; }
.r-coin .muted, .r-verdict .muted { font-size:13px; }
.empty { color:var(--muted); font-size:14px; padding:10px 0; }
.plan-nudge { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:28px; padding:14px 16px; border-radius:14px;
  background:var(--soft); color:var(--ink); text-decoration:none; font-size:14px; }
.nudge-cta { flex:none; font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.install { margin-top:16px; }

/* ---------- Result additions ---------- */
.depth { display:flex; justify-content:space-between; gap:12px; font-size:13px; color:var(--muted); margin:-6px 0 12px; }
.learn { display:inline-block; color:var(--muted); font-size:13px; text-decoration:underline; text-underline-offset:3px; text-decoration-color:var(--line); }
.learn:hover { color:var(--ink); }
.tab > .learn { margin-top:18px; }
.tab-lock { font-size:10.5px; font-weight:700; padding:1px 6px; border-radius:999px; background:var(--soft); color:var(--muted); margin-left:4px; vertical-align:2px; }
.locked { margin-top:18px; padding:16px; border-radius:16px; background:var(--soft); }
.lock-head { display:flex; align-items:center; gap:8px; } .lock-head svg { width:18px; height:18px; flex:none; }
.locked p { color:var(--muted); font-size:14px; margin:6px 0 12px; }
.locked .primary { margin-top:0; height:46px; font-size:15px; }
.tab > .locked:first-child { margin-top:0; }
.theses { list-style:none; padding:0; }
.theses li { padding:10px 0; border-bottom:1px solid var(--line); }
.theses li:last-child { border-bottom:0; }
.th-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:14px; }
.th-head a { color:var(--ink); font-weight:650; text-decoration:none; } .th-head a:hover { text-decoration:underline; }
.theses p { margin-top:3px; }
.stance { margin-left:auto; font-size:11.5px; font-weight:700; padding:1px 8px; border-radius:999px; background:var(--soft); }
.st-bull { color:var(--entry); } .st-bear { color:var(--avoid); } .st-neutral { color:var(--muted); }

/* ---------- Guide ---------- */
.guide-toc { display:flex; gap:8px; overflow-x:auto; padding:4px 0 12px; margin:4px -20px 8px; padding-left:20px; padding-right:20px; scrollbar-width:none; }
.guide-toc a, .subnav a { flex:none; padding:7px 12px; border-radius:999px; background:var(--soft); color:var(--ink); text-decoration:none; font-size:13.5px; font-weight:600; }
.guide-body h2 { font-size:19px; letter-spacing:-.01em; margin:28px 0 8px; scroll-margin-top:12px; }
.guide-body > p { line-height:1.6; margin-bottom:10px; }
.defs div { padding:10px 0; border-bottom:1px solid var(--line); }
.defs div:last-child { border-bottom:0; }
.defs dt { font-weight:650; } .defs dd { color:var(--muted); margin-top:2px; line-height:1.5; }
.t-avoid { color:var(--avoid); } .t-watch { color:var(--watch); } .t-entry { color:var(--entry); }
.note { font-size:14px; color:var(--muted); padding:12px 14px; border-radius:12px; background:var(--soft); }

/* ---------- Account ---------- */
.subnav { display:flex; gap:8px; overflow-x:auto; margin:4px -20px 4px; padding:4px 20px 8px; scrollbar-width:none; }
.acct-block { padding-top:20px; scroll-margin-top:12px; }
.acct-block + .acct-block { margin-top:12px; border-top:1px solid var(--line); }
.acct-block h2 { margin:0 0 10px; font-size:18px; }
.acct-block h3 { font-size:14px; font-weight:650; margin:18px 0 4px; }
.seg { display:grid; grid-template-columns:1fr 1fr; padding:4px; border-radius:12px; background:var(--soft); margin-bottom:12px; }
.seg button { height:36px; border-radius:9px; font-weight:600; font-size:14px; color:var(--muted); }
.seg button[aria-selected=true] { background:var(--bg); color:var(--ink); box-shadow:0 1px 3px rgba(0,0,0,.08); }
.auth .field { margin-bottom:0; }
.fine-left { font-size:12.5px; color:var(--muted); margin-top:10px; }
.who { line-height:1.5; margin-bottom:8px; }
.plans { display:grid; gap:10px; }
.plan-card { border:1px solid var(--line); border-radius:16px; padding:16px; }
.plan-card.is-current { border-color:var(--ink); }
.pc-head { display:flex; justify-content:space-between; align-items:baseline; }
.pc-head b { font-size:17px; } .pc-price { font-weight:700; font-size:17px; } .pc-price .muted { font-weight:500; font-size:14px; }
.pc-limit { font-weight:600; margin:4px 0 6px; }
.plan-card .list { margin-bottom:12px; font-size:14px; }
.plan-card .primary { margin-top:0; height:46px; font-size:15px; }
.plan-card .secondary { height:46px; }
.current { display:block; text-align:center; font-size:14px; font-weight:600; padding:10px 0 2px; }
.trial-note { margin-top:10px; }
.legal-links { display:flex; gap:16px; margin-top:20px; font-size:13.5px; }
.legal-links a { color:var(--muted); }

/* ---------- Top bar: Home / Analyze / Settings ---------- */
.topnav { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:12px;
  height:58px; margin:0 -20px 8px; padding:0 20px; background:color-mix(in srgb, var(--page) 90%, transparent);
  backdrop-filter:saturate(1.4) blur(14px); border-bottom:1px solid var(--line); }
.topnav .brand { grid-column:auto; justify-self:auto; flex:none; }
.tn-tabs { display:flex; gap:2px; padding:3px; border-radius:12px; background:var(--soft); }
.tn-tabs a, .tn-tabs button { height:34px; display:flex; align-items:center; padding:0 13px; border-radius:9px; font-size:14px; font-weight:600;
  color:var(--muted); text-decoration:none; }
.tn-tabs a:hover, .tn-tabs button:hover { color:var(--ink); }
.tn-tabs [aria-current=page] { background:var(--bg); color:var(--ink); box-shadow:0 1px 3px rgba(0,0,0,.08); }
.back-link { display:inline-flex; align-items:center; gap:4px; margin:4px 0 0 -4px; padding:6px 8px 6px 4px; border-radius:8px; color:var(--muted); font-size:14.5px; font-weight:600; }
.back-link svg { width:18px; height:18px; } .back-link:hover { color:var(--ink); background:var(--soft); }
.shortcuts { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.shortcuts button { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:14px; text-align:left; }
.shortcuts button:hover { border-color:var(--ink); }
.shortcuts svg { width:22px; height:22px; flex:none; }
.shortcuts b { display:block; font-size:14.5px; } .shortcuts span span { color:var(--muted); font-size:12.5px; line-height:1.3; }
@media (max-width: 400px) { .brand-name { display:none; } .tn-tabs a, .tn-tabs button { padding:0 12px; } }
