/* tokens/colors.css */
/* ============================================================
   Supplied — Color tokens
   Base scales are brand-neutral OKLCH ramps built from the two
   colors in the Supplied mark: deep teal-green and warm gold,
   plus a true-black/white neutral pair used in the wordmark.
   Semantic aliases below map these to shadcn/ui's variable
   convention (--background, --primary, --border, --ring, …) so
   components drop straight into the shadcn theming contract.
   ============================================================ */

:root {
  /* ---- Primary: Supplied teal-green (from logo swirl, #00795E) ---- */
  --teal-50:  oklch(0.97 0.02 165);
  --teal-100: oklch(0.93 0.05 165);
  --teal-200: oklch(0.86 0.08 165);
  --teal-300: oklch(0.76 0.10 165);
  --teal-400: oklch(0.64 0.11 165);
  --teal-500: oklch(0.52 0.11 165);   /* ≈ #00795E brand teal */
  --teal-600: oklch(0.45 0.10 165);
  --teal-700: oklch(0.38 0.09 165);
  --teal-800: oklch(0.30 0.07 165);
  --teal-900: oklch(0.23 0.05 165);
  --teal-950: oklch(0.16 0.035 165);

  /* ---- Accent: Supplied gold (logo dot, #D6A700) — sparing use ---- */
  --gold-50:  oklch(0.97 0.03 90);
  --gold-100: oklch(0.93 0.06 90);
  --gold-200: oklch(0.87 0.10 90);
  --gold-300: oklch(0.80 0.13 90);
  --gold-400: oklch(0.74 0.14 88);
  --gold-500: oklch(0.68 0.14 86);   /* ≈ #D6A700 brand gold */
  --gold-600: oklch(0.58 0.13 84);
  --gold-700: oklch(0.47 0.11 82);
  --gold-800: oklch(0.38 0.09 80);
  --gold-900: oklch(0.30 0.07 78);

  /* ---- Neutral: near-black / gray ramp (wordmark is true black) ---- */
  --gray-0:   oklch(1 0 0);
  --gray-50:  oklch(0.985 0.002 247);
  --gray-100: oklch(0.967 0.003 247);
  --gray-200: oklch(0.925 0.004 247);
  --gray-300: oklch(0.86 0.005 247);
  --gray-400: oklch(0.705 0.006 247);
  --gray-500: oklch(0.552 0.006 247);
  --gray-600: oklch(0.44 0.006 247);
  --gray-700: oklch(0.33 0.005 247);
  --gray-800: oklch(0.22 0.004 247);
  --gray-900: oklch(0.14 0.003 247);
  --gray-950: oklch(0.09 0.002 247);
  --gray-1000: oklch(0.06 0 0);       /* wordmark black */

  /* ---- Semantic status colors ---- */
  --red-50:   oklch(0.97 0.02 25);
  --red-500:  oklch(0.58 0.19 25);
  --red-600:  oklch(0.50 0.19 25);
  --red-700:  oklch(0.42 0.18 25);

  /* ---- Blue: observed in the live product for links + info CTAs
     (e.g. "View Usage", company website links) — not derived from the
     logo, flagged here as an additional functional color. ---- */
  --blue-50:  oklch(0.96 0.02 255);
  --blue-100: oklch(0.92 0.04 255);
  --blue-500: oklch(0.55 0.19 260);
  --blue-600: oklch(0.48 0.19 260);
  --blue-700: oklch(0.40 0.18 260);

  /* ---- Report-kind tags: pale category bands on library cards ---- */
  --kind-comparison-bg: oklch(0.93 0.03 290);
  --kind-comparison-fg: oklch(0.34 0.08 290);
  --kind-category-bg: oklch(0.95 0.03 155);
  --kind-category-fg: oklch(0.32 0.07 155);
  --kind-supplier-bg: oklch(0.95 0.04 70);
  --kind-supplier-fg: oklch(0.38 0.08 60);

  /* =========================================================
     Semantic aliases — shadcn/ui theming contract (light mode)
     ========================================================= */
  --background: var(--gray-0);
  --foreground: var(--gray-1000);

  --card: var(--gray-0);
  --card-foreground: var(--gray-1000);

  --popover: var(--gray-0);
  --popover-foreground: var(--gray-1000);

  /* Primary action color in the live product is near-black, not brand
     teal — teal is reserved for the logo mark and progress/success
     indicators. Confirmed against product screenshots (New Task,
     active tab pill, Refine, Create Project are all black). */
  --primary: var(--gray-1000);
  --primary-foreground: var(--gray-0);

  --secondary: var(--gray-100);
  --secondary-foreground: var(--gray-900);

  --muted: var(--gray-100);
  --muted-foreground: var(--gray-500);

  --accent: var(--gold-500);
  --accent-foreground: var(--gray-1000);

  --destructive: var(--red-600);
  --destructive-foreground: var(--gray-0);

  --success: var(--teal-600);
  --success-foreground: var(--gray-0);
  --warning: var(--gold-600);
  --warning-foreground: var(--gray-1000);

  --info: var(--blue-600);
  --info-foreground: var(--gray-0);

  --border: var(--gray-200);
  --input: var(--gray-200);
  --ring: var(--gray-700);

  /* Sidebar / app-shell surface (report app uses a slightly tinted panel) */
  --sidebar: var(--gray-50);
  --sidebar-foreground: var(--gray-800);
  --sidebar-border: var(--gray-200);

  /* Category-risk chart colors (Kraljic matrix / strategic signal dots) */
  --chart-low: var(--teal-500);
  --chart-moderate: var(--gold-500);
  --chart-high: var(--red-500);
}

