/* ==========================================================================
   نبض بازار — Design Tokens  (assets/nabz-tokens.css)
   One source of truth for colour, type, radius and elevation across the site.
   Light values live on :root; «شب نبض» swaps the same names under
   html[data-theme="dark"], so a component written with var(--nb-*) needs no
   separate dark rule.

   Breakpoints (media queries cannot read custom properties):
     phone  ≤ 640px   ·   tablet/mobile ≤ 768px (desktop from 769px)   ·   wide ≥ 1024px
   ========================================================================== */

/* The site used two spellings for the same face; only the spaced one was ever
   declared, so the hyphenated one silently fell back to the system font. */
@font-face{font-family:'Vazirmatn-FD-NL';src:url(/assets/fonts/Vazirmatn-FD-NL-Regular.woff2) format('woff2');font-weight:100 450;font-display:swap}
@font-face{font-family:'Vazirmatn-FD-NL';src:url(/assets/fonts/Vazirmatn-FD-NL-Medium.woff2) format('woff2');font-weight:451 550;font-display:swap}
@font-face{font-family:'Vazirmatn-FD-NL';src:url(/assets/fonts/Vazirmatn-FD-NL-SemiBold.woff2) format('woff2');font-weight:551 650;font-display:swap}
@font-face{font-family:'Vazirmatn-FD-NL';src:url(/assets/fonts/Vazirmatn-FD-NL-Bold.woff2) format('woff2');font-weight:651 750;font-display:swap}
@font-face{font-family:'Vazirmatn-FD-NL';src:url(/assets/fonts/Vazirmatn-FD-NL-ExtraBold.woff2) format('woff2');font-weight:751 850;font-display:swap}
@font-face{font-family:'Vazirmatn-FD-NL';src:url(/assets/fonts/Vazirmatn-FD-NL-Black.woff2) format('woff2');font-weight:851 1000;font-display:swap}
@font-face{font-family:'Vazirmatn FD NL';src:url(/assets/fonts/Vazirmatn-FD-NL-Regular.woff2) format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'Vazirmatn FD NL';src:url(/assets/fonts/Vazirmatn-FD-NL-Medium.woff2) format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:'Vazirmatn FD NL';src:url(/assets/fonts/Vazirmatn-FD-NL-SemiBold.woff2) format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:'Vazirmatn FD NL';src:url(/assets/fonts/Vazirmatn-FD-NL-Bold.woff2) format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:'Vazirmatn FD NL';src:url(/assets/fonts/Vazirmatn-FD-NL-ExtraBold.woff2) format('woff2');font-weight:800;font-display:swap}
@font-face{font-family:'Vazirmatn FD NL';src:url(/assets/fonts/Vazirmatn-FD-NL-Black.woff2) format('woff2');font-weight:900;font-display:swap}

