/* Rug Radar design system (v1.4 redesign). Shared by the landing, login and app pages.
   One graphite world: colour only ever means something. Green = up / safe, amber = caution, red = down / danger,
   purple = AI (Meme Coach). The purple-to-green brand gradient lives only in the logo. */

@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #0b0c0e;
  --panel: #111316;
  --panel-2: #16191d;
  --hover: #1b1e23;
  --line: #24282e;
  --line-2: #1a1d22;
  --line-3: #353a42;
  --text: #e8eaed;
  --text-2: #a3a9b2;
  --text-3: #6c727b;
  --accent: #b3c6f5;
  --up: #45cc8e;
  --down: #ef5b63;
  --warn: #dfac4f;
  --ai: #b6a0ff;
  --up-bg: rgba(69, 204, 142, .10);
  --down-bg: rgba(239, 91, 99, .10);
  --warn-bg: rgba(223, 172, 79, .10);
  --ai-bg: rgba(182, 160, 255, .09);
  --ai-line: rgba(182, 160, 255, .32);
  --scrim: rgba(4, 5, 7, .72);
  --on-light: #0b0c0e;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --r: 6px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); } .warn { color: var(--warn); } .ai { color: var(--ai); }
.dim { color: var(--text-3); } .soft { color: var(--text-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* icons: inline SVG, outline, follow the text colour */
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.i.fill { fill: currentColor; stroke: none; }

/* brand */
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; font-size: 15px; color: var(--text); }
.brand svg { width: 20px; height: 20px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); font-weight: 500; text-decoration: none; white-space: nowrap; color: var(--text); }
.btn:hover { background: var(--hover); border-color: #30353c; }
.btn.primary { background: var(--text); color: var(--on-light); border-color: var(--text); }
.btn.primary:hover { background: #ffffff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: default; }

/* pills, chips, tags */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill.worth { color: var(--up); background: var(--up-bg); } .pill.caution { color: var(--warn); background: var(--warn-bg); } .pill.avoid { color: var(--down); background: var(--down-bg); }
.pill.ai { color: var(--ai); background: var(--ai-bg); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--text-2); background: var(--panel); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 500; }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line-2); }
.tag.good { color: var(--up); } .tag.bad { color: var(--down); } .tag.mid { color: var(--warn); }

/* forms */
.input { height: 40px; width: 100%; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); outline: none; }
.input:focus { border-color: #4a5260; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; color: var(--text-2); }
.err { color: var(--down); font-size: 13px; margin: 0; min-height: 1em; }

/* coin avatar: a logo, or initials tinted by the symbol */
.av { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
      background: hsl(var(--h, 220) 28% 19%); color: hsl(var(--h, 220) 70% 82%); border: 1px solid hsl(var(--h, 220) 28% 27%); }
.av img { width: 100%; height: 100%; object-fit: cover; }

/* surfaces */
.panel-box { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px 16px; min-width: 0; }
.panel-box h3 { margin: 0 0 4px; font-size: 13.5px; font-weight: 600; }
.ai-box { border: 1px solid var(--ai-line); background: var(--ai-bg); border-radius: 10px; padding: 12px 14px; }
.ai-box h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ai); display: flex; align-items: center; gap: 6px; }
.livedot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--up); margin-right: 6px; vertical-align: 1px; }

/* coin card (feed, landing) */
.ccard { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.cc-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cc-top .av { width: 36px; height: 36px; font-size: 12px; }
.cc-name { min-width: 0; flex: 1; }
.cc-name b { font-weight: 600; font-size: 14.5px; }
.cc-name small { display: block; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-meta { font-size: 12px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cc-stats div { background: var(--bg); border-radius: 8px; padding: 6px 8px; min-width: 0; }
.cc-stats small { display: block; font-size: 11px; color: var(--text-3); }
.cc-stats b { font-family: var(--mono); font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums; }
.cc-ai { display: flex; gap: 7px; font-size: 12.5px; color: var(--text); background: var(--ai-bg); border: 1px solid var(--ai-line); border-radius: 8px; padding: 7px 9px; }
.cc-ai .i { color: var(--ai); }

/* toast / notification */
.toast { background: var(--panel); border: 1px solid rgba(239, 91, 99, .55); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.toast b { font-weight: 600; }
.toast p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.ic.bad { background: var(--down-bg); color: var(--down); } .ic.good { background: var(--up-bg); color: var(--up); } .ic.ai { background: var(--ai-bg); color: var(--ai); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: var(--scrim); }
.modal-in { width: min(460px, 100%); background: var(--bg); border: 1px solid var(--line-3); border-radius: 14px; padding: 20px; display: grid; gap: 14px; max-height: calc(100vh - 32px); overflow: auto; position: relative; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: var(--r); border: 1px solid var(--line); background: none; display: grid; place-items: center; color: var(--text-2); }
.keybox { border: 1px solid var(--line-3); background: var(--panel); border-radius: 10px; padding: 12px; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--up); animation: rr-spin 1s linear infinite; flex: none; }
@keyframes rr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