/* Dark mode — Supplied's report app is light-first; dark provided for
   consuming apps that need it, kept in the same hue family. */
.dark {
  --background: var(--gray-950);
  --foreground: var(--gray-50);
  --card: var(--gray-900);
  --card-foreground: var(--gray-50);
  --popover: var(--gray-900);
  --popover-foreground: var(--gray-50);
  --primary: var(--teal-400);
  --primary-foreground: var(--gray-1000);
  --secondary: var(--gray-800);
  --secondary-foreground: var(--gray-50);
  --muted: var(--gray-800);
  --muted-foreground: var(--gray-400);
  --accent: var(--gold-400);
  --accent-foreground: var(--gray-1000);
  --destructive: var(--red-500);
  --destructive-foreground: var(--gray-50);
  --border: var(--gray-800);
  --input: var(--gray-800);
  --ring: var(--teal-400);
  --sidebar: var(--gray-900);
  --sidebar-foreground: var(--gray-200);
  --sidebar-border: var(--gray-800);
}


/* tokens/typography.css */
/* ============================================================
   Supplied — Typography tokens
   Single family (Inter) across UI and marketing, per brand spec.
   Scale mirrors the report app: dense data tables and small
   labels dominate, so the base size sits at 14px, not 16px.
   ============================================================ */

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale */
  --text-xs:   0.75rem;   /* 12px — table meta, source refs, timestamps */
  --text-sm:   0.8125rem; /* 13px — table cells, secondary labels */
  --text-base: 0.875rem;  /* 14px — default UI body */
  --text-md:   1rem;      /* 16px — card copy, form inputs */
  --text-lg:   1.125rem;  /* 18px — card/section titles */
  --text-xl:   1.375rem;  /* 22px — panel headings */
  --text-2xl:  1.75rem;   /* 28px — page titles */
  --text-3xl:  2.25rem;   /* 36px — report hero numbers */
  --text-4xl:  3rem;      /* 48px — marketing display */

  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --tracking-tight: -0.01em;
  --tracking-normal: 0em;
  --tracking-wide: 0.02em;
}


/* tokens/spacing.css */
/* ============================================================
   Supplied — Spacing, radius, shadow, and motion tokens
   4px base unit, shadcn-style radius chain, soft single-layer
   shadows (no heavy elevation — the report app is flat and calm).
   ============================================================ */

