/* site.css: the design-system tokens (_ds/.../tokens: fonts, colors, typography, spacing) merged into one file. */
/* Self-hosted webfonts (SIL Open Font License), Latin subset. Was Google Fonts. */
@font-face{font-family:'Montserrat';font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/montserrat-latin.woff2?v=6438d7b8ea) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:500 600;font-display:swap;src:url(fonts/cormorant-garamond-latin.woff2?v=5d618c462b) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Cormorant Garamond';font-style:italic;font-weight:500;font-display:swap;src:url(fonts/cormorant-garamond-italic-latin.woff2?v=efd94eb5c5) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ---- tokens/colors.css ---- */
/* Sentri — Color tokens (1-BIT MONOCHROME · Sharp Memory LCD LS027B7DH01)
 * The GX-4 ships the Sharp LS027B7DH01: a 2.7" Memory LCD, 400x240, TRUE 1-bit
 * black-and-white REFLECTIVE panel. There is no backlight and NO GRAYSCALE — a
 * pixel is either a dark "on" dot or the pale reflective field. Any apparent gray
 * MUST be produced by DITHERING (patterns of on/off pixels), never a solid tone.
 *
 * Status therefore reads by VALUE + FRAME + motion, never hue (ULTRA-CLEAN, no dither):
 *   SAFE    → normal: dark text on the light field, thin frame
 *   CAUTION → clean heavy 3px frame + a flashing alarm-type tag
 *   ALARM   → inverse: a solid "on" (near-black) plate, knocked-out text
 *   LATCHED → inverse + the alarm-type tag flashes at 700ms
 * Brand teal exists only OFF-device (logo/packaging); the reflective panel can't
 * show it, so every on-screen component resolves brand to ink.
 */
:root {
  /* ---- Surfaces (reflective field — no elevation; cards are framed, not filled) ---- */
  --c-bg:            #E4E7E2;   /* the pale reflective field ("off" pixels) */
  --c-surface:       #E4E7E2;   /* same as field — surfaces are delineated by frames */
  --c-surface-2:     #DCE0D6;   /* faint well */
  --c-surface-3:     #C8CCC1;   /* gauge track */
  --c-overlay:       rgba(12, 14, 12, 0.5); /* modal scrim */

  /* ---- Ink (the dark "on" pixel) ---- */
  --c-ink:           #0C0E0C;   /* the on-pixel — primary readings + frames */
  --c-ink-2:         #2E312D;   /* labels (on-device: solid ink; gray here for hierarchy) */
  --c-ink-3:         #565A52;   /* captions (on-device: solid ink) */
  --c-ink-on-fill:   #E7EAE2;   /* knockout text on inverse plates = field color */
  --c-hairline:      #0C0E0C;   /* 1px frame/divider = a black on-pixel line */
  --c-hairline-2:    #0C0E0C;   /* stronger frame (same ink on 1-bit) */

  /* ---- Brand chrome — OFF-DEVICE ONLY ---- */
  --c-brand:         #0C0E0C;   /* on-device chrome resolves to ink */
  --c-brand-ink:     #000000;   /* pressed / deepest */
  --c-brand-tint:    #C8CCC1;   /* fallback; components use dither or inverse */
  --c-brand-teal:    #0E7C86;   /* the actual brand hue — logo/marketing art only */

  /* ---- Status scale (1-bit value/pattern, no hue) ---- */
  --c-safe:          #0C0E0C;   /* safe text = ink */
  --c-safe-tint:     #E7EAE2;   /* field (no shading) */
  --c-caution:       #0C0E0C;   /* caution text = ink */
  --c-caution-tint:  #C2C7BA;   /* fallback flat tone; on-device this is dither */
  --c-alarm:         #0C0E0C;   /* inverse plate = solid on-pixels */
  --c-alarm-tint:    #0C0E0C;
  --c-alarm-deep:    #000000;   /* inverse frame */
  --c-info:          #0C0E0C;
  --c-info-tint:     #E7EAE2;

  /* ---- Semantic aliases ---- */
  --text-primary:    var(--c-ink);
  --text-secondary:  var(--c-ink-2);
  --text-muted:      var(--c-ink-3);
  --text-on-fill:    var(--c-ink-on-fill);
  --surface-screen:  var(--c-bg);
  --surface-card:    var(--c-surface);
  --surface-well:    var(--c-surface-2);
  --border-hairline: var(--c-hairline);
  --focus-ring:      var(--c-ink);
}

/* ---- tokens/typography.css ---- */
/* Sentri — Typography tokens
 * Montserrat (LVGL's native bundled face). Numerics use tabular figures so live
 * readings don't jitter as digits change. Scale is tuned for a 400x240 panel.
 */
