:root {
  --ink: #e8e8e8;
  --muted: #888;
  --paper: #0a0a0f;
  --panel: rgba(18, 18, 26, .85);
  --line: rgba(255, 255, 255, .08);
  --lime: #a3e635;
  --ember: #f97316;
  --red: #f87171;
  --green: #4ade80;
  --blue: #60a5fa;
  --purple: #8b5cf6;
  --discord: #5865f2;
  --discord-bg: rgba(88, 101, 242, .15);
  --shadow: 0 24px 70px rgba(0, 0, 0, .5);
  --radius: 10px;
  --bar-h: 48px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding-top: var(--bar-h);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
.shell { width: min(1480px, calc(100% - 32px)); margin: 0 auto; padding: 16px 0 36px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: end; margin-bottom: 12px; }
.eyebrow { margin: 0 0 5px; color: var(--lime); font: 600 11px/1.1 "JetBrains Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin: 0; }
h1 { font-family: "Inter", sans-serif; font-weight: 700; font-size: clamp(40px, 6vw, 96px); line-height: .85; letter-spacing: -.04em; color: var(--ink); }
h1 span { color: transparent; -webkit-text-stroke: 1.5px var(--ink); opacity: .4; }

/* Hero card */
.hero-brand { display: flex; align-items: center; gap: 14px; }
.qs-logo { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; }
.hero-card, .panel, .kpi { border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.hero-card { padding: 16px 18px; transform: rotate(-1deg); border-radius: var(--radius); font-size: 14px; line-height: 1.5; color: var(--muted); }
.hero-card strong { color: var(--ink); }
.pulse { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 8px rgba(163, 230, 53, .1); animation: beat 1.5s infinite; vertical-align: middle; margin-right: 6px; }

/* Guru bar */
.gurus { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.gurus button { border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(18px); border-radius: 999px; padding: 7px 14px; cursor: pointer; font: 500 13px "Inter", sans-serif; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.gurus button.active { background: var(--lime); color: #000; border-color: var(--lime); }
.guru-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--guru-color, var(--lime)); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 12px; }
.kpi { padding: 10px 14px; border-radius: var(--radius); }
.kpi b { display: block; font-family: "JetBrains Mono", monospace; font-size: 24px; line-height: 1; color: var(--ink); }
.kpi span { color: var(--muted); font-size: 12px; }

/* Workbench */
.workbench { display: grid; grid-template-columns: 340px 1fr; gap: 12px; align-items: stretch; }
.panel { border-radius: var(--radius); overflow: hidden; }
.panel-head, .chart-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel h2, .chart-head h2 { font-family: "Inter", sans-serif; font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
input { width: 170px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 13px; background: rgba(255,255,255,.04); color: var(--ink); outline: none; font-family: "Inter", sans-serif; font-size: 13px; }
input::placeholder { color: var(--muted); }
input:focus { border-color: var(--lime); }

/* Tabs */
.tabs { display: flex; gap: 6px; padding: 10px 14px 0; }
.tabs button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; cursor: pointer; font: 500 12px "Inter", sans-serif; color: var(--muted); }
.tabs button.active { background: var(--lime); color: #000; border-color: var(--lime); }

/* Symbols list */
.symbols-panel, .chart-panel { height: 560px; display: flex; flex-direction: column; }
.symbols { flex: 1; min-height: 0; overflow: auto; padding: 10px; }
.symbol-row { display: grid; grid-template-columns: 78px 1fr auto; gap: 9px; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 6px; text-align: left; cursor: pointer; color: var(--ink); }
.symbol-row.active { background: rgba(163, 230, 53, .08); border-radius: var(--radius); border-bottom-color: transparent; }
.ticker { font: 600 20px/1 "JetBrains Mono", monospace; }
.tiny { color: var(--muted); font-size: 12px; }
.badge { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-size: 12px; color: var(--muted); }
.mini-guru { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-left: 2px; vertical-align: middle; }

/* Chart */
.chart-wrap { flex: 1; min-height: 0; padding: 12px 16px 6px; }
.meta-strip { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.meta-strip span, .neighbors span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: rgba(255,255,255,.03); font-size: 12px; color: var(--muted); }
.neighbors { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 14px; }

/* Feed */
.feed-panel { margin-top: 18px; }
.feed { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.feed-item { padding: 16px 18px; border-top: 1px solid var(--line); min-height: 112px; font-size: 14px; line-height: 1.5; }
.feed-item:nth-child(odd) { border-right: 1px solid var(--line); }
.feed-item p { margin: 8px 0 0; color: #bbb; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.feed-item .tiny { font-size: 11px; }
.feed-actions { margin-top: 6px; display: flex; align-items: center; gap: 6px; }
a { color: var(--blue); text-decoration: none; font-size: 13px; }
a:hover { text-decoration: underline; }

/* Sentiment badges */
.sig-badge { font-family: "JetBrains Mono", monospace; font-weight: 600; }
.sig-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; }

/* Warning bar */
.warn-bar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.warn-item { padding: 10px 16px; border-radius: var(--radius); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.warn-auth { background: rgba(248, 113, 113, .15); border: 1px solid rgba(248, 113, 113, .3); color: var(--red); }
.warn-stale { background: rgba(249, 115, 22, .15); border: 1px solid rgba(249, 115, 22, .3); color: var(--ember); }

/* Animations */
.reveal { animation: rise .6s ease both; }
.delay-1 { animation-delay: .06s; } .delay-2 { animation-delay: .12s; } .delay-3 { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes beat { 50% { transform: scale(1.3); } }

/* Scrollbar */
.symbols::-webkit-scrollbar { width: 4px; }
.symbols::-webkit-scrollbar-track { background: transparent; }
.symbols::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

/* ═══ Announcement Bar ═══ */
.announce-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--bar-h);
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  border-bottom: 1px solid rgba(139, 92, 246, .25);
  display: flex; align-items: center;
  animation: slideDown .35s ease both;
}
.announce-bar.hidden { display: none; }
.announce-inner {
  width: min(1480px, calc(100% - 32px)); margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
}
.announce-icon { color: var(--purple); font-size: 10px; margin-right: 4px; }
.announce-text { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.announce-text strong { color: var(--ink); }
.announce-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--discord-bg); color: #8b9cf7;
  border: 1px solid rgba(88, 101, 242, .3);
  border-radius: 999px; padding: 5px 14px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  text-decoration: none; transition: all .2s; flex-shrink: 0;
}
.announce-cta:hover { background: rgba(88, 101, 242, .3); border-color: var(--discord); text-decoration: none; }
.announce-arrow { font-size: 14px; }
.announce-close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 14px; padding: 2px 4px; line-height: 1;
  flex-shrink: 0;
}
.announce-close:hover { color: var(--ink); }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: none; } }

/* ═══ Welcome Modal ═══ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  animation: fadeIn .3s ease both;
}
.modal-overlay.open { display: flex; }
.modal-container {
  position: relative;
  width: min(480px, calc(100% - 32px));
  background: linear-gradient(145deg, #12121a 0%, #1a1a2e 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .6);
  animation: modalUp .35s ease both;
  padding: 36px 32px 28px;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 18px; padding: 4px; line-height: 1;
}
.modal-close:hover { color: var(--ink); }
.modal-body { text-align: center; }
.modal-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.modal-logo { width: 42px; height: 42px; border-radius: 10px; }
.modal-badge {
  display: inline-block;
  background: rgba(163, 230, 53, .15); color: var(--lime);
  border: 1px solid rgba(163, 230, 53, .3);
  border-radius: 999px; padding: 2px 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.modal-heading {
  font-size: 24px; font-weight: 700; line-height: 1.2;
  letter-spacing: -.02em; color: var(--ink); margin: 0 0 8px;
}
.modal-heading em { color: var(--lime); font-style: normal; }
.modal-sub {
  color: var(--muted); font-size: 14px; line-height: 1.5;
  margin: 0 0 20px;
}
.modal-sub strong { color: var(--ink); }
.modal-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.modal-feat {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; color: var(--ink); text-align: left;
}
.modal-feat-icon { font-size: 18px; flex-shrink: 0; }
.modal-feat strong { color: var(--lime); }
.modal-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--purple); color: #fff;
  border-radius: 999px; padding: 12px 32px;
  font-size: 15px; font-weight: 700; text-decoration: none;
  transition: all .2s; margin-bottom: 14px;
}
.modal-cta:hover { background: #7c3aed; transform: translateY(-1px); text-decoration: none; box-shadow: 0 8px 24px rgba(139, 92, 246, .3); }
.modal-cta-arrow { font-size: 18px; }
.modal-footer-text { font-size: 12px; color: var(--muted); margin: 0; }
.modal-footer-text a { color: var(--blue); }

.modal-step2 { display: none; }
.modal-link-btn {
  display: block; width: 100%; text-align: center;
  background: none; border: none; color: var(--muted);
  cursor: pointer; font: 500 13px "Inter", sans-serif;
  padding: 8px; margin-top: 4px;
}
.modal-link-btn:hover { color: var(--ink); }

/* Suggestion form */
.suggest-form { text-align: left; margin-bottom: 16px; }
.suggest-field { margin-bottom: 12px; }
.suggest-field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.suggest-req { color: var(--red); }
.suggest-field input, .suggest-field select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; background: rgba(255,255,255,.04);
  color: var(--ink); font: 400 13px "Inter", sans-serif; outline: none;
}
.suggest-field input:focus, .suggest-field select:focus { border-color: var(--purple); }
.suggest-field select { cursor: pointer; appearance: auto; }
.suggest-hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 1.4; }
.suggest-submit { width: 100%; justify-content: center; margin-bottom: 0; }
.suggest-thanks { text-align: center; padding: 10px 0; }
.suggest-thanks-icon { font-size: 40px; margin-bottom: 8px; }
.suggest-thanks-title { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.suggest-thanks-text { font-size: 13px; color: var(--muted); margin: 0 0 16px; line-height: 1.5; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalUp { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }

/* ═══ Footer ═══ */
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; padding: 32px 0 24px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 32px; height: 32px; border-radius: 8px; }
.footer-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.footer-copy { font-size: 12px; color: var(--muted); margin-top: 2px; }
.footer-mid { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-qslink {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  background: rgba(163, 230, 53, .08); color: var(--lime);
  font-size: 12px; font-weight: 600; white-space: nowrap;
  text-decoration: none; transition: all .2s;
}
.footer-qslink:hover { background: rgba(163, 230, 53, .18); border-color: var(--lime); text-decoration: none; }
.qs-icon { font-weight: 800; font-size: 11px; letter-spacing: -.02em; }
.discord-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px;
  background: var(--discord-bg); color: #8b9cf7;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  cursor: pointer; transition: all .2s; text-decoration: none;
}
.discord-btn:hover { background: rgba(88, 101, 242, .25); border-color: #8b9cf7; text-decoration: none; }
.discord-icon { font-size: 12px; color: var(--discord); }
.footer-links { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.footer-sep { color: var(--line); }

/* Mobile */
@media (max-width: 980px) {
  :root { --bar-h: 56px; }
  .announce-inner { font-size: 11px; gap: 8px; flex-wrap: wrap; }
  .announce-text { white-space: normal; }
  .announce-cta { padding: 4px 10px; font-size: 11px; }
  .hero, .workbench, .kpis, .feed { grid-template-columns: 1fr; }
  .hero-card { transform: none; }
  .hero-brand input { width: 100%; }
  .symbols-panel, .chart-panel { height: auto; }
  .symbols { flex: none; height: 360px; }
  .feed-item:nth-child(odd) { border-right: 0; }
  .chart-wrap { flex: none; height: 420px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-mid { justify-content: center; }
  .modal-container { padding: 28px 20px 24px; }
  .modal-heading { font-size: 20px; }
  /* Mobile layout fixes */
  .symbol-row { grid-template-columns: auto 1fr auto; }
  .panel-head { flex-wrap: wrap; }
  .panel-head input { width: 100%; }
}

/* Small tablets & large phones */
@media (max-width: 640px) {
  :root { --bar-h: 52px; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .feed { grid-template-columns: 1fr; }
  .feed-item { min-height: 0; padding: 14px 16px; }
  .feed-item p { -webkit-line-clamp: 3; }
  h1 { font-size: clamp(32px, 8vw, 48px); }
  .hero-card { font-size: 13px; padding: 14px 16px; }
  .chart-wrap { height: 340px; }
  .symbols { height: 300px; }
  .gurus button { font-size: 12px; padding: 6px 12px; }
  .footer-mid { flex-direction: column; align-items: center; }
  .modal-container { padding: 24px 16px 20px; margin: 12px; border-radius: 12px; }
  .modal-heading { font-size: 18px; }
  .modal-cta { width: 100%; justify-content: center; padding: 14px 24px; font-size: 14px; }
  .modal-feat { font-size: 12px; padding: 8px 12px; }
}

/* Small phones */
@media (max-width: 480px) {
  :root { --bar-h: 48px; }
  body { padding-top: var(--bar-h); }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .kpi b { font-size: 20px; }
  .kpi { padding: 8px 10px; }
  .ticker { font-size: 17px; }
  .symbol-row { padding: 8px 4px; gap: 6px; min-height: 48px; }
  .chart-wrap { height: 280px; }
  .symbols { height: 260px; }
  .panel-head, .chart-head { padding: 10px 12px; }
  .panel-head h2, .chart-head h2 { font-size: 18px; }
  .feed-item { padding: 12px 14px; font-size: 13px; }
  .discord-btn, .footer-qslink { font-size: 12px; padding: 6px 14px; }
  .modal-container { padding: 20px 14px 18px; }
  .modal-heading { font-size: 17px; }
  .announce-inner { font-size: 10px; gap: 6px; }
  .announce-cta { padding: 3px 8px; font-size: 10px; }
  .gurus button { padding: 8px 14px; }
  .symbol-row { min-height: 44px; }
  .modal-close { padding: 8px; }
  .announce-close { padding: 6px; }
}

/* Prevent text size adjustment on orientation change */
html { -webkit-text-size-adjust: 100%; }
