/* nearswaps brand tokens: the landing page's (index.html) tokens and fonts, as CSS variables.
   Every page stylesheet uses these; page-local names (--bg, --surface, --accent...) are aliases of them.
   Rules (spec part B 6): one ground, one accent (mint for money and the primary action; red only for
   sells, stops and impact above 3%), hairlines not gradients, JetBrains Mono tabular for every number,
   44 px touch targets, phone-first at 390 px. */
:root{
  /* colour */
  --ns-ground:#060708;          /* page */
  --ns-card:#0A0B0D;            /* cards, panels */
  --ns-raise:#0C0D10;           /* inputs, pressed rows: one step above card */
  --ns-raise-2:#121418;         /* hover on a raised row */
  --ns-raise-3:#181A1F;         /* the highest step: menus, tooltips */
  --ns-ink:#F2F2F0;             /* headings, primary text */
  --ns-body:#9A9FA8;            /* body text */
  --ns-muted:#7D828B;           /* labels, captions (5:1 on every surface; was #6E737C, 4.2:1, audit 5.7) */
  --ns-mint:#01FAC0;            /* money, the primary action, positive change */
  --ns-mint-ink:#060708;        /* text on mint */
  --ns-red:#FF5C5C;             /* sells, stops, impact above 3% */
  --ns-amber:#E8B04B;           /* warnings that are not a sell (rare) */
  --ns-line:rgba(255,255,255,0.07);       /* hairline */
  --ns-line-strong:rgba(255,255,255,0.14);
  --ns-mint-soft:rgba(1,250,192,0.10);    /* mint wash behind a selected chip */
  --ns-red-soft:rgba(255,92,92,0.10);
  /* the same colours as r g b triples, for washes: rgb(var(--ns-fg-rgb) / 0.06) is a white tint on dark, an ink tint on light */
  --ns-fg-rgb:255 255 255;
  --ns-ink-rgb:242 242 240;
  --ns-ground-rgb:6 7 8;
  --ns-mint-rgb:1 250 192;
  --ns-red-rgb:255 92 92;
  --ns-shadow:rgba(0,0,0,0.45);

  /* type */
  --ns-font:'Manrope',system-ui,-apple-system,'Segoe UI',sans-serif;
  --ns-mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --ns-fs-2xs:11px;   /* eyebrow, tags (mono, uppercase) */
  --ns-fs-xs:12px;    /* captions */
  --ns-fs-sm:13px;    /* dense tables */
  --ns-fs-md:15px;    /* body */
  --ns-fs-lg:17px;    /* lead */
  --ns-fs-xl:22px;    /* card titles, big numbers */
  --ns-fs-2xl:clamp(26px,4vw,34px);   /* page titles */
  --ns-fs-3xl:clamp(34px,5.4vw,52px); /* hero */
  --ns-lh:1.55;
  --ns-track-tight:-0.035em;
  --ns-track-caps:0.2em;

  /* shape and space */
  --ns-r-sm:10px; --ns-r-md:16px; --ns-r-lg:24px; --ns-r-pill:999px;
  --ns-touch:44px;
  --ns-gutter:16px;
  --ns-header-h:64px;
  --ns-tabbar-h:60px;

  /* motion (assets/motion.css owns the transitions; these are the shared values) */
  --ns-ease:cubic-bezier(0.2,0.8,0.2,1);
  --ns-t-touch:120ms; --ns-t-panel:240ms; --ns-t-page:360ms;

  color-scheme:dark;
}
/* Light mode (opt-in from the header toggle, assets/theme.js; dark stays the default). Same rules, light ground:
   mint deepens to a teal that reads as text on white (5:1), so buttons on mint take white text. */
:root[data-theme="light"]{
  --ns-ground:#F6F7F8;
  --ns-card:#FFFFFF;
  --ns-raise:#F1F3F5;
  --ns-raise-2:#E9ECEF;
  --ns-raise-3:#FFFFFF;
  --ns-ink:#0E1114;
  --ns-body:#4A5059;
  --ns-muted:#5F656E;
  --ns-mint:#007A5A;
  --ns-mint-ink:#FFFFFF;
  --ns-red:#C93636;
  --ns-amber:#9A6700;
  --ns-line:rgba(14,17,20,0.09);
  --ns-line-strong:rgba(14,17,20,0.17);
  --ns-mint-soft:rgba(0,122,90,0.10);
  --ns-red-soft:rgba(201,54,54,0.09);
  --ns-fg-rgb:14 17 20;
  --ns-ink-rgb:14 17 20;
  --ns-ground-rgb:246 247 248;
  --ns-mint-rgb:0 122 90;
  --ns-red-rgb:201 54 54;
  --ns-shadow:rgba(14,17,20,0.12);
  color-scheme:light;
}
:root[data-theme="light"] ::selection{background:rgba(0,122,90,0.18);}

/* The light / dark toggle in the header (assets/theme.js). */
.ns-theme{flex:none;display:inline-flex;align-items:center;justify-content:center;width:var(--ns-touch);height:var(--ns-touch);margin-left:auto;padding:0;border:1px solid var(--ns-line-strong);border-radius:var(--ns-r-pill);background:transparent;color:var(--ns-body);cursor:pointer;transition:color var(--ns-t-touch) var(--ns-ease),border-color var(--ns-t-touch) var(--ns-ease);}
.ns-theme:hover{color:var(--ns-ink);border-color:var(--ns-ink);}
.ns-theme .i-moon{display:none;}
:root[data-theme="light"] .ns-theme .i-sun{display:none;}
:root[data-theme="light"] .ns-theme .i-moon{display:block;}
.topbar[data-ns-header] > .ns-theme ~ .nw{margin-left:0;}
.topbar[data-ns-header] > .search ~ .ns-theme{margin-left:0;}
@media (prefers-reduced-motion:reduce){.ns-theme{transition:none;}}
html{-webkit-text-size-adjust:100%;scrollbar-gutter:stable;}   /* the scrollbar's space is kept from the first paint, so a page that grows taller never re-centres sideways (desktop layout shift up to 1.0, speed report F1) */
body{background:var(--ns-ground);color:var(--ns-ink);font-family:var(--ns-font);-webkit-font-smoothing:antialiased;}
/* Numbers: mono, tabular. Pages add .num (or data-num) to any element that shows a figure. */
.num,[data-num],.mono{font-family:var(--ns-mono);font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;}
:focus-visible{outline:2px solid var(--ns-mint);outline-offset:2px;}
::selection{background:rgba(1,250,192,0.25);}