:root{
  --nb-hair-2: rgba(19,37,71,.0937);
  /* ---- type ---- */
  --nb-font:'Vazirmatn FD NL','Vazirmatn',Tahoma,sans-serif;
  --nb-font-latin:'Manrope','Vazirmatn FD NL','Vazirmatn',Tahoma,sans-serif;
  --nb-font-public:'Vazirmatn',Tahoma,sans-serif;   /* marketing & content pages */
  --nb-font-mono:ui-monospace,'Cascadia Mono',Consolas,monospace;
  --nb-fs-3xs:10px;  /* legal fine print, tiny badges */
  --nb-fs-2xs:11px;  /* meta, captions */
  --nb-fs-xs:12px;   /* chips, table meta */
  --nb-fs-sm:13px;   /* secondary text, buttons */
  --nb-fs-md:14px;   /* body in dense UI */
  --nb-fs-base:16px; /* reading text */
  --nb-fs-lg:18px;   /* card titles */
  --nb-fs-xl:22px;   /* section titles */
  --nb-fs-2xl:28px;  /* page titles */
  --nb-fs-3xl:36px;  /* hero */

  /* ---- shape ---- */
  --nb-r-xs:6px;     /* tags, small inputs */
  --nb-r-sm:10px;    /* buttons, inputs, chips */
  --nb-r-md:14px;    /* cards */
  --nb-r-lg:20px;    /* panels, modals, hero cards */
  --nb-r-pill:999px;

  /* ---- brand ---- */
  --nb-brand:#001E80;        /* navy — logo, primary solid buttons, key headings */
  --nb-brand-ink:#00135A;    /* hover / pressed */
  --nb-brand-soft:#EAEEFE;   /* tinted surfaces, selected rows */
  --nb-accent:#2563EB;       /* links, focus, active tab, interactive highlight */
  --nb-accent-ink:#1D4ED8;
  --nb-accent-soft:#EFF4FF;
  --nb-accent-fill:#2563EB;  /* solid accent buttons (white text) */
  --nb-heading:#001E80;      /* display headings: navy by day, near-white by night */
  --nb-on-brand:#FFFFFF;     /* text on brand / accent fills */
  --nb-grad-brand:linear-gradient(135deg,#001E80 0%,#2F5BFF 100%);

  /* ---- neutrals ---- */
  --nb-bg:#F3F5FA;
  --nb-surface:#FFFFFF;
  --nb-surface-2:#F7F9FD;
  --nb-surface-3:#EEF2F8;
  --nb-line:#E3E8F1;
  --nb-line-2:#CFD8E6;
  --nb-ink:#0F172A;
  --nb-ink-2:#334155;
  --nb-muted:#64748B;
  --nb-muted-2:#94A3B8;

  /* ---- semantic ---- */
  --nb-pos:#15803D;  --nb-pos-soft:#ECFDF3;  --nb-pos-line:#BBF7D0;
  --nb-neg:#DC2626;  --nb-neg-soft:#FEF2F2;  --nb-neg-line:#FECACA;
  --nb-warn:#B45309; --nb-warn-soft:#FFFBEB; --nb-warn-line:#FDE68A;
  --nb-info:#0369A1; --nb-info-soft:#F0F9FF; --nb-info-line:#BAE6FD;

  /* ---- tool identities (secondary colours, one per tool) ---- */
  --nb-basket:#D93B41;  --nb-basket-ink:#B42A30;  --nb-basket-soft:#FFF0F0;  /* تحلیل سبد — soft red (not Digikala's #EF394E) */
  --nb-basket-fill:#D93B41;
  --nb-intel:#F5C451;   --nb-intel-ink:#A16207;   --nb-intel-soft:#FFF8E1;   /* هوش بازار — gold fill, dark-gold text */
  --nb-lists:#7C3AED;   --nb-lists-ink:#6D28D9;   --nb-lists-soft:#F5F0FF;   /* لیست و سبد بازار — purple */

  /* ---- elevation ---- */
  --nb-shadow-sm:0 1px 2px rgba(15,23,42,.06),0 1px 3px rgba(15,23,42,.05);
  --nb-shadow-md:0 4px 14px rgba(15,23,42,.08);
  --nb-shadow-lg:0 18px 50px -12px rgba(15,23,42,.22);
  --nb-focus:0 0 0 3px rgba(37,99,235,.28);

  /* legacy aliases used by the guided tour */
  --nt-accent:var(--nb-brand);
  --nt-accent-ink:var(--nb-accent);
  --nt-accent-soft:var(--nb-accent-soft);
  --nt-radius:var(--nb-r-lg);
}

html[data-theme="dark"]{
  color-scheme:dark;
  --nb-brand:#3B6AF0;
  --nb-brand-ink:#4D7CFF;
  --nb-brand-soft:#1D2A45;
  --nb-accent:#8FC0FC;
  --nb-accent-ink:#B9D8FE;
  --nb-accent-soft:#1D2A45;
  --nb-accent-fill:#3B6AF0;
  --nb-heading:#EAF0FA;
  --nb-on-brand:#FFFFFF;
  --nb-grad-brand:linear-gradient(135deg,#2F5BFF 0%,#3B6AF0 100%);

  --nb-bg:#0B1220;
  --nb-surface:#121D33;
  --nb-surface-2:#1D2A45;
  --nb-surface-3:#24324F;
  --nb-line:rgba(148,163,184,.16);
  --nb-line-2:rgba(148,163,184,.28);
  --nb-ink:#EAF0FA;
  --nb-ink-2:#C6D0E2;
  --nb-muted:#8C99B3;
  --nb-muted-2:#64718C;

  --nb-pos:#4ADE9C;  --nb-pos-soft:rgba(74,222,156,.12);  --nb-pos-line:rgba(74,222,156,.32);
  --nb-neg:#FB8C8C;  --nb-neg-soft:rgba(251,140,140,.12); --nb-neg-line:rgba(251,140,140,.32);
  --nb-warn:#F5B95C; --nb-warn-soft:rgba(245,185,92,.12); --nb-warn-line:rgba(245,185,92,.32);
  --nb-info:#7DD3FC; --nb-info-soft:rgba(125,211,252,.12);--nb-info-line:rgba(125,211,252,.32);

  --nb-basket:#FF8589;  --nb-basket-ink:#FFA3A6;  --nb-basket-soft:rgba(255,133,137,.12);
  --nb-basket-fill:#D93B41;
  --nb-intel:#F5C451;   --nb-intel-ink:#F5C451;   --nb-intel-soft:rgba(245,196,81,.12);
  --nb-lists:#B4A6FC;   --nb-lists-ink:#C9BFFD;   --nb-lists-soft:rgba(180,166,252,.12);

  --nb-shadow-sm:0 1px 2px rgba(0,0,0,.35);
  --nb-shadow-md:0 4px 14px rgba(0,0,0,.35);
  --nb-shadow-lg:0 18px 50px -12px rgba(0,0,0,.62);
  --nb-focus:0 0 0 3px rgba(143,192,252,.35);
}

/* Header logos that only ship the day artwork: swap in the night artwork.
   (Pages with explicit .nabz-logo-day / .nabz-logo-night pairs keep their own switch.) */
html[data-theme="dark"] img[src*="nabzlogoheader-compact"]:not(.nabz-logo-day),
html[data-theme="dark"] img[src*="nabzlogoheader.png"]:not(.nabz-logo-day){content:url(/nabzlogoheader-light-compact.png?v=20260818)}

/* Data colours passed inline as --c / --gc are tuned for white paper;
   lift them to their night twins so badges and labels stay readable. */
html[data-theme="dark"] [style*="--c:#7c3aed" i]{--c:#B4A6FC!important}
html[data-theme="dark"] [style*="--gc:#7c3aed" i]{--gc:#B4A6FC!important}
html[data-theme="dark"] [style*="--c:#dc2626" i]{--c:#FB8C8C!important}
html[data-theme="dark"] [style*="--gc:#dc2626" i]{--gc:#FB8C8C!important}
html[data-theme="dark"] [style*="--c:#15803d" i]{--c:#4ADE9C!important}
html[data-theme="dark"] [style*="--gc:#15803d" i]{--gc:#4ADE9C!important}
html[data-theme="dark"] [style*="--c:#0b7a45" i]{--c:#4ADE9C!important}
html[data-theme="dark"] [style*="--gc:#0b7a45" i]{--gc:#4ADE9C!important}
html[data-theme="dark"] [style*="--c:#0d9488" i]{--c:#5FD9C6!important}
html[data-theme="dark"] [style*="--gc:#0d9488" i]{--gc:#5FD9C6!important}
html[data-theme="dark"] [style*="--c:#2563eb" i]{--c:#8FC0FC!important}
html[data-theme="dark"] [style*="--gc:#2563eb" i]{--gc:#8FC0FC!important}
html[data-theme="dark"] [style*="--c:#b45309" i]{--c:#F5B95C!important}
html[data-theme="dark"] [style*="--gc:#b45309" i]{--gc:#F5B95C!important}
html[data-theme="dark"] [style*="--c:#a16207" i]{--c:#F5B95C!important}
html[data-theme="dark"] [style*="--gc:#a16207" i]{--gc:#F5B95C!important}
html[data-theme="dark"] [style*="--c:#0369a1" i]{--c:#7DD3FC!important}
html[data-theme="dark"] [style*="--gc:#0369a1" i]{--gc:#7DD3FC!important}
html[data-theme="dark"] [style*="--c:#c2410c" i]{--c:#FDBA74!important}
html[data-theme="dark"] [style*="--gc:#c2410c" i]{--gc:#FDBA74!important}
html[data-theme="dark"] [style*="--c:#ef394e" i]{--c:#FF8589!important}
html[data-theme="dark"] [style*="--gc:#ef394e" i]{--gc:#FF8589!important}
html[data-theme="dark"] [style*="--c:#64748b" i]{--c:#8C99B3!important}
html[data-theme="dark"] [style*="--gc:#64748b" i]{--gc:#8C99B3!important}
