/* COPY of FL26/src/styles/tokens.css (the source of truth), copied 2026-10-05 for Design Request (Hub X3).
 * Do not edit here: change the Hub file and copy it again. Pages alias their own variables to these. */
/* ══════════════════════════════════════════════════════════════════════════════
 * Humintech Design System — tokens
 *
 * Task 4.2. The file `marketing-request/Public/form.html:9` and
 * `dashboard.html:9` have referenced as `humintech-design-system/tokens.css`
 * since before it existed. This is it.
 *
 * TWO CONSUMERS, ONE FILE (decision H17, cross-project task X3)
 * The Marketing Hub and the Design Request tool both drink from here, so every
 * name below describes a ROLE in the design system, never a screen in either
 * app. There is no `--lead-card-border`. There is `--hh-border-subtle`, and the
 * lead card uses it.
 *
 * WHAT THIS FIXES
 * Three different greens were in production, none of them the company's:
 *
 *   #2d5a27  Marketing Hub `--color-primary`      a muted olive
 *   #15522e  Design Request `--green`             a dark forest
 *   #3d7a35  Marketing Hub gradients, invented in place
 *   #E30613  `index.html` theme-color             red, on a green product
 *
 * The brand green is **#008844**: the screen value of Pantone 348 CP, the
 * official definition with CMYK C85 M0 Y85 K30 and HKS 57 K (Onur, 2026-10-05,
 * social-dashboard docs/image-library-roadmap.md L-D12). Until then it was
 * #038C4E, sampled from `public/humintech-logo.jpg`; the two differ by about
 * 1 % in lightness and not in hue, so the ramp below still fits.
 *
 * HOW TO USE
 *   --hh-*-N tokens are the raw ramps. Do not reference them from a component;
 *   they exist so the semantic tokens below have somewhere to point.
 *   Everything under "SEMANTIC" is what components use.
 *
 * LIGHT ONLY, DELIBERATELY. This is a PWA used at trade-show booths, held at
 * arm's length under exhibition-hall lighting, often outdoors. A dark theme is a
 * real feature with real work behind it (every surface, every chart step,
 * re-validated) and inventing half of one here would leave the worst of both.
 * The structure supports adding it; nothing pretends it is already there.
 * ════════════════════════════════════════════════════════════════════════════ */

