/* ==========================================================================
   BlueOneHR brand tokens
   ==========================================================================

   Generated assets live in static/brand/ and come from
   scripts/build-brand-assets.py. Never hand-edit an SVG there.

   Three rules this file is built on:

   1. Colour is defined ONCE, as a token, on bare :root. Nothing here defines a
      colour only inside a media query, so a dark theme is a token swap.

   2. Every text token clears 4.5:1 against the WORST background it can land on,
      which is the tinted canvas, not white. --ink-decor is NON-TEXT ONLY and is
      named so. Dividers clear the 1.4:1 structural floor: an earlier #E1E5EC
      measured 1.18 and was replaced rather than shipped.

   3. THE BRAND COLOUR IS NOT A STATUS COLOUR. Blue means BlueOneHR and means
      interactive. It never means "info", "in progress" or "good". A brand colour
      that doubles as a status makes every status ambiguous, and in this product
      status is the primary signal.
   ========================================================================== */

@font-face{font-family:'Instrument Sans';font-weight:400;font-display:swap;src:url('brand/fonts/is-400.woff2') format('woff2')}
@font-face{font-family:'Instrument Sans';font-weight:500;font-display:swap;src:url('brand/fonts/is-500.woff2') format('woff2')}
@font-face{font-family:'Instrument Sans';font-weight:600;font-display:swap;src:url('brand/fonts/is-600.woff2') format('woff2')}
@font-face{font-family:'Instrument Sans';font-weight:700;font-display:swap;src:url('brand/fonts/is-700.woff2') format('woff2')}
@font-face{font-family:'JetBrains Mono';font-weight:400;font-display:swap;src:url('brand/fonts/jbm-400.woff2') format('woff2')}
@font-face{font-family:'Instrument Serif';font-weight:400;font-display:swap;src:url('brand/fonts/iser-400.woff2') format('woff2')}
/* Devanagari interface face. Shaping verified by rendering, not assumed:
   akhn half rphf blwf blws psts pres cjct rkrf are present, and the conjuncts
   र्म ष्य त्र क्ष द्व द्ध श्री were rendered and checked at 26/17/13px.
   xHeight 536 against Instrument Sans 510, so it is set one step smaller
   optically via --deva-adjust rather than matched by nominal size. */
@font-face{font-family:'Noto Sans Devanagari';font-weight:400;font-display:swap;src:url('brand/fonts/nsd-400.woff2') format('woff2')}
@font-face{font-family:'Noto Sans Devanagari';font-weight:700;font-display:swap;src:url('brand/fonts/nsd-700.woff2') format('woff2')}

