/* BidStar design tokens: the one source for color, type, radius, spacing and motion.
   Palette "Flagging": asphalt, concrete, survey pink. Every text pair below is checked against WCAG AA.
   Light on :root, dark by system setting or [data-theme="dark"]; [data-theme="light"] forces light. */

/* Overpass renders the middle dot U+00B7 with no space after it (seen in the Google Fonts build and in Red Hat's own woff2), so "a · b" collapses.
   This face borrows only that one character from a system font. Keep it first in --bs-font. */
@font-face { font-family: "BS Middot"; src: local("Arial"), local("Helvetica"), local("Roboto"), local("DejaVu Sans"); unicode-range: U+00B7; }

:root {
  color-scheme: light;

  /* Brand constants (same in both themes) */
  --bs-asphalt: #17191B;
  --bs-concrete: #EDEFED;
  --bs-white: #FFFFFF;
  --bs-pink: #FF4589;          /* the flag: mark, fills, focus on dark. Never text on light (3.3:1 on white). */

  /* Surfaces and text */
  --bs-bg: #EDEFED;            /* page */
  --bs-surface: #FFFFFF;       /* cards, sheets */
  --bs-sunken: #E4E7E5;        /* trade tags, inputs at rest */
  --bs-ink: #17191B;           /* 17.6:1 on surface */
  --bs-muted: #565D61;         /* 6.7:1 on surface, 5.8:1 on bg */
  --bs-line: #D3D8D5;
  --bs-bar: #17191B;           /* app bar, icon tile */
  --bs-on-bar: #FFFFFF;

  /* Action: pink is for the mark and the one primary action per view */
  --bs-accent: #C21858;        /* links, primary button fill. 5.9:1 on white, 5.1:1 on bg */
  --bs-on-accent: #FFFFFF;     /* 5.9:1 on accent */
  --bs-focus: #C21858;

  /* Deadline and status. Color is never the only signal: each state has its own words and shape. */
  --bs-open-ink: #17693B;   --bs-open-bg: #E1F2E6;                                 /* 5.8:1 */
  --bs-soon-ink: #7A4A00;   --bs-soon-bg: #FFEFCC;   --bs-soon-line: #E3A21A;      /* 6.6:1. Amber is the clock only. */
  --bs-today-ink: #A01E14;  --bs-today-bg: #FDE2DE;  --bs-today-line: #D9412E;     /* 6.4:1 */
  --bs-closed-ink: #5B636B; --bs-closed-bg: #ECEEF0;                               /* 5.3:1 */
  --bs-lead-ink: #4B36A6;   --bs-lead-line: #8F7EE0;                               /* 8.8:1, dashed border */
  --bs-review-ink: #5B636B; --bs-review-line: #9AA2AA;                             /* 6.1:1, dotted border */

  /* Type: Overpass (Highway Gothic lineage) and Overpass Mono for every date, time and bid number */
  --bs-font: "BS Middot", "Overpass", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-mono: "Overpass Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --bs-text-xs: 0.75rem;    /* 12  labels, eyebrows (700, uppercase, +0.08em) */
  --bs-text-sm: 0.875rem;   /* 14  meta, chips */
  --bs-text-md: 1rem;       /* 16  body */
  --bs-text-lg: 1.125rem;   /* 18  card titles (800) */
  --bs-text-xl: 1.375rem;   /* 22  screen titles (800) */
  --bs-text-2xl: 2rem;      /* 32  display (900, -0.03em) */
  --bs-text-3xl: 3rem;      /* 48  marketing display (900, -0.035em) */
  --bs-leading: 1.5;
  --bs-leading-tight: 1.15;
  --bs-wordmark-tracking: -0.03em;   /* -0.01em below 20 px */

  /* Shape and space (4 px steps) */
  --bs-r-sm: 6px;       /* chips, tags */
  --bs-r-md: 10px;      /* cards, buttons, inputs */
  --bs-r-lg: 16px;      /* sheets */
  --bs-r-pill: 999px;   /* filter chips only */
  --bs-r-icon: 22.5%;   /* app icon tile */
  --bs-s1: 4px; --bs-s2: 8px; --bs-s3: 12px; --bs-s4: 16px; --bs-s5: 24px; --bs-s6: 32px; --bs-s7: 48px;
  --bs-gutter: 16px;
  --bs-tap: 44px;       /* minimum touch target */

  /* Motion: a closed-form spring (damping 0.75, 2.8% overshoot) sampled into linear().
     Browsers without linear() fall back to their default ease, which is fine.
     Swaps: fade from 35% with a 4 px blur. No bounce, no glow. */
  --bs-spring: linear(0, .052, .174, .325, .478, .619, .738, .833, .905, .957, .991, 1.012, 1.024, 1.028, 1.028, 1.025, 1.021, 1.017, 1.013, 1.009, 1.006, 1.004, 1.002, 1.001, 1);
  --bs-ease-out: cubic-bezier(.22, .7, .2, 1);
  --bs-dur-fast: 160ms;   /* swaps, press */
  --bs-dur: 320ms;        /* chips, toggles */
  --bs-dur-slow: 640ms;   /* arrivals, logo */
  --bs-swap-blur: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bs-bg: #111314; --bs-surface: #1B1E20; --bs-sunken: #232729; --bs-ink: #ECEEEE; --bs-muted: #A3AAAD; --bs-line: #2E3336;
    --bs-bar: #1B1E20; --bs-on-bar: #FFFFFF;
    --bs-accent: #FF6FA3; --bs-on-accent: #17191B; --bs-focus: #FF6FA3;   /* 6.4:1 on surface; asphalt on accent 6.8:1 */
    --bs-open-ink: #86D9A6;   --bs-open-bg: #10301E;
    --bs-soon-ink: #FFC45C;   --bs-soon-bg: #36270A;   --bs-soon-line: #B07A12;
    --bs-today-ink: #FF8F80;  --bs-today-bg: #3E1512;  --bs-today-line: #B0392B;
    --bs-closed-ink: #9CA4AC; --bs-closed-bg: #22272B;
    --bs-lead-ink: #BDB0FF;   --bs-lead-line: #7466C9;
    --bs-review-ink: #A7AFB6; --bs-review-line: #5E666D;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bs-bg: #111314; --bs-surface: #1B1E20; --bs-sunken: #232729; --bs-ink: #ECEEEE; --bs-muted: #A3AAAD; --bs-line: #2E3336;
  --bs-bar: #1B1E20; --bs-on-bar: #FFFFFF;
  --bs-accent: #FF6FA3; --bs-on-accent: #17191B; --bs-focus: #FF6FA3;
  --bs-open-ink: #86D9A6;   --bs-open-bg: #10301E;
  --bs-soon-ink: #FFC45C;   --bs-soon-bg: #36270A;   --bs-soon-line: #B07A12;
  --bs-today-ink: #FF8F80;  --bs-today-bg: #3E1512;  --bs-today-line: #B0392B;
  --bs-closed-ink: #9CA4AC; --bs-closed-bg: #22272B;
  --bs-lead-ink: #BDB0FF;   --bs-lead-line: #7466C9;
  --bs-review-ink: #A7AFB6; --bs-review-line: #5E666D;
}

@media (prefers-reduced-motion: reduce) {
  :root { --bs-dur-fast: 0ms; --bs-dur: 0ms; --bs-dur-slow: 0ms; --bs-swap-blur: 0px; }
}
