/* =====================================================================
   全球资本市场分析站 — Design Tokens & Theme System
   Light / Dark / System themes · Glass morphism · Premium finance aesthetic
   ===================================================================== */

/* ---------- Light theme (default) ---------- */
:root {
  --bg:            #f4f7fc;
  --bg-2:          #ffffff;
  --bg-grad-a:     #eaf1ff;
  --bg-grad-b:     #f6f0ff;
  --bg-grad-c:     #eafff6;

  --surface:         rgba(15, 23, 42, 0.035);
  --surface-strong:  rgba(15, 23, 42, 0.06);
  --surface-solid:   #ffffff;
  --border:          rgba(15, 23, 42, 0.10);
  --border-strong:   rgba(15, 23, 42, 0.16);

  --text:        #0f1b30;
  --text-muted:  #56657f;
  --text-faint:  #8b98ad;

  --accent:        #3b62f0;
  --accent-strong: #2950d8;
  --accent-soft:   rgba(59, 98, 240, 0.10);
  --gold:          #b8862f;
  --emerald:       #059669;
  --rose:          #e11d48;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 2px 8px rgba(15,23,42,.05);
  --shadow-md: 0 8px 30px rgba(15,23,42,.10);
  --shadow-lg: 0 24px 60px rgba(15,23,42,.16);

  --glass-bg:     rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-blur:   22px;

  --ring: rgba(59, 98, 240, 0.35);
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg:            #070b14;
  --bg-2:          #0d1322;
  --bg-grad-a:     #0c1830;
  --bg-grad-b:     #160d2e;
  --bg-grad-c:     #06231d;

  --surface:         rgba(255, 255, 255, 0.04);
  --surface-strong:  rgba(255, 255, 255, 0.07);
  --surface-solid:   #111726;
  --border:          rgba(255, 255, 255, 0.09);
  --border-strong:   rgba(255, 255, 255, 0.16);

  --text:        #eef2fb;
  --text-muted:  #93a0b8;
  --text-faint:  #5e6b85;

  --accent:        #6ea8fe;
  --accent-strong: #4f7cff;
  --accent-soft:   rgba(110, 168, 254, 0.12);
  --gold:          #d9b36b;
  --emerald:       #34d399;
  --rose:          #fb7185;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 10px rgba(0,0,0,.35);
  --shadow-md: 0 10px 34px rgba(0,0,0,.5);
  --shadow-lg: 0 28px 70px rgba(0,0,0,.6);

  --glass-bg:     rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-blur:   24px;

  --ring: rgba(110, 168, 254, 0.45);
}

/* ---------- System: follow OS when no explicit theme ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg:            #070b14;
    --bg-2:          #0d1322;
    --bg-grad-a:     #0c1830;
    --bg-grad-b:     #160d2e;
    --bg-grad-c:     #06231d;
    --surface:         rgba(255, 255, 255, 0.04);
    --surface-strong:  rgba(255, 255, 255, 0.07);
    --surface-solid:   #111726;
    --border:          rgba(255, 255, 255, 0.09);
    --border-strong:   rgba(255, 255, 255, 0.16);
    --text:        #eef2fb;
    --text-muted:  #93a0b8;
    --text-faint:  #5e6b85;
    --accent:        #6ea8fe;
    --accent-strong: #4f7cff;
    --accent-soft:   rgba(110, 168, 254, 0.12);
    --gold:          #d9b36b;
    --emerald:       #34d399;
    --rose:          #fb7185;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 10px rgba(0,0,0,.35);
    --shadow-md: 0 10px 34px rgba(0,0,0,.5);
    --shadow-lg: 0 28px 70px rgba(0,0,0,.6);
    --glass-bg:     rgba(255, 255, 255, 0.045);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-blur:   24px;
    --ring: rgba(110, 168, 254, 0.45);
  }
}

/* ---------- Typography scale ---------- */
:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Newsreader", "Georgia", "Songti SC", "SimSun", serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", Consolas, monospace;

  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.375rem;
  --fs-xl:   1.75rem;
  --fs-2xl:  2.25rem;
  --fs-3xl:  3rem;
  --fs-4xl:  3.75rem;

  --lh-tight: 1.15;
  --lh-snug:  1.35;
  --lh-normal: 1.65;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --space: 1rem;
  --maxw:  1180px;
  --maxw-read: 760px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
}