:root {
  --font-ui:     "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num:    "Montserrat", system-ui, sans-serif; /* tabular-nums applied where used */

  /* Weights actually used on-device (LVGL ships 400/500/600/700) */
  --fw-regular:  400; /* @kind font */
  --fw-medium:   500; /* @kind font */
  --fw-semibold: 600; /* @kind font */
  --fw-bold:     700; /* @kind font */

  /* Type scale — px values sized for a 2.7" 400x240 panel. Readouts run VERY LARGE:
     the value must fill the plate and stay readable at arm's length with reading
     glasses. Hero digits ~80px cap-height; tiles big too. */
  --fs-readout-xl: 96px;  /* hero single-gas value (auto-shrinks for 4-5 digits) */
  --fs-readout-lg: 66px;  /* primary value, dual layout */
  --fs-readout-md: 52px;  /* sensor-tile value (4-gas) */
  --fs-readout-sm: 30px;  /* compact value */
  --fs-title:      18px;  /* mode title / screen header */
  --fs-body:       15px;  /* list rows, menu items */
  --fs-label:      15px;  /* field labels, gas names */
  --fs-unit:       18px;  /* units beside readouts */
  --fs-softkey:    12px;  /* bottom soft-key captions */
  --fs-caption:    11px;  /* status bar, timestamps, footnotes */
  --fs-micro:      10px;  /* badge text, peak markers */

  --lh-tight:    1.05; /* @kind font */   /* big readouts */
  --lh-snug:     1.25; /* @kind font */
  --lh-normal:   1.4;  /* @kind font */

  --ls-tight:    -0.01em; /* @kind font */
  --ls-normal:   0;       /* @kind font */
  --ls-caps:     0.06em;  /* @kind font */ /* uppercase labels + soft-keys */

  /* Semantic aliases */
  --text-readout:  var(--fw-bold)   var(--fs-readout-lg)/var(--lh-tight) var(--font-num);
  --text-title:    var(--fw-semibold) var(--fs-title)/var(--lh-snug) var(--font-ui);
  --text-base:     var(--fw-regular)  var(--fs-body)/var(--lh-normal) var(--font-ui);
  --text-eyebrow:  var(--fw-semibold) var(--fs-caption)/1 var(--font-ui);
}

/* ---- tokens/spacing.css ---- */
/* Sentri — Spacing, radii, sizing, motion
 * 4px base grid. Values are tight: the whole UI lives on a 400x240 canvas.
 */
:root {
  /* Spacing scale (4px base) */
  --sp-0:  0px;
  --sp-1:  2px;
  --sp-2:  4px;
  --sp-3:  6px;
  --sp-4:  8px;
  --sp-5:  12px;
  --sp-6:  16px;
  --sp-7:  20px;
  --sp-8:  24px;
  --sp-9:  32px;

  /* Corner radii — small, instrument-like */
  --r-xs:   3px;   /* chips, badges */
  --r-sm:   5px;   /* tiles, buttons */
  --r-md:   8px;   /* cards, readout plates */
  --r-lg:  12px;   /* dialogs */
  --r-pill: 999px;

  /* Borders */
  --bw-hair: 1px; /* @kind spacing */
  --bw-med:  2px; /* @kind spacing */
  --bw-emph: 3px; /* @kind spacing */   /* status emphasis edge (ink) */

  /* Canonical device frame — Sharp LS027B7DH01 (2.7" Memory LCD)
   * 400 x 240 px · 1-bit B/W reflective · active area 59.04 x 35.42 mm
   * pixel pitch ~0.1476 mm (square) · ~172 ppi · no backlight */
  --screen-w: 400px; /* @kind spacing */
  --screen-h: 240px; /* @kind spacing */
  --statusbar-h: 26px; /* @kind spacing */
  --softkey-h:  30px; /* @kind spacing */

  /* Elevation — flat on-device; subtle for design-system surfaces */
  --shadow-none: none;
  --shadow-tile: 0 1px 0 rgba(17,24,28,0.04);
  --shadow-card: 0 1px 2px rgba(17,24,28,0.10), 0 1px 1px rgba(17,24,28,0.06);
  --shadow-pop:  0 8px 24px rgba(17,24,28,0.22);

  /* Motion — minimal; instruments avoid playful easing */
  --dur-fast:  120ms; /* @kind other */
  --dur-base:  200ms; /* @kind other */
  --ease-std:  cubic-bezier(0.2, 0, 0.2, 1); /* @kind other */
  --alarm-blink: 700ms; /* @kind other */ /* latched-alarm pulse cadence */
}
