/* Single token file. Components must not use raw hex.
 *
 * Palette sampled from uig.com (Aug 2026). See BUILD_CONTEXT.md.
 *   #0D3D14  dark green — primary brand surface
 *   #809C55  olive      — accent
 *   #97B864  light green / #526E2D deep green — logo blocks
 *   #1D2229  slate      — secondary dark surface
 *   #E7E7E7  off-white  — text on dark
 *   #F8F8F8  light grey / #595959 mid grey
 *
 * Chrome carries the brand. The working canvas stays light, because this
 * is a tool with dense tables and issued documents, not a marketing page.
 *
 * Status set is closed: ok / warn / risk / accent. Status colours are kept
 * clearly distinct from the brand greens so "ok" never reads as "brand".
 * Text colour is split from fill colour, so a label on a tint of its own
 * fill still passes on a washed-out projector.
 */
:root {
  /* brand */
  --brand:         #0D3D14;
  --brand-2:       #14501d;
  --brand-deep:    #072A0D;
  --brand-slate:   #1D2229;
  --on-brand:      #E7E7E7;
  --on-brand-dim:  #a9b8a4;

  /* surface */
  --bg:            #F8F8F8;
  --panel:         #ffffff;
  --panel-2:       #fbfbfa;
  --panel-3:       #f2f2ef;
  --line:          #d7d9d4;
  --line-soft:     #E7E7E7;
  --line-strong:   #b9bcb4;

  /* ink */
  --ink:           #1D2229;
  --ink-2:         #3f4650;
  --ink-3:         #595959;
  --ink-invert:    #ffffff;

  /* accent — narrative emphasis only, never decoration */
  --accent:        #526E2D;
  --accent-bright: #809C55;
  --accent-fill:   #eaf0e0;
  --accent-text:   #3c5220;

  /* status: ok */
  --ok:            #1c6b45;
  --ok-fill:       #e2f1e9;
  --ok-text:       #11512f;

  /* status: warn — needs engineering judgement */
  --warn:          #8a5a06;
  --warn-fill:     #fbeed6;
  --warn-text:     #6b4504;

  /* status: risk — does not meet, do not use, irreversible */
  --risk:          #9a2521;
  --risk-fill:     #fae4e2;
  --risk-text:     #7a1c19;
  --risk-wash:     #fdf2f1;

  /* paper — artefacts rendered as issued documents */
  --paper:         #fffefb;
  --paper-line:    #c8c4b8;
  --paper-ink:     #1b1a17;

  /* ---- CAD ----------------------------------------------------------
   * Engineering sheets are drawn, not styled. Ink is near-black on a
   * faintly warm paper. Line weight carries meaning, so the pen ladder
   * is a token set of its own and every drawing uses it.
   */
  --cad-paper:     #fdfdfa;
  --cad-ink:       #14161a;   /* object lines, borders, lettering */
  --cad-thin:      #4a4f55;   /* hidden lines, secondary geometry */
  --cad-dim:       #6d7178;   /* dimension and extension lines */
  --cad-grid:      #d9d7cd;   /* zone ticks, faint construction */
  --cad-hl:        #7a1c19;   /* the tag under discussion, and only that */
  --cad-alt:       #3c5220;   /* the candidate, where two things compare */
  --cad-hatch:     #9a9caa;   /* section fill */

  /* pen ladder, in drawing units. Strokes scale with the sheet. */
  --pen-hair:      0.7;
  --pen-thin:      1.1;
  --pen-med:       1.7;
  --pen-thick:     2.6;
  --pen-heavy:     4;

  /* type — uig.com uses ES Allianz, a licensed face we do not ship.
   * Inter is the substitute: same grotesque family, self-hosted. */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* CAD lettering is single-stroke gothic. Mono is the closest thing we
   * can ship; it is always uppercase and always tracked out. */
  --cad-font: var(--mono);

  /* the site's signature treatment: uppercase, widely tracked, light weight */
  --track-eyebrow: .12em;
  --track-tight:  -.02em;
  --track-num:    -.03em;   /* hero numerals only */

  /* scale — readable when projected */
  --t-xs:   12px;
  --t-sm:   13.5px;
  --t-base: 15px;
  --t-lg:   18px;
  --t-xl:   22px;
  --t-2xl:  27px;
  /* display — for the three or four numbers that carry the argument.
   * Nothing else may use these. */
  --t-3xl:  34px;
  --t-4xl:  46px;
  --t-hero: 62px;

  /* space */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px;

  --radius: 4px;
  --radius-lg: 6px;

  /* ---- elevation ladder ----------------------------------------------
   * Three steps, and they mean something. 0 = supporting, recedes.
   * 1 = an ordinary card. 2 = the one object on the screen that carries
   * the point. If everything is raised, nothing is.
   */
  --elev-0:  none;
  --elev-1:  0 1px 2px rgba(29, 34, 41, .06), 0 4px 14px rgba(29, 34, 41, .07);
  --elev-2:  0 2px 4px rgba(29, 34, 41, .07), 0 12px 34px rgba(29, 34, 41, .11);
  --elev-3:  0 12px 48px rgba(20, 24, 31, .3);
  /* kept as an alias so older rules do not break */
  --shadow:  var(--elev-1);

  /* ---- motion ---------------------------------------------------------
   * Spare, not absent. Motion is only used to show that something
   * arrived, or to point at a field the agent just cited.
   */
  --dur-1: 120ms;
  --dur-2: 220ms;
  --dur-3: 420ms;
  --ease:  cubic-bezier(.2, .7, .3, 1);
}

/* ---- projector mode ---------------------------------------------------
 * A room with a washed-out projector loses the bottom two stops of
 * contrast and the top of the type scale. This raises both. It is a
 * presenter control, not a theme: the palette does not change hue.
 */
:root[data-projector] {
  --ink:         #0f1216;
  --ink-2:       #262b33;
  --ink-3:       #3f444c;
  --line:        #b3b6ae;
  --line-soft:   #c9ccc4;
  --line-strong: #8f9389;
  --on-brand-dim:#c6d3c1;

  --accent-text: #2c3d16;
  --ok-text:     #0a3a21;
  --warn-text:   #4e3103;
  --risk-text:   #5e1512;
  --accent-fill: #e2ebd3;
  --ok-fill:     #d6ebe0;
  --warn-fill:   #f8e6c4;
  --risk-fill:   #f7d8d5;

  --cad-ink:     #000000;
  --cad-thin:    #33383e;
  --cad-dim:     #4d5259;
  --cad-grid:    #bfbdb2;

  --pen-hair:    0.9;
  --pen-thin:    1.4;
  --pen-med:     2.1;
  --pen-thick:   3.2;
  --pen-heavy:   4.8;

  --t-xs:   13.5px;
  --t-sm:   15px;
  --t-base: 17px;
  --t-lg:   20px;
  --t-xl:   25px;
  --t-2xl:  31px;
  --t-3xl:  39px;
  --t-4xl:  52px;
  --t-hero: 70px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; }
}
