/* SignalTrade — shared design tokens + components for the public marketing/blog/legal site.
   Tokens are kept identical to wwwroot/app/index.html's inline <style> so the marketing site
   and the dashboard read as one product, not two. */

:root {
  --bg: #f3f5f9;
  --card-bg: #ffffff;
  --text: #171a21;
  --text-dim: #667085;
  --border: #d3d9e3;
  --accent: #4f46e5;
  --accent-bg: #edecfe;
  --green: #16a34a;
  --green-strong: #0d7a34;
  --amber: #b45309;
  --red: #dc2626;
  --green-bg: #eafaf0;
  --amber-bg: #fdf3e2;
  --red-bg: #fde8e8;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 10px rgba(16,24,40,.06);
  --shadow-md: 0 6px 16px rgba(16,24,40,.10), 0 2px 4px rgba(16,24,40,.05);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --card-bg: #1a1d24;
    --text: #edeff3;
    --text-dim: #97a0b3;
    --border: #2a2e38;
    --accent: #8b85f7;
    --accent-bg: #23214a;
    --green: #34d058;
    --green-strong: #22b34a;
    --amber: #e0a13a;
    --red: #f06060;
    --green-bg: #103821;
    --amber-bg: #3a2c10;
    --red-bg: #3a1616;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 2px 10px rgba(0,0,0,.4);
    --shadow-md: 0 8px 20px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: var(--accent); }
.site-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* -- Header / nav ------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.site-header .site-wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 17px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--green));
}
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 600; }
.site-nav a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent); color: #fff !important; padding: 9px 16px; border-radius: 999px;
}
.nav-cta:hover { opacity: .92; }

/* -- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; font-weight: 700; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { opacity: .92; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-dim); }

/* -- Cards / sections ----------------------------------------------------- */
.card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
section { padding: 64px 0; }
section.tight { padding: 40px 0; }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.section-head { max-width: 620px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: 30px; margin: 8px 0 10px; }
.section-head p { color: var(--text-dim); font-size: 16px; margin: 0; }
.tabular { font-variant-numeric: tabular-nums; font-family: var(--mono); }

/* -- Footer ----------------------------------------------------------------- */
.site-footer { margin-top: 40px; border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--accent), var(--green)) 1; background: var(--card-bg); }
.site-footer .site-wrap { padding: 44px 24px 36px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.footer-col h4 { font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .07em; margin: 0 0 14px; font-weight: 800; }
.footer-col a { display: block; color: var(--text); text-decoration: none; font-size: 14px; margin-bottom: 9px; opacity: .8; transition: color .15s, opacity .15s; }
.footer-col a:hover { opacity: 1; color: var(--accent); }
.footer-legal { color: var(--text-dim); font-size: 13px; padding: 18px 24px; border-top: 1px solid var(--border); background: var(--bg); }

/* -- Content pages (blog / legal) ------------------------------------------- */
.content-page { padding: 56px 0 80px; }
.content-page article { max-width: 700px; margin: 0 auto; }
.content-page h1 { font-size: 32px; margin-bottom: 6px; }
.content-page .meta { color: var(--text-dim); font-size: 14px; margin-bottom: 32px; }
.content-page h2 { font-size: 22px; margin-top: 40px; }
.content-page p, .content-page li { color: var(--text); font-size: 16px; }
.content-page ul, .content-page ol { padding-left: 22px; }
.back-link { display: inline-block; margin-bottom: 24px; color: var(--text-dim); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--text); }

/* -- Icon badges (trust bar, feature grid) ------------------------------------ */
.icon-badge { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.icon-badge svg { width: 20px; height: 20px; }
.icon-badge.tone-accent { background: var(--accent-bg); color: var(--accent); }
.icon-badge.tone-green { background: var(--green-bg); color: var(--green-strong); }

/* -- Per-symbol brand-color chips --------------------------------------------- */
.symbol-chip { --chip: var(--accent); border: 1px solid color-mix(in srgb, var(--chip) 45%, var(--border)); color: var(--chip); background: color-mix(in srgb, var(--chip) 10%, var(--card-bg)); }
.symbol-chip.eth { --chip: #627eea; }
.symbol-chip.btc { --chip: #f7931a; }
.symbol-chip.sol { --chip: #9945ff; }
.symbol-chip.xaut { --chip: #d4af37; }
.symbol-chip.ltc { --chip: #345d9d; }
@media (prefers-color-scheme: dark) {
  .symbol-chip.xaut { --chip: #e8c96a; }
  .symbol-chip.ltc { --chip: #7fa6e0; }
}

/* -- Verdict badge (reused from the app's own palette) ----------------------- */
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.badge-buy { background: var(--green-bg); color: var(--green-strong); }
.badge-wait { background: var(--amber-bg); color: var(--amber); }
.badge-avoid { background: var(--red-bg); color: var(--red); }
.badge-neutral { background: var(--accent-bg); color: var(--accent); }

@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .section-head h2 { font-size: 24px; }
}
