/* ==========================================================================
   ARTHA NAKSHATRA — DESIGN TOKENS
   Derived from the registered mark: a gold Devanagari "त" over a lotus on
   deep night navy, ringed by a faint star chart, with a classical serif
   wordmark. Night navy is the brand ground; gold is used sparingly, the way
   gilt is used on a ledger: for the mark, the headline figure, and a single
   primary action per view.

   Layout concept: "private ledger under a night sky" — calm porcelain pages,
   one navy wealth plate per screen, data set in tabular figures.
   ========================================================================== */

:root {
  /* ---- Brand primitives (theme-independent) ---- */
  --navy-950: #070b1a;
  --navy-900: #0b1430; /* sampled from the logo ground */
  --navy-850: #0f1a3c;
  --navy-800: #142048;
  --navy-700: #1d2b5a;
  --navy-600: #2b3b70;
  --gold-700: #8a5a1f;
  --gold-600: #ac7530; /* sampled from the lotus */
  --gold-500: #c08a45;
  --gold-400: #d4a65e;
  --gold-300: #e6c48a;
  --gold-200: #f2dfba;
  --star: #f5e7c8;

  /* ---- Semantic surface + ink (light: "Porcelain") ---- */
  --bg: #f4f5f8;
  --bg-sunken: #eceef3;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eef0f5;
  --line: #e1e4ec;
  --line-strong: #c9cedb;
  --ink: #0b1430;
  --ink-2: #444d6a;
  --ink-3: #6f7891;
  --ink-inverse: #f4f1ea;

  --accent: #8a5a1f;          /* gold, darkened for text on porcelain */
  --accent-strong: #ac7530;
  --accent-soft: #f6eddd;
  --accent-line: #e4cfa6;
  --focus: #c08a45;

  /* The wealth plate stays navy in both themes */
  --plate: #0b1430;
  --plate-2: #142048;
  --plate-ink: #f4f1ea;
  --plate-ink-2: #b3b9cf;
  --plate-line: rgba(212, 166, 94, 0.22);
  --plate-gold: #d4a65e;

  /* ---- Semantic status (never used as series colours) ---- */
  --gain: #17714f;
  --gain-soft: #e3f2ea;
  --loss: #b03a30;
  --loss-soft: #f8e6e3;
  --warn: #93600c;
  --warn-soft: #f8eed9;
  --info: #2d55a0;
  --info-soft: #e5ecf8;
  --neutral-soft: #eceef3;

  /* ---- Content-type marks (Research / Education / Advisory / Execution / PMS) ---- */
  --ct-research: #2d55a0;
  --ct-education: #3d6e4f;
  --ct-advisory: #8a5a1f;
  --ct-execution: #5b4d9c;
  --ct-pms: #0b1430;

  /* ---- Chart palette (validated: adjacent CVD ΔE ≥ 8, normal ≥ 15) ---- */
  --s1: #3557b5; --s2: #c98a1e; --s3: #13967f; --s4: #d2562e;
  --s5: #6a4fc2; --s6: #4f8a1f; --s7: #d0668c; --s8: #3f9fd6;
  --grid: #e6e9f0;
  --axis: #8a92a8;

  /* ---- Typography ---- */
  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Type scale — 1.200 minor third from a 15px base, display steps larger */
  --t-2xs: 0.6875rem; /* 11 eyebrow / legal */
  --t-xs: 0.75rem;    /* 12 captions */
  --t-sm: 0.8125rem;  /* 13 secondary */
  --t-md: 0.9375rem;  /* 15 body */
  --t-lg: 1.0625rem;  /* 17 card titles */
  --t-xl: 1.375rem;   /* 22 section titles (display) */
  --t-2xl: 1.75rem;   /* 28 page titles (display) */
  --t-3xl: 2.25rem;   /* 36 key figures (display) */
  --t-4xl: 2.875rem;  /* 46 hero wealth figure (display) */

  /* ---- Spacing — 4px base ---- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;

  /* ---- Shape + elevation ---- */
  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(11, 20, 48, 0.05);
  --shadow-2: 0 8px 28px -12px rgba(11, 20, 48, 0.18);
  --shadow-3: 0 24px 60px -20px rgba(11, 20, 48, 0.35);

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-1: 120ms; --dur-2: 220ms; --dur-3: 420ms;

  /* ---- Layout ---- */
  --sidebar-w: 248px;
  --content-max: 1180px;
  --tabbar-h: 64px;
}

/* ---- Dark: "Night" — the logo's own ground ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b1a; --bg-sunken: #050813; --surface: #0d1534; --surface-2: #111b3e; --surface-3: #16224b;
    --line: #1e2a55; --line-strong: #2c3a6c; --ink: #eceef5; --ink-2: #aab1c8; --ink-3: #7a83a1; --ink-inverse: #0b1430;
    --accent: #d4a65e; --accent-strong: #e0b874; --accent-soft: #241f22; --accent-line: #5a4426; --focus: #e0b874;
    --plate: #101a40; --plate-2: #16234f; --plate-line: rgba(212, 166, 94, 0.26);
    --gain: #4cc79a; --gain-soft: #10302a; --loss: #f07a6e; --loss-soft: #3a1a22; --warn: #e3b05a; --warn-soft: #33281a;
    --info: #8eaaf0; --info-soft: #17244d; --neutral-soft: #16224b;
    --ct-research: #8eaaf0; --ct-education: #7fc79a; --ct-advisory: #d4a65e; --ct-execution: #b3a6f0; --ct-pms: #e6c48a;
    --s1: #4f72d6; --s2: #b98328; --s3: #14957f; --s4: #d45a34; --s5: #8473e0; --s6: #4e8f22; --s7: #c95c86; --s8: #3a8cc0;
    --grid: #1b2650; --axis: #6f7896;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3); --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, 0.6); --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070b1a; --bg-sunken: #050813; --surface: #0d1534; --surface-2: #111b3e; --surface-3: #16224b;
  --line: #1e2a55; --line-strong: #2c3a6c; --ink: #eceef5; --ink-2: #aab1c8; --ink-3: #7a83a1; --ink-inverse: #0b1430;
  --accent: #d4a65e; --accent-strong: #e0b874; --accent-soft: #241f22; --accent-line: #5a4426; --focus: #e0b874;
  --plate: #101a40; --plate-2: #16234f; --plate-line: rgba(212, 166, 94, 0.26);
  --gain: #4cc79a; --gain-soft: #10302a; --loss: #f07a6e; --loss-soft: #3a1a22; --warn: #e3b05a; --warn-soft: #33281a;
  --info: #8eaaf0; --info-soft: #17244d; --neutral-soft: #16224b;
  --ct-research: #8eaaf0; --ct-education: #7fc79a; --ct-advisory: #d4a65e; --ct-execution: #b3a6f0; --ct-pms: #e6c48a;
  --s1: #4f72d6; --s2: #b98328; --s3: #14957f; --s4: #d45a34; --s5: #8473e0; --s6: #4e8f22; --s7: #c95c86; --s8: #3a8cc0;
  --grid: #1b2650; --axis: #6f7896;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3); --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, 0.6); --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}
