/* Design tokens — copied verbatim from the SRC Platform design system
   handoff (design_handoff_src_platform_design_system/tokens/).
   The handoff is the source of truth for every value here. */

:root {
  /* --- surfaces: warm paper, never pure grey --- */
  --paper-canvas: #efece6;   /* oklch(.93 .008 84) — the desk the app sits on */
  --paper-recessed: #f7f5f1; /* table headers, footnote strips, inset panels */
  --paper-app: #fbfaf8;      /* the working area inside a screen */
  --surface: #ffffff;        /* cards, rows, anything holding a value */

  /* --- ink --- */
  --ink: #34302b;            /* oklch(.29 .008 66) — primary text, and the rail */
  --ink-strong: #1f1c19;
  --ink-2: #4a453e;          /* body prose */
  --ink-3: rgba(52, 48, 43, .62);  /* secondary / supporting */
  --ink-4: rgba(52, 48, 43, .45);  /* micro-labels, mono captions */
  --ink-5: rgba(52, 48, 43, .3);   /* disabled, empty-state marks */
  --ink-on-dark: #ffffff;
  --ink-on-dark-2: rgba(255, 255, 255, .6);
  --ink-on-dark-3: rgba(255, 255, 255, .45);

  /* --- lines --- */
  --hairline: rgba(0, 0, 0, .09);
  --hairline-soft: rgba(0, 0, 0, .05);
  --hairline-strong: rgba(0, 0, 0, .16);
  --hairline-on-dark: rgba(255, 255, 255, .12);

  /* --- the one action accent --- */
  --accent: #3f6ea8;              /* oklch(.53 .09 254) steel */
  --accent-ink: #2c527f;
  --accent-wash: rgba(63, 110, 168, .09);
  --accent-wash-strong: rgba(63, 110, 168, .13);
  --accent-line: rgba(63, 110, 168, .3);

  /* --- semantic: verified. green means somebody checked the source --- */
  --verified: #2f8264;            /* oklch(.53 .08 162) */
  --verified-ink: #256a52;
  --verified-wash: rgba(47, 130, 100, .12);
  --verified-line: rgba(47, 130, 100, .35);
  --verified-on-dark: #5fae8e;

  /* --- semantic: disputed. rust means two sources disagree, or a refusal --- */
  --dispute: #a8532c;             /* oklch(.53 .11 47) */
  --dispute-ink: #8a5424;
  --dispute-wash: rgba(168, 83, 44, .13);
  --dispute-line: rgba(168, 83, 44, .28);
  --dispute-surface: #fdf8f5;
  --dispute-on-dark: #d08a5c;

  /* --- enforced provenance banners. Never restyled, never dismissed. --- */
  --banner-synthetic-bg: #f3ead9;
  --banner-synthetic-ink: #8a5424;
  --banner-synthetic-line: rgba(168, 83, 44, .2);
  --banner-demo-bg: #f7e9e9;
  --banner-demo-ink: #8f3236;
  --banner-demo-line: rgba(168, 44, 44, .2);

  /* --- navigation rail --- */
  --rail-bg: #34302b;
  --rail-active-mark: #e8dfd2;
  --rail-active-bg: rgba(255, 255, 255, .09);

  /* --- provenance edge bar, by status --- */
  --prov-verified: var(--verified);
  --prov-reported: rgba(47, 130, 100, .35);
  --prov-conflicting: var(--dispute);
  --prov-unknown: repeating-linear-gradient(180deg, rgba(52,48,43,.28) 0 3px, transparent 3px 6px);
  --prov-dot-empty: rgba(52, 48, 43, .15);
}
:root {
  --font-ui: "IBM Plex Sans", system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  /* Sizes are literal, not snapped to a grid: the density of a records
     system comes from half-pixel steps in the 10–14px band. */
  --fs-micro: 10px;        /* mono section labels, uppercase, tracked */
  --fs-caption: 10.5px;
  --fs-meta: 11px;         /* timestamps, source lines */
  --fs-meta-lg: 11.5px;
  --fs-body: 12.5px;       /* the workhorse */
  --fs-row: 13px;          /* table rows, field values */
  --fs-row-lg: 13.5px;
  --fs-item: 14px;
  --fs-item-lg: 14.5px;    /* queue-card titles */
  --fs-subhead: 17px;
  --fs-name: 19px;
  --fs-record: 22px;       /* a person's or document's name */
  --fs-screen: 25px;
  --fs-screen-lg: 27px;
  --fs-figure: 38px;       /* the one number a screen is about */
  --fs-figure-lg: 46px;

  --lh-tight: 1.2;
  --lh-snug: 1.45;
  --lh-body: 1.6;
  --lh-prose: 1.85;
  --lh-ar-body: 1.75;     /* Arabic needs more leading than Latin */
  --lh-ar-prose: 1.95;

  --tracking-micro: .09em;  /* uppercase mono labels only */
  --tracking-mono: .06em;
  --tracking-display: -.015em;

  /* semantic aliases */
  --text-label-micro: var(--fw-medium) var(--fs-micro) / 1 var(--font-mono);
  --text-body: var(--fw-regular) var(--fs-body) / var(--lh-body) var(--font-ui);
  --text-value-mono: var(--fw-medium) var(--fs-row) / 1.3 var(--font-mono);
  --text-id: var(--fw-medium) var(--fs-meta-lg) / 1.3 var(--font-mono);
  --text-screen-title: var(--fw-regular) var(--fs-screen) / 1 var(--font-ui);
  --text-figure: var(--fw-regular) var(--fs-figure) / 1 var(--font-mono);
}
:root {
  --s-1: 4px;
  --s-2: 6px;
  --s-3: 8px;
  --s-4: 10px;
  --s-5: 12px;
  --s-6: 14px;
  --s-7: 16px;
  --s-8: 18px;
  --s-9: 20px;
  --s-10: 22px;
  --s-11: 26px;
  --s-12: 30px;
  --s-13: 34px;
  --s-14: 44px;

  /* recurring measurements, named because they repeat everywhere */
  --row-pad-y: 12px;
  --row-pad-x: 18px;
  --card-pad: 15px 18px;
  --screen-pad: 22px 28px;
  --rail-w: 198px;
  --rail-w-narrow: 186px;
  --prov-edge-w: 4px;      /* the provenance bar. never thicker. */
  --prov-dot: 5px;
  --prov-dot-gap: 3.5px;
  --banner-pad: 7px 26px;
}
:root {
  --r-xs: 3px;    /* pills, chips, status badges */
  --r-sm: 4px;    /* buttons, inputs, inner panels */
  --r-md: 5px;    /* cards and rows */
  --r-lg: 7px;    /* the outermost frame */

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-raised: 0 1px 3px rgba(0, 0, 0, .05);
  /* No third elevation exists. Nothing in this system floats. */

  --border-hairline: 1px solid var(--hairline);
  --border-soft: 1px solid var(--hairline-soft);
  --border-strong: 1px solid var(--hairline-strong);

  --focus-ring: 0 0 0 2px var(--accent-wash-strong), 0 0 0 1px var(--accent);

  --dur-fast: 90ms;
  --dur: 140ms;
  --ease: cubic-bezier(.2, 0, .2, 1);
  /* Motion is functional only: state changes, never entrances. */
}