:root {
  /* Spacing (4px base) */
  --space-0: 0px;
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.25rem;  /* 20 */
  --space-6: 1.5rem;   /* 24 */
  --space-8: 2rem;     /* 32 */
  --space-10: 2.5rem;  /* 40 */
  --space-12: 3rem;    /* 48 */
  --space-16: 4rem;    /* 64 */
  --space-20: 5rem;    /* 80 */

  /* Radius — shadcn convention: --radius is the base, rest derive */
  --radius: 0.5rem;         /* 8px — cards, inputs, buttons */
  --radius-sm: calc(var(--radius) - 4px);  /* 4px — badges, tags, chips */
  --radius-md: calc(var(--radius) - 2px);  /* 6px */
  --radius-lg: var(--radius);              /* 8px */
  --radius-xl: 0.75rem;     /* 12px — panels, dialogs */
  --radius-2xl: 1rem;       /* 16px — hero cards */
  --radius-full: 9999px;    /* pills, avatars, dots */

  /* Shadow — flat product UI: one soft ambient shadow, no double-stack */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 12px 24px -6px rgb(0 0 0 / 0.10), 0 4px 8px -4px rgb(0 0 0 / 0.05);
  --shadow-focus-ring: 0 0 0 3px color-mix(in oklch, var(--ring) 35%, transparent);

  /* Motion — quick, purposeful, no bounce/spring */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1); /* @kind other */
  --ease-out: cubic-bezier(0, 0, 0.2, 1); /* @kind other */
  --ease-in: cubic-bezier(0.4, 0, 1, 1); /* @kind other */
  --duration-fast: 120ms; /* @kind other */
  --duration-base: 180ms; /* @kind other */
  --duration-slow: 280ms; /* @kind other */

  /* Layout constants used across the report app */
  --sidebar-width: 15rem;      /* 240px collapsed nav rail + labels */
  --content-max-width: 72rem;  /* 1152px report column */
  --header-height: 3.5rem;     /* 56px */
}


/* base.css */
/* Minimal, honest reset + base element styling. Kept out of styles.css
   itself so styles.css can stay a pure @import manifest. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); }
p { margin: 0; }
button { font-family: inherit; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--teal-700); text-decoration: underline; }

::selection { background: var(--teal-200); color: var(--gray-1000); }

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
}


/* page */

    body{margin:0;background:var(--background);font-variant-numeric:tabular-nums;}
    a{color:var(--foreground);}
    a:hover{color:var(--teal-700);}
    a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--teal-600);outline-offset:2px;}
    @keyframes sxspin{to{transform:rotate(360deg)}}
    @keyframes sxfill{from{width:0}to{width:100%}}
    @keyframes sxin{from{opacity:0}to{opacity:1}}
    @keyframes sxup{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
    @keyframes sxpulse{0%{box-shadow:0 0 0 0 rgb(0 121 94 / .45)}100%{box-shadow:0 0 0 10px rgb(0 121 94 / 0)}}
    .sx-fill{animation-name:sxfill;animation-timing-function:linear;animation-fill-mode:both;}
    .sx-in{animation:sxin 280ms var(--ease-standard) both;}
    .sx-row{animation:sxup 420ms var(--ease-standard) both;}
    .sx-pulse{animation:sxpulse 1.6s ease-out infinite;}
    .sx-cell{transition:background 600ms var(--ease-standard);}
    @media (prefers-reduced-motion: reduce){ .sx-fill,.sx-in,.sx-row,.sx-pulse{animation:none !important;} .sx-fill{width:100%;} .sx-cell{transition:none;} }
    @media (max-width: 860px){ .sx-navlinks{display:none !important;} }
    @media (max-width: 520px){ .sx-navdemo{display:none !important;} }
  


/* static-site extras */
[hidden]{display:none !important;}
html{scroll-behavior:smooth;}
section[id],div[id]{scroll-margin-top:72px;}
a:hover{text-decoration:none;}
:focus-visible{box-shadow:none;}
@media (prefers-reduced-motion: reduce){ html{scroll-behavior:auto;} }

@media (max-width: 760px){ .sx-legal{grid-column:auto !important;} }
details summary::marker{color:var(--teal-600);}