:root {

  /* ─────────────────────────────────────────────────────────────────────────
   * RAMPS — raw values. Not for direct use in components.
   * ───────────────────────────────────────────────────────────────────────── */

  /* Brand green. 500 is the logo; 600 is the darkest step that still reads as
     the brand and the lightest that carries white text at AA (5.4:1). */
  --hh-green-50:  #e8f6ee;
  --hh-green-100: #c6ead5;
  --hh-green-200: #92d8b2;
  --hh-green-300: #55c089;
  --hh-green-400: #16a362;
  --hh-green-500: #008844;   /* Pantone 348 CP on screen (was #038c4e) */
  --hh-green-600: #027a42;
  --hh-green-700: #016234;
  --hh-green-800: #014d29;
  --hh-green-900: #01371d;

  /* Neutrals, warmed very slightly toward green so greys sit beside the brand
     rather than fighting it. A pure grey next to the brand green reads as blue. */
  --hh-neutral-0:   #ffffff;
  --hh-neutral-25:  #fafbfa;
  --hh-neutral-50:  #f5f7f5;
  --hh-neutral-100: #edf0ee;
  --hh-neutral-200: #e1e6e2;
  --hh-neutral-300: #c9d1cb;
  --hh-neutral-400: #9aa69d;
  --hh-neutral-500: #5f6d64;
  --hh-neutral-600: #4f5c54;
  --hh-neutral-700: #3a443e;
  --hh-neutral-800: #262e29;
  --hh-neutral-900: #1b211d;

  /* ─────────────────────────────────────────────────────────────────────────
   * SEMANTIC — COLOUR
   * ───────────────────────────────────────────────────────────────────────── */

  /* Brand. Use for identity: logo lockups, the active state of navigation, the
     one accent on a screen that says whose product this is. */
  --hh-brand:            var(--hh-green-500);
  --hh-brand-strong:     var(--hh-green-700);
  --hh-brand-subtle:     var(--hh-green-50);

  /* Action. What a user can press. Deliberately one step darker than the brand:
     #008844 carries white text at 4.56:1, AA by a hair, and #038c4e (before
     2026-10-05) failed it at 4.3:1. #027a42 clears it at 5.4:1 with room. */
  --hh-action:           var(--hh-green-600);
  --hh-action-hover:     var(--hh-green-700);
  --hh-action-pressed:   var(--hh-green-800);
  --hh-action-disabled:  var(--hh-neutral-300);
  --hh-action-subtle:    var(--hh-green-50);
  --hh-action-subtle-hover: var(--hh-green-100);
  --hh-on-action:        var(--hh-neutral-0);

  /* Surfaces, from furthest back to closest to the reader. */
  --hh-surface-sunken:   var(--hh-neutral-50);
  --hh-surface:          var(--hh-neutral-0);
  --hh-surface-raised:   var(--hh-neutral-0);
  --hh-surface-hover:    var(--hh-neutral-50);
  --hh-surface-selected: var(--hh-green-50);
  --hh-surface-scrim:    rgb(27 33 29 / 0.55);

  /* Text. Every one of these clears WCAG AA on --hh-surface:
     primary 15.9:1 · secondary 7.0:1 · muted 5.4:1.
     `disabled` does not and must never carry meaning — it is for text that has
     been switched off, where the state is conveyed by more than the colour. */
  --hh-text-primary:     var(--hh-neutral-900);
  --hh-text-secondary:   var(--hh-neutral-600);
  --hh-text-muted:       var(--hh-neutral-500);
  --hh-text-disabled:    var(--hh-neutral-400);
  --hh-text-on-brand:    var(--hh-neutral-0);
  --hh-text-link:        var(--hh-green-700);

  /* Borders. `subtle` separates things that belong together, `default` things
     that do not, `strong` marks an input the user is expected to fill. */
  --hh-border-subtle:    var(--hh-neutral-100);
  --hh-border:           var(--hh-neutral-200);
  --hh-border-strong:    var(--hh-neutral-300);
  --hh-border-focus:     var(--hh-green-600);

  /* Status. Paired fg / surface / border so a status never has to be improvised
     at the call site. Every `-fg` clears AA against its own `-surface`.
     A status colour never travels alone — it carries an icon and a word. */
  --hh-success-fg:       #006300;
  --hh-success:          #0ca30c;
  --hh-success-surface:  #e9f7e9;
  --hh-success-border:   #b8e3b8;

  --hh-warning-fg:       #7a5c12;
  --hh-warning:          #fab219;
  --hh-warning-surface:  #fdf6e3;
  --hh-warning-border:   #f0e2b8;

  --hh-danger-fg:        #a52418;
  --hh-danger:           #d03b3b;
  --hh-danger-surface:   #fcecea;
  --hh-danger-border:    #f3c9c4;

  --hh-info-fg:          #1a4ac4;
  --hh-info:             #2a78d6;
  --hh-info-surface:     #eaf2fd;
  --hh-info-border:      #c3ddf8;

  /* Offline / queued. Its own role rather than a reuse of warning: "waiting to
     sync" is not a problem, and colouring it like one trains people to ignore
     the colour that means something is actually wrong. */
  --hh-pending-fg:       var(--hh-info-fg);
  --hh-pending-surface:  var(--hh-info-surface);
  --hh-pending-border:   var(--hh-info-border);

  /* Event status (calendar). Each status borrows an existing semantic role, so
     a colour means the same thing here as everywhere else: green is settled,
     amber is waiting on a decision, blue is work in progress, red is called
     off. Radar, Done and Dropped share the neutral role — none of them asks
     anyone for anything — and are told apart by their label, which is always
     shown. Colour is never the only signal. */
  --hh-status-neutral-fg:      var(--hh-text-secondary);
  --hh-status-neutral-surface: var(--hh-neutral-100);
  --hh-status-neutral-border:  var(--hh-border);

  /* ─────────────────────────────────────────────────────────────────────────
   * SEMANTIC — DATA VISUALISATION
   *
   * The categorical order is a validated palette: every adjacent pair clears
   * CVD ΔE ≥ 8 and normal-vision ΔE ≥ 15 against a white surface, checked with
   * a validator rather than by eye.
   *
   * The brand green sits at slot 6, in the green slot, NOT at slot 1. Leading
   * with it was tried and it fails — brand green beside orange measures ΔE 2.7
   * under protanopia, which is two series a colourblind reader cannot tell
   * apart. Identity belongs in the chrome; a chart has a harder job.
   *
   * Slots are assigned in fixed order and never cycled. Past 8 categories, fold
   * the tail into "Other" — a 9th generated hue is how a palette stops being
   * one. For charts where every pair can appear side by side (scatter, bubble),
   * only the first three are safe; beyond that, facet.
   *
   * Three slots (3, 4, 5) fall below 3:1 against white. They are legal only
   * with a visible direct label or a table view — never as colour alone.
   * ───────────────────────────────────────────────────────────────────────── */

  --hh-series-1: #2a78d6;  /* blue    */
  --hh-series-2: #eb6834;  /* orange  */
  --hh-series-3: #1baf7a;  /* aqua    */
  --hh-series-4: #eda100;  /* yellow  */
  --hh-series-5: #e87ba4;  /* magenta */
  --hh-series-6: #008844;  /* green — the brand */
  --hh-series-7: #4a3aa7;  /* violet  */
  --hh-series-8: #e34948;  /* red     */

  /* A chart with one series is not categorical — it has no identities to tell
     apart — so it wears the brand. */
  --hh-series-single: var(--hh-brand);

  --hh-chart-surface:  var(--hh-surface);
  --hh-chart-grid:     var(--hh-neutral-100);
  --hh-chart-axis:     var(--hh-neutral-300);
  --hh-chart-label:    var(--hh-text-muted);

  /* ─────────────────────────────────────────────────────────────────────────
   * SEMANTIC — TYPOGRAPHY
   * ───────────────────────────────────────────────────────────────────────── */

  --hh-font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
                  Roboto, 'Helvetica Neue', Arial, sans-serif;
  --hh-font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  --hh-text-2xs:  0.6875rem;  /* 11px — badges, overline labels only */
  --hh-text-xs:   0.75rem;    /* 12px */
  --hh-text-sm:   0.8125rem;  /* 13px */
  --hh-text-base: 0.9375rem;  /* 15px — body. 16px on inputs, see below. */
  --hh-text-md:   1rem;       /* 16px */
  --hh-text-lg:   1.125rem;   /* 18px */
  --hh-text-xl:   1.375rem;   /* 22px */
  --hh-text-2xl:  1.75rem;    /* 28px */
  --hh-text-3xl:  2.25rem;    /* 36px — stat figures */

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

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

  --hh-tracking-tight:  -0.01em;
  --hh-tracking-normal: 0;
  --hh-tracking-wide:   0.02em;
  --hh-tracking-caps:   0.06em;  /* uppercase overlines need the air */

  /* ─────────────────────────────────────────────────────────────────────────
   * SEMANTIC — SPACE (4px base)
   * ───────────────────────────────────────────────────────────────────────── */

  --hh-space-0:  0;
  --hh-space-1:  0.25rem;   /*  4px */
  --hh-space-2:  0.5rem;    /*  8px */
  --hh-space-3:  0.75rem;   /* 12px */
  --hh-space-4:  1rem;      /* 16px */
  --hh-space-5:  1.25rem;   /* 20px */
  --hh-space-6:  1.5rem;    /* 24px */
  --hh-space-8:  2rem;      /* 32px */
  --hh-space-10: 2.5rem;    /* 40px */
  --hh-space-12: 3rem;      /* 48px */
  --hh-space-16: 4rem;      /* 64px */

  /* ─────────────────────────────────────────────────────────────────────────
   * SEMANTIC — SHAPE
   * ───────────────────────────────────────────────────────────────────────── */

  --hh-radius-xs:   4px;
  --hh-radius-sm:   8px;
  --hh-radius-md:   12px;
  --hh-radius-lg:   16px;
  --hh-radius-xl:   20px;
  --hh-radius-pill: 999px;

  /* Named by what wears them, so a control and a card cannot drift apart. */
  --hh-radius-control: var(--hh-radius-md);
  --hh-radius-card:    var(--hh-radius-lg);
  --hh-radius-sheet:   var(--hh-radius-xl);
  --hh-radius-chip:    var(--hh-radius-pill);

  /* ─────────────────────────────────────────────────────────────────────────
   * SEMANTIC — ELEVATION
   *
   * Shadows are green-black rather than pure black. A neutral-black shadow over
   * a warm-neutral surface reads as a dirty smudge.
   * ───────────────────────────────────────────────────────────────────────── */

  --hh-shadow-xs: 0 1px 2px rgb(27 33 29 / 0.06);
  --hh-shadow-sm: 0 1px 3px rgb(27 33 29 / 0.08), 0 1px 2px rgb(27 33 29 / 0.04);
  --hh-shadow-md: 0 4px 12px rgb(27 33 29 / 0.10);
  --hh-shadow-lg: 0 12px 28px rgb(27 33 29 / 0.14);
  --hh-shadow-sheet: 0 -6px 28px rgb(27 33 29 / 0.16);

  --hh-focus-ring: 0 0 0 3px rgb(3 140 78 / 0.32);

  /* ─────────────────────────────────────────────────────────────────────────
   * SEMANTIC — MOTION
   *
   * Everything below is overridden to 0 under prefers-reduced-motion at the
   * bottom of this file, so a component never has to remember to check.
   * ───────────────────────────────────────────────────────────────────────── */

  --hh-duration-instant: 80ms;
  --hh-duration-fast:    140ms;
  --hh-duration-base:    220ms;
  --hh-duration-slow:    320ms;

  --hh-ease-standard:  cubic-bezier(0.2, 0, 0, 1);
  --hh-ease-out:       cubic-bezier(0, 0, 0, 1);
  --hh-ease-in:        cubic-bezier(0.3, 0, 1, 1);

  /* ─────────────────────────────────────────────────────────────────────────
   * SEMANTIC — LAYOUT
   * ───────────────────────────────────────────────────────────────────────── */

  /* 44px is the WCAG floor and CLAUDE.md's rule. 48px is what this product
     actually uses, because the people using it are wearing exhibition badges
     and holding a coffee. */
  --hh-touch-min:         44px;
  --hh-touch-comfortable: 48px;

  --hh-control-height:    48px;
  --hh-control-height-lg: 56px;

  --hh-header-height:     56px;
  --hh-tabbar-height:     64px;
  --hh-rail-width:        224px;

  --hh-content-narrow: 34rem;  /* a form — one column, never wider */
  --hh-content-base:   48rem;
  --hh-content-wide:   72rem;  /* a table or a dashboard */

  /* One scale, in one place, so nothing ever needs a z-index of 9999 again. */
  --hh-z-base:    0;
  --hh-z-raised:  10;
  --hh-z-sticky:  30;
  --hh-z-nav:     40;
  --hh-z-overlay: 100;
  --hh-z-modal:   110;
  --hh-z-toast:   200;

  /* iOS home indicator and notch. Fall back to a real value, not 0 — a sheet
     flush against the bottom of a phone is unpressable. */
  --hh-safe-bottom: env(safe-area-inset-bottom, 0px);
  --hh-safe-top:    env(safe-area-inset-top, 0px);
}

/*
 * Reduced motion.
 *
 * Set on the tokens rather than in a blanket `* { animation: none }` rule, so
 * anything conveying state (a sync spinner, a progress bar) keeps working —
 * it simply stops moving decoratively.
 */
@media (prefers-reduced-motion: reduce) {
  :root {
    --hh-duration-instant: 0ms;
    --hh-duration-fast:    0ms;
    --hh-duration-base:    0ms;
    --hh-duration-slow:    0ms;
  }
}