:root{
  /* ── Brand ───────────────────────────────────────────────────────────── */
  --primary:        #0F3D8C;   /* white on it 10.16:1 · on canvas 9.48:1 */
  --primary-dark:   #0A2C68;   /* white on it 13.35:1 · hover/pressed    */
  --primary-bright: #7FA9EA;   /* on chrome 7.69:1 · dark surfaces only  */
  --primary-tint:   #E8EFFA;   /* ink on it 15.33:1                      */
  --primary-line:   #C8D8F2;

  /* ── Surfaces ────────────────────────────────────────────────────────── */
  --canvas:      #F6F7F9;
  --surface:     #FFFFFF;
  --surface-2:   #FBFCFD;
  --line:        #CAD1DD;      /* 1.433:1 on canvas · structural floor 1.4 */
  --line-strong: #B4BDCD;

  /* ── Text. Worst-case background is --canvas. ────────────────────────── */
  --ink:       #121826;   /* 16.54:1 */
  --ink-2:     #3A4152;   /*  9.52:1 — secondary content */
  --ink-3:     #5C6273;   /*  5.68:1 — metadata only, lowest permissible TEXT tier */
  --ink-decor: #A6ABBA;   /*  2.14:1 — NEVER text. Dividers, icon strokes, disabled glyphs. */

  /* ── Dark surfaces ───────────────────────────────────────────────────── */
  --chrome:        #0E1420;
  --chrome-raised: #161C29;
  --chrome-line:   #2A3140;   /* 1.414:1 on chrome */
  --chrome-ink:    #FFFFFF;   /* 18.43:1 */
  --chrome-ink-2:  #A8AEBF;   /*  8.31:1 */
  --chrome-ink-3:  #8A90A3;   /*  5.79:1 */

  /* ── Status ramp. NO BLUE. See rule 3 above. ─────────────────────────── */
  --ok:      #0B5F30;  --ok-tint:      #E3F5EA;  --ok-line:      #BFE6CE;
  --warn:    #6E4700;  --warn-tint:    #FBF0DC;  --warn-line:    #EFD9AE;
  --bad:     #96201A;  --bad-tint:     #FCE8E7;  --bad-line:     #F3C9C6;
  --unknown: #4A5060;  --unknown-tint: #EDEEF2;  --unknown-line: #DCDFE6;
  /* "in progress" is carried by the busy SHAPE plus a moving stripe, on
     --unknown. It has no hue of its own, because the only hue left that would
     read as "in progress" is blue, and blue is the brand. */

  /* ── Type ────────────────────────────────────────────────────────────── */
  --sans:  'Instrument Sans', system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  --deva:  'Noto Sans Devanagari', 'Instrument Sans', sans-serif;
  --deva-adjust: 0.955;   /* xHeight 536 vs 510 */

  --r1:5px; --r2:8px; --r3:12px;
}

/* Deliberately NO bare body{} rule. This file is additive: tokens and named
   utilities only, so it can be linked into the shell without repainting the
   500+ pages that predate it. Surfaces adopt it one at a time, via .bon. */
.bon{font-family:var(--sans);color:var(--ink);background:var(--canvas)}

/* Machine-produced values. Anything a person wrote is not this. */
.mn{font-family:var(--mono);font-variant-numeric:tabular-nums}

/* THE SERIF SLOT. One selector, one meaning: a stated absence or limit
   occupying the position a value would occupy, or a deliberately counted
   figure. "Nothing due". "None contracted". "Not verified".
   It is not a heading face, not a display face and not emphasis.
   Widening this requires editing tests_brand.py, which is a decision with a
   diff rather than a rule nobody reviews. */
.fig{font-family:var(--serif);font-weight:400;line-height:.95;letter-spacing:-.02em}

:lang(hi),.deva{font-family:var(--deva);font-size:calc(1em * var(--deva-adjust))}

/* ── The reference marker ────────────────────────────────────────────────
   NAMESPACED as .bon-ref, not .ref. A bare .ref already exists in this
   codebase -- hr_letters/base_letter.html uses <td class="ref"> for a
   letter's reference NUMBER, which is a different thing entirely. An
   un-namespaced brand class would have restyled it and the misuse gate
   would have been auditing unrelated markup.
   Appears ONLY on a figure that has a resolvable source. It is not a tick,
   not a badge and not a status light. Placing it decoratively breaks the
   product's central promise, so tests_brand.py checks that every template
   that renders it also passes a source. */
.bon-ref{display:inline-block;width:2px;height:6px;border-radius:1px;
     background:var(--primary);vertical-align:super;margin-left:3px}
.bon-ref--dark{background:var(--primary-bright)}

/* ── The margin rule (T4, secondary device) ──────────────────────────────
   Row state down the left edge. Carries severity or verification state.
   Never the brand colour unless the row's state is genuinely "interactive". */
.bon-rowrule{border-left:3px solid var(--line-strong);padding-left:13px}
.bon-rowrule--ok{border-left-color:var(--ok)}
.bon-rowrule--warn{border-left-color:var(--warn)}
.bon-rowrule--bad{border-left-color:var(--bad)}
.bon-rowrule--unknown{border-left-color:var(--unknown-line)}
