/* ============================================================================
 * Harizma Design System — tokens.css
 * THE single source of truth for every design decision (color, space, type,
 * radius, shadow, motion, z-index, layout, safe-area).
 *
 * Why this file exists
 * --------------------
 * Before this file, design values lived in three disconnected places:
 *   1. public/css/app.css        (the messenger app: --void/--accent/--t1…)
 *   2. every marketing HTML page  (each with its own private :root block)
 *   3. design/CLAUDE.md           (a --cmwv2-* spec that was never implemented)
 * …and light mode was maintained as hundreds of per-component
 * `[data-theme="light"] .selector { … }` patches instead of a token swap.
 * That is the root cause of the drift and the ~875 hardcoded hex values.
 *
 * The rule this file establishes
 * ------------------------------
 *   • Every color/space/radius/etc. is a `--hz-*` custom property.
 *   • Theming = redefining tokens (see the [data-theme="light"] block), never
 *     re-styling components. A new component gets light mode "for free".
 *   • app.css now consumes these tokens through thin aliases (--void →
 *     var(--hz-surface-canvas)), so the whole app draws from here.
 *
 * Layers
 * ------
 *   L1 Primitives  — raw, un-themed scales (color ramps, space, radius, type…).
 *   L2 Semantic    — themed, intent-named tokens that components reference.
 *   L3 Component    — see primitives.css.
 *
 * Cross-platform: safe-area insets, dynamic-viewport helpers, fluid type and
 * touch-target minimums live here so iPhone (notch/home-bar), Android, tablet
 * and desktop are correct by construction, not by ad-hoc media queries.
 * ========================================================================== */

/* ===========================================================================
 * L1 · PRIMITIVES — raw values. Never reference these directly in components;
 * reference the semantic (L2) tokens below. Un-themed by definition.
 * ========================================================================= */
:root {
  /* — THE product colour: one blue ramp (hue ≈ 217°), 500 is the canonical
   *   accent. Harizma's UI has ONE accent hue: there is no violet/purple ramp
   *   (it was retired — buttons, AI actions, Plus, focus and selection are all
   *   blue; tests/unit/design-system/no-violet.test.js guards it). Two
   *   deliberate exceptions keep their own colours: the logo artwork's dots
   *   (--hz-logo-*), and the CHAT BUBBLES (the --hz-bubble-* register and the
   *   rules inside a bubble — the outgoing gradient, typing / thinking cards,
   *   mentions, the voice-message player).
   *     50–200   tints (a selected row, a pale wash in light)
   *     300–400  highlights (ink on the dark canvas, a gradient's light stop)
   *     500      the accent (--hz-brand)
   *     600      hover / the accent one step deeper
   *     700–800  fills that carry WHITE text (≥ 5:1) and light-theme ink
   *     900–975  navy grounds (illustration backdrops, dark hero gradients) — */
  --hz-blue-50:  #F0F6FF;
  --hz-blue-100: #E3EEFF;
  --hz-blue-200: #C4DBFF;
  --hz-blue-300: #8DB8FF;
  --hz-blue-400: #5A9BFF;
  --hz-blue-500: #4A8DFF;
  --hz-blue-600: #3F86F8;
  --hz-blue-700: #2569DC;
  --hz-blue-800: #1A4FB5;
  --hz-blue-900: #123A85;
  --hz-blue-950: #0C2457;
  --hz-blue-975: #0A1838;
  /* The blue a WHITE label sits on — the primary button, the sidebar New
     chat, the Plus CTA, the camera shutter. #0F5CD9 is 5.9:1 with white and
     #2A6FEA 4.6:1, so the whole gradient clears AA for 14px text in BOTH
     themes (the 500→400 highlight pair is 3.2→2.8:1 and cannot letter). */
  --hz-blue-action:   #0F5CD9;
  --hz-blue-action-2: #2A6FEA;

  /* — CORE WEB BRAND: marine blue → cyan. These are the primary company brand
   *   colors used across the marketing site (landing, packs, legal). Kept
   *   theme-invariant. The product app brand (--hz-brand) is also blue (the
   *   --hz-blue-* ramp) — a lighter product blue distinct from this marine→cyan
   *   web mark. — */
  --hz-brand-blue: #1A6BFF;
  --hz-brand-cyan: #00C8FF;
  --hz-brand-web-gradient: linear-gradient(135deg, var(--hz-brand-blue) 0%, var(--hz-brand-cyan) 100%);

  /* — Role colors (chat roles: peer-to-peer / agent / group) — */
  --hz-green-500:  #25D07E;   /* p2p (dark)  */
  --hz-green-600:  #3C9140;   /* p2p (light) — darkened from #4FAE4E to reach
                                 3:1 contrast on white (WCAG 1.4.11 non-text). */
  --hz-pink-400:   #E879A6;   /* agent (dark)  */
  --hz-pink-600:   #E4405F;   /* agent (light) */
  --hz-amber-400:  #F8B74A;   /* group / warning (dark) */
  --hz-amber-600:  #BE7A00;   /* warning/group (light) — darkened from #E8A217;
                                 amber-on-white is a classic low-contrast trap. */
  --hz-red-400:    #F47373;   /* danger (dark) */
  --hz-red-600:    #E53935;   /* danger (light) */
  /* Stars currency — the ★ glyph on a price. Identical in both themes on
     purpose: a currency mark that changes hue between themes reads as a
     different currency. It is a GLYPH beside its number, never body text, so
     it is tuned for the coin it draws rather than for text contrast (the
     number next to it carries the meaning and uses --hz-text). */
  --hz-star:       #F5B400;

  /* — The Harizma mark's own spectrum: the five inks of the logo's dots
   *   (public/icons/favicon.svg, --hz-avatar-person-mark). Raw and
   *   theme-invariant; components read the themed --hz-spectrum-* register
   *   (L2) built from them, never these. — */
  --hz-logo-pink:   #FE1E62;
  --hz-logo-orange: #FF6725;
  --hz-logo-amber:  #FFB30E;
  --hz-logo-indigo: #5549F5;
  --hz-logo-violet: #7F49F5;

  /* — Brand emphasis accents (per design/CLAUDE.md: reserved for headline
   *   emphasis; identical in both themes). Promoted from ad-hoc hex used
   *   across generators so they route through the system. — */
  --hz-accent-pink: #FF4D9D;
  --hz-accent-cyan: #3DD6F5;

  /* — File-type tile fills (document attachments). Solid colour carrying a
   *   WHITE label on top, so they are theme-independent (defined once) — the
   *   tile is its own background and reads identically in dark + light. Each is
   *   AA-contrast (>=4.5:1) against the white label; the family, not the exact
   *   format, is what the colour communicates at a glance. — */
  --hz-file-pdf:   #D43C3C;   /* PDF                     — red    */
  --hz-file-word:  #2563D6;   /* Word / RTF              — blue   */
  --hz-file-sheet: #0C8150;   /* spreadsheets (xlsx/csv) — green  */
  --hz-file-code:  #0E7490;   /* code / data / markup    — teal   */
  --hz-file-text:  #565E6C;   /* plain text / markdown   — slate  */
  --hz-file-label: #FFFFFF;   /* the label/glyph on any file tile */

  /* — Neutral ink/paper ramp (dark-first product) — */
  --hz-ink-900: #060610;   /* deepest canvas   */
  --hz-ink-850: #0B0B1C;
  --hz-ink-800: #101024;
  --hz-ink-750: #161630;
  --hz-ink-700: #1C1C3A;
  --hz-paper-0:   #FFFFFF;
  --hz-paper-50:  #F4F4F5;
  --hz-paper-100: #F1F1F1;
  --hz-paper-150: #EEEEF3;
  --hz-paper-200: #E8E8E8;

  /* — Text primitives — */
  --hz-text-dark-1: #EDEDF8;  --hz-text-dark-2: #6E6E90;  --hz-text-dark-3: #363658;
  --hz-text-lite-1: #000000;  --hz-text-lite-2: #707579;  --hz-text-lite-3: #A2ACB4;

  /* =========================================================================
   * L1 · NON-COLOR SCALES (theme-independent — defined once, never overridden)
   * ======================================================================= */

  /* — Type families (loaded via <link> in the page head) — */
  --hz-font-display: 'Manrope', 'IBM Plex Sans Arabic', 'IBM Plex Sans Devanagari', 'Noto Sans Armenian', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --hz-font-body:    'Plus Jakarta Sans', 'IBM Plex Sans Arabic', 'IBM Plex Sans Devanagari', 'Noto Sans Armenian', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hz-font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* — Fluid type scale (clamp = correct on phone → tablet → desktop with no
   *   per-breakpoint overrides). min at 360px, max at ~1200px viewport. — */
  --hz-text-2xs:  11px;
  --hz-text-xs:   12px;
  --hz-text-sm:   13px;
  --hz-text-base: 14px;                                  /* app body size    */
  --hz-text-md:   clamp(15px, 1.2vw + 12px, 16px);
  --hz-text-lg:   clamp(17px, 1.6vw + 13px, 20px);
  --hz-text-xl:   clamp(20px, 2.4vw + 14px, 26px);
  --hz-text-2xl:  clamp(24px, 3.4vw + 15px, 34px);
  --hz-text-3xl:  clamp(30px, 5vw + 16px, 48px);
  --hz-text-display: clamp(36px, 7vw + 16px, 68px);
  /* Marketing display-heading steps (bigger + tighter than the app scale).
     Every marketing page shares these instead of hand-rolling its own clamp,
     so the same heading is one size everywhere. Ladder: --3xl < --section <
     --display < --cta < --hero. Pair with --hz-leading-heading / -hero and
     --hz-tracking-heading / -hero. */
  --hz-text-section: clamp(34px, 5vw,   60px);  /* section titles ("How it works") */
  --hz-text-cta:     clamp(40px, 5.5vw, 72px);  /* closing / final-CTA headline    */
  --hz-text-hero:    clamp(44px, 5.2vw + 14px, 84px);  /* the top hero headline    */

  --hz-weight-regular: 400;
  --hz-weight-medium:  500;
  --hz-weight-semibold: 600;
  --hz-weight-bold:    700;
  --hz-weight-extrabold: 800;

  --hz-leading-hero:    0.95;   /* the top hero headline — below single-spacing */
  --hz-leading-heading: 1.05;   /* section + CTA display headings */
  --hz-leading-tight:   1.1;
  --hz-leading-snug:    1.3;
  --hz-leading-normal:  1.5;
  /* Long-form reading: code, Markdown source, a lesson body. Looser than
     --normal because the eye returns to the left margin far more often. */
  --hz-leading-relaxed: 1.65;

  --hz-tracking-hero:    -0.05em;  /* large display: tighter than -tight */
  --hz-tracking-heading: -0.05em;  /* section + CTA display headings */
  --hz-tracking-tight:  -0.03em;
  --hz-tracking-snug:   -0.012em;
  --hz-tracking-normal: 0;

  /* ─── Semantic type ROLES ──────────────────────────────────────────────────
     The scale above answers "what sizes exist"; these roles answer "what does a
     title / body / label / timestamp look like" — each binds size + weight +
     line-height + tracking so a role is ONE definition system-wide. App surfaces
     (chat list, header, composer, notes) and the component registers (--hz-bubble-*,
     --hz-chatlist-*) consume a ROLE instead of hardcoding raw px, which is what kept
     e.g. the chat name drifting 14↔15px across breakpoints. Colours live in the
     per-theme blocks (--hz-text / -muted / -meta). Marketing display headings keep
     their own --hz-text-section/-cta/-hero ladder — this layer is the app/product UI. */
  /* title — list & card names, chat-header name, note title */
  --hz-role-title-size:       15px;
  --hz-role-title-weight:     var(--hz-weight-semibold);
  --hz-role-title-leading:    1.35;
  --hz-role-title-tracking:   -0.01em;
  /* body — default UI text */
  --hz-role-body-size:        var(--hz-text-base);        /* 14 */
  --hz-role-body-weight:      var(--hz-weight-regular);
  --hz-role-body-leading:     var(--hz-leading-normal);   /* 1.5 */
  --hz-role-body-tracking:    0;
  /* read — long-form reading: agent messages, note body (a document, not a chat pill) */
  --hz-role-read-size:        16px;
  --hz-role-read-weight:      var(--hz-weight-regular);
  --hz-role-read-leading:     1.6;
  --hz-role-read-tracking:    -0.005em;
  /* label — buttons, chips, tabs, sender labels, section eyebrows */
  --hz-role-label-size:       var(--hz-text-sm);          /* 13 */
  --hz-role-label-weight:     var(--hz-weight-semibold);
  --hz-role-label-leading:    1.2;
  --hz-role-label-tracking:   -0.005em;
  /* caption — list preview, header status, secondary/help text */
  --hz-role-caption-size:     var(--hz-text-sm);          /* 13 */
  --hz-role-caption-weight:   var(--hz-weight-regular);
  --hz-role-caption-leading:  1.4;
  --hz-role-caption-tracking: 0;
  /* meta — timestamps, counts, tiny status; always the AA-compliant --hz-text-meta */
  --hz-role-meta-size:        var(--hz-text-xs);          /* 12 */
  --hz-role-meta-weight:      var(--hz-weight-medium);
  --hz-role-meta-leading:     1;
  --hz-role-meta-tracking:    0;

  /* — Spacing scale (4px rhythm) — */
  --hz-space-0:  0;
  --hz-space-px: 1px;
  --hz-space-1:  4px;
  --hz-space-2:  8px;
  --hz-space-3:  12px;
  --hz-space-4:  16px;
  --hz-space-5:  20px;
  --hz-space-6:  24px;
  --hz-space-7:  28px;
  --hz-space-8:  32px;
  --hz-space-10: 40px;
  --hz-space-11: 44px;
  --hz-space-12: 48px;
  --hz-space-16: 64px;
  --hz-space-20: 80px;

  /* — Radii — */
  /* Radius scale — even 2px rhythm (the app's real steps, de-noised: odd
   *   values snap to the nearest even step, an imperceptible ≤1px change). */
  --hz-radius-2:   2px;
  --hz-radius-4:   4px;
  --hz-radius-6:   6px;
  --hz-radius-8:   8px;
  --hz-radius-10:  10px;
  --hz-radius-12:  12px;
  --hz-radius-14:  14px;
  --hz-radius-16:  16px;
  --hz-radius-18:  18px;
  --hz-radius-20:  20px;
  --hz-radius-22:  22px;
  --hz-radius-24:  24px;
  --hz-radius-26:  26px;
  --hz-radius-28:  28px;
  --hz-radius-30:  30px;
  --hz-radius-32:  32px;
  --hz-radius-pill: 999px;   /* fully-round SHORT elements (chips, badges, buttons) — never large cards */
  --hz-radius-full: 9999px;
  /* Semantic aliases — what components reference (unchanged values). */
  --hz-radius-xs:   var(--hz-radius-6);
  --hz-radius-sm:   var(--hz-radius-8);
  --hz-radius-md:   var(--hz-radius-10);
  --hz-radius-lg:   var(--hz-radius-14);
  --hz-radius-xl:   var(--hz-radius-18);
  --hz-radius-2xl:  var(--hz-radius-24);
  --hz-radius-3xl:  var(--hz-radius-32);   /* large cards / modals */
  /* The avatar shape. ONE for every identity the app draws — a person, an
     agent, a group, a conversation, the user themself — at every size, on
     every surface: the chat list, the chat header, message senders, search,
     agent cards, profile heroes, operator panels, marketing pages. Photos,
     generated portraits (avatar_creator paints them circle-safe), logos and
     emoji/initials all sit in the same circle, so one column of faces reads
     as one system. A tile that is NOT an identity — a note's icon, an app or
     partner logo, a media thumbnail, a badge — keeps a step radius; that
     difference is how the eye tells "who" from "what". */
  --hz-radius-avatar: 50%;

  /* — Motion — */
  --hz-dur-instant: 90ms;
  --hz-dur-fast:    140ms;
  --hz-dur:         220ms;
  --hz-dur-slow:    320ms;
  --hz-ease:        cubic-bezier(.4, 0, .2, 1);
  --hz-ease-out:    cubic-bezier(0, 0, .2, 1);
  --hz-ease-in:     cubic-bezier(.4, 0, 1, 1);
  --hz-ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --hz-stagger:     40ms;   /* step between the items of one entrance cascade (≪ its duration, so they move as one wave) */

  /* — Z-index scale (one ladder, so stacking is never guessed) — */
  --hz-z-base:     1;
  --hz-z-raised:   10;
  --hz-z-sticky:   100;
  --hz-z-header:   200;
  --hz-z-dropdown: 1000;
  --hz-z-overlay:  1200;
  --hz-z-modal:    1300;
  --hz-z-toast:    1400;
  --hz-z-max:      2147483647;

  /* — Cross-platform layout: safe-area insets (iPhone notch + home bar,
   *   Android gesture bar). Fall back to 0 where unsupported. — */
  --hz-safe-top:    env(safe-area-inset-top, 0px);
  --hz-safe-right:  env(safe-area-inset-right, 0px);
  --hz-safe-bottom: env(safe-area-inset-bottom, 0px);
  --hz-safe-left:   env(safe-area-inset-left, 0px);

  /* — Minimum touch targets: 44px (Apple HIG) / 48px (Material). Use the
   *   larger for primary controls so both platforms are comfortable. — */
  --hz-tap-min:     44px;
  --hz-tap-comfort: 48px;

  /* — Focus ring width (color is a semantic token below) — */
  --hz-focus-width: 3px;
}

/* ===========================================================================
 * L2 · SEMANTIC — themed, intent-named tokens. Components reference ONLY these.
 * Default theme is DARK (matches the product); light is a pure token swap.
 * Values below are the canonical, current app values — changing rendering is
 * NOT the goal of this layer; single-sourcing it is.
 * ========================================================================= */
:root {
  color-scheme: dark;

  /* Surfaces */
  --hz-surface-canvas: var(--hz-ink-900);
  /* The plans page's canvas — the same in the app (its Plans page) as on the
     public /pricing page: the deepest canvas dark, plain paper light. */
  --hz-plans-canvas: var(--hz-surface-canvas);
  --hz-surface:        var(--hz-ink-850);
  --hz-surface-raised: var(--hz-ink-800);
  --hz-surface-hover:  var(--hz-ink-750);
  --hz-surface-active: var(--hz-ink-700);

  /* A FILLED card — the soft, borderless tile that sits on the sheet
     (--hz-surface) and separates from it by its fill alone, the house style of
     Harizma's own decks and marketing. It is a reading surface, so it carries
     its own muted ink: --hz-text-meta is calibrated against the sheet and
     drops under AA on a light fill (4.2:1); --hz-text-meta-fill holds ≥ 5:1 on
     it in both themes. --hz-surface-fill-2 is the next step in, for a chip or
     a tile ON a filled card. */
  --hz-surface-fill:   var(--hz-ink-750);
  --hz-surface-fill-2: var(--hz-ink-700);
  --hz-text-meta-fill: var(--hz-text-meta);

  /* The brand SPECTRUM — the logo's hues as a decorative code: a module's
     tile, a step's number, the order of a list. Never a state and never the
     interactive accent (that stays --hz-brand), so a reader learns «colour =
     Harizma», not «colour = meaning». One sanctioned CATEGORY use: the AI
     Course colours a learning step's kind with it (practice, reflection, handout —
     docs/course.md §8.4); a kind is not a state, and done stays green. Four steps, in the logo's order:
       1 pink · 2 orange · 3 blue · 4 sky   (amber is too light to carry a
       glyph on white and stays in the gradient only; the mark's indigo and
       violet dots are carried by the product's blue and sky, so the UI has
       no purple — the logo artwork itself keeps its own inks)
     Per step:
       -N        solid fill under a WHITE glyph (a number) — ≥ 3:1 (the house
                 bar for white on a fill), identical in both themes; orange is
                 the logo's, deepened to #E4560F to clear it.
       -N-soft   the tint behind an icon
       -N-ink    the glyph on that tint and on a filled card — ≥ 4.5:1 on both
     --hz-spectrum-gradient is the mark in one stroke (decoration only — no
     text on it); --hz-spectrum-wash is its whisper, a ground text CAN sit on
     (≥ 4.5:1 for --hz-text and --hz-text-meta-fill at BOTH of its ends, both
     themes), painted over --hz-spectrum-wash-base — the solid colour a
     component also sets, for a browser or checker that drops the gradient. */
  --hz-spectrum-1: var(--hz-logo-pink);
  --hz-spectrum-2: #E4560F;
  --hz-spectrum-3: var(--hz-brand-blue);
  --hz-spectrum-4: #0B7BC4;
  --hz-spectrum-1-soft: rgba(254, 30, 98, .18);
  --hz-spectrum-2-soft: rgba(255, 103, 37, .18);
  --hz-spectrum-3-soft: rgba(26, 107, 255, .24);
  --hz-spectrum-4-soft: rgba(11, 123, 196, .26);
  --hz-spectrum-1-ink: #FF6B95;
  --hz-spectrum-2-ink: #FF8B5A;
  --hz-spectrum-3-ink: #82AEFF;
  --hz-spectrum-4-ink: #5CC2F2;
  --hz-spectrum-gradient: linear-gradient(120deg, var(--hz-logo-pink) 0%, var(--hz-logo-orange) 34%, var(--hz-brand-blue) 70%, var(--hz-brand-cyan) 100%);
  --hz-spectrum-wash-from: rgba(26, 107, 255, .16);
  --hz-spectrum-wash-to:   rgba(0, 200, 255, .12);
  --hz-spectrum-wash: linear-gradient(135deg, var(--hz-spectrum-wash-from) 0%, var(--hz-spectrum-wash-to) 100%);
  --hz-spectrum-wash-base: var(--hz-surface-fill);
  --hz-spectrum-glow: 0 24px 56px -28px rgba(26, 107, 255, .55);

  /* A person's default avatar — the Harizma mark (the 30 dots of
     public/icons/favicon.svg as exact <circle>s, 1.7 KB instead of 7) on a
     surface disc. Inline, so a tile paints it with no request and nothing to
     fail. Used by .av-person (app.css) through AvatarStore (avatar.js);
     tests/unit/design-system/avatar-person.test.js keeps it equal to the logo. */
  /* The medal's earned seal (.hz-medal, atoms.css): the check's ink on the gold
     coin — dark on warm in both themes. */
  --hz-medal-seal-ink: #2A1A00;

  --hz-avatar-person-bg:   var(--hz-surface-raised);
  --hz-avatar-person-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='50 50 500 500'%3E%3Ccircle cx='300' cy='403.9' r='18.7' fill='%23FF6725'/%3E%3Ccircle cx='201.2' cy='332.1' r='11.5' fill='%235549F5'/%3E%3Ccircle cx='238.9' cy='216' r='9.9' fill='%23FE1E62'/%3E%3Ccircle cx='348.1' cy='221' r='25.6' fill='%23FF6725'/%3E%3Ccircle cx='392.8' cy='326.1' r='26.4' fill='%237F49F5'/%3E%3Ccircle cx='282' cy='451.8' r='19.8' fill='%23FF7E0E'/%3E%3Ccircle cx='208.4' cy='426.1' r='19.4' fill='%237F49F5'/%3E%3Ccircle cx='151.8' cy='348.2' r='7.9' fill='%23FE1E62'/%3E%3Ccircle cx='151.8' cy='251.8' r='10.7' fill='%23FF6725'/%3E%3Ccircle cx='201.4' cy='180.9' r='12.1' fill='%237F49F5'/%3E%3Ccircle cx='296' cy='148.2' r='28' fill='%23FE1E62'/%3E%3Ccircle cx='391.6' cy='173.9' r='29.4' fill='%23FF7E0E'/%3E%3Ccircle cx='447.1' cy='249.8' r='5.7' fill='%235549F5'/%3E%3Ccircle cx='448.2' cy='348.2' r='24.6' fill='%23FE1E62'/%3E%3Ccircle cx='387.6' cy='422.1' r='34.7' fill='%23FF7E0E'/%3E%3Ccircle cx='299' cy='506.8' r='27' fill='%235549F5'/%3E%3Ccircle cx='215.5' cy='489.8' r='11.9' fill='%23FE1E62'/%3E%3Ccircle cx='145.6' cy='439' r='25.6' fill='%23FF7E0E'/%3E%3Ccircle cx='102.4' cy='364.2' r='35.7' fill='%235549F5'/%3E%3Ccircle cx='93.4' cy='278.3' r='32' fill='%23FE1E62'/%3E%3Ccircle cx='120.1' cy='196.1' r='19.7' fill='%23FFB30E'/%3E%3Ccircle cx='177.9' cy='131.9' r='24.2' fill='%235549F5'/%3E%3Ccircle cx='256.8' cy='96.8' r='27.5' fill='%23FE1E62'/%3E%3Ccircle cx='343.2' cy='96.8' r='26.9' fill='%23FFB30E'/%3E%3Ccircle cx='422.1' cy='131.9' r='10.6' fill='%235549F5'/%3E%3Ccircle cx='479.9' cy='196.1' r='21.7' fill='%23FE1E62'/%3E%3Ccircle cx='506.6' cy='278.3' r='10.1' fill='%23FF7E0E'/%3E%3Ccircle cx='498.6' cy='359.2' r='33.5' fill='%235549F5'/%3E%3Ccircle cx='454.4' cy='439' r='19.3' fill='%23FE1E62'/%3E%3Ccircle cx='385.5' cy='490.8' r='29' fill='%23FFB30E'/%3E%3C/svg%3E");

  /* Borders */
  --hz-border:        rgba(255, 255, 255, .055);
  --hz-border-strong: rgba(255, 255, 255, .100);
  /* The width of a HAIRLINE RULE — a divider between rows, not the edge of a
     control. It has its own token because the app re-points the button
     register (--hz-btn-border-width) to 0 in app.css: a rule that borrowed the
     button's width therefore rendered as nothing at all. */
  --hz-rule-width:    1px;

  /* Text */
  --hz-text:        var(--hz-text-dark-1);
  --hz-text-muted:  var(--hz-text-dark-2);
  --hz-text-subtle: var(--hz-text-dark-3);
  --hz-text-onbrand: #FFFFFF;
  /* meta — the AA-compliant colour for timestamps / counts / tiny status. Distinct
     from -subtle (#363658), which is decorative-only and fails contrast as text.
     ~5:1 on the dark canvas. */
  --hz-text-meta:   #9292A8;

  /* Brand — the product app is BLUE in both themes (dark tuned brighter for the
     midnight canvas, light per the Harizma house style). There is no second
     accent hue: --accent, every CTA, the AI actions and Plus all read blue. */
  --hz-brand:       var(--hz-blue-500);
  --hz-brand-2:     var(--hz-blue-400);
  --hz-brand-glow:  rgba(74, 141, 255, .22);
  /* Branded hairline — a stronger brand-tinted border for interactive
     hover/selected states (e.g. a card lifting on hover). Sits between the
     neutral --hz-border-strong and a solid --hz-brand rule. Theme-aware so it
     tracks the register's hue (blue) instead of being hardcoded. */
  --hz-brand-border: rgba(74, 141, 255, .30);
  --hz-brand-soft:  rgba(74, 141, 255, .10);
  /* The PRIMARY fill (.hz-btn--primary, and every surface that fills a
     control with the brand): the action blue pair, which carries a white
     label at ≥ 4.6:1 in both themes. Identical in light — one primary look. */
  --hz-action-gradient: linear-gradient(135deg, var(--hz-blue-action) 0%, var(--hz-blue-action-2) 100%);
  --hz-brand-gradient: var(--hz-action-gradient);
  /* AI accent gradient — the fill on every "AI" action (Notes AI button,
     floating-toolbar AI, mobile accessory AI): the marine brand blue into a
     deep sky, so an AI action reads as the same blue family as every other
     action while staying recognisable. Both stops hold a white glyph at
     ≥ 4.5:1. Theme-invariant, so it lives only in :root. */
  --hz-ai-gradient: linear-gradient(135deg, var(--hz-brand-blue) 0%, #0B7BC4 100%);
  /* The AI family's channels — a tint, rail or label that says "AI did/will
     do this" (notes previews, the thinking pill): rgba(var(--hz-ai-rgb), a). */
  --hz-ai-rgb: 26, 107, 255;
  /* Plus — the subscription's own colour: ONE solid accent, no gradients,
     glows or sheen (the product's paid surfaces read as calm and trustworthy,
     not as a promo). The accent is the product blue.
       -fill   the FILL that carries white text (the CTA, the chosen radio):
               the action blue, 5.9:1 under #fff (WCAG AA). Theme-invariant. */
  --hz-plus-fill: #0F5CD9;
  /* Plus surface — what the .hz-plus-* atoms (atoms.css) are made of. Themed.
       -ink          the accent as TEXT (badge, header CTA, figures): AA on
                     the canvas and on -soft.
       -soft         a tinted fill behind -ink (the badge, the header CTA);
                     -soft-hover its pressed/hover step.
       -surface      the chosen card / Plus card: a flat faint blue wash.
       -border       the card's hairline.
       -tile/-tile-border  a quiet cell (plan cards at rest, the upgrade row).
       -hue-*        icon chips: the Stars hue (amber — the currency) and ONE
                     accent for every other kind; no rainbow of hues.
       -chip-mix     how much of the hue tints the chip behind the icon. */
  --hz-plus-ink: #8DB8FF;
  --hz-plus-soft: rgba(74,141,255,.16);
  --hz-plus-soft-hover: rgba(74,141,255,.26);
  --hz-plus-surface: rgba(74,141,255,.08);
  --hz-plus-border: rgba(90,155,255,.40);
  --hz-plus-tile: color-mix(in srgb, var(--hz-text) 4%, transparent);             /* a film of the text colour */
  --hz-plus-tile-border: rgba(90,155,255,.22);
  --hz-plus-tile-shadow: none;
  --hz-plus-hue-stars: #FFB30E;
  --hz-plus-hue-text:  #8DB8FF;
  --hz-plus-hue-image: #8DB8FF;
  --hz-plus-hue-video: #8DB8FF;
  --hz-plus-hue-sound: #8DB8FF;
  --hz-plus-hue-voice: #8DB8FF;
  --hz-plus-hue-life:  #8DB8FF;
  --hz-plus-chip-mix: 16%;
  /* Invite register (the invite sheet's seats + link row, .hz-seats /
     .hz-link-copy in atoms.css). The reward IS the currency, so the
     register is the Stars hue (--hz-plus-hue-stars), never a new colour:
       -ink     the amount as TEXT ("+10" in an empty seat): AA on -soft, -tint
       -soft    a tinted fill behind the ink (the "+N" seat)
       -tint    the faint fill of an empty seat
       -border  the dashed outline of an empty seat; ≥ 3:1 is not required —
                the "+10" inside carries the meaning, the outline only groups. */
  --hz-invite-ink:    var(--hz-warning-ink);
  --hz-invite-soft:   rgba(255, 179, 14, .14);
  --hz-invite-tint:   rgba(255, 179, 14, .06);
  --hz-invite-border: rgba(255, 179, 14, .36);
  /* The chosen plan card's edge (.hz-plan[aria-checked="true"], atoms.css):
     a graphic that must read ≥ 3:1 against the canvas (WCAG 1.4.11) — the
     selection is never colour alone (the filled check carries it too). Themed. */
  --hz-plus-selected: #5A9BFF;

  /* ── Ink: the same colours, tuned to be READ ─────────────────────────────
     A hue picked to work as a fill is not automatically legible as 12px text
     on the surface beneath it, and light mode is where that bites: the brand
     blue reads 3.2:1 on white, the amber 3.5:1 — both below WCAG AA for normal
     text. So each carries a text-weight variant, exactly as --hz-text-meta
     exists beside the decorative-only --hz-text-subtle.

     In DARK the ink IS the hue (already 5.8:1–10.6:1 on the panel surfaces),
     so nothing shifts; the light block below darkens each until it clears AA
     both on the surface and on its own soft tint. --hz-brand-ink-2 is the
     second gradient stop, so a filled brand button can be re-pointed as a pair
     and still carry white text at AA. Use these for TEXT, icons and hairlines
     that must be read; keep the plain hue for large fills and chart marks. */
  --hz-brand-ink:    var(--hz-brand);
  /* The brand one step deeper — a selected row's name, a pressed CTA, the
     darker stop of a brand icon. Same in both themes. */
  --hz-brand-deep:   var(--hz-blue-600);
  /* NOT --hz-brand-2: that stop is a highlight chosen to look good, and white
     text on it is 2.8:1 — under even the 3.0 bar this system sets for on-brand
     text. A surface that fills a control with the ink pair gets a flat brand in
     dark rather than a gradient it cannot letter. */
  --hz-brand-ink-2:  var(--hz-brand);
  --hz-success-ink:  var(--hz-success);
  --hz-warning-ink:  var(--hz-warning);
  --hz-danger-ink:   var(--hz-danger);

  /* Focus ring */
  --hz-focus-ring: rgba(74, 141, 255, .55);

  /* Roles */
  --hz-p2p:        var(--hz-green-500);
  --hz-p2p-soft:   rgba(37, 208, 126, .10);
  --hz-p2p-border: rgba(37, 208, 126, .22);
  --hz-agent:        var(--hz-pink-400);
  --hz-agent-ink:    var(--hz-agent);            /* dark: the accent itself reads 6.4:1 on its tint */
  --hz-agent-soft:   rgba(232, 121, 166, .10);
  --hz-agent-border: rgba(232, 121, 166, .22);
  --hz-group:        var(--hz-amber-400);
  --hz-group-soft:   rgba(248, 183, 74, .10);
  --hz-group-border: rgba(248, 183, 74, .22);

  /* Status — the ink, and the two tints every status treatment is built from.
     A status badge, a call-out, a meter or a banner needs three values (ink,
     fill, hairline) and only the ink existed here, so every surface that wanted
     a tinted success/warning/danger invented its own rgba() — the operator
     panels had four, notes had five. Declared once, flipped for light below, so
     a status treatment is a token lookup rather than a colour decision. */
  --hz-warning: var(--hz-amber-400);
  --hz-danger:  var(--hz-red-400);
  --hz-success: var(--hz-green-500);
  --hz-success-soft:   rgba(37, 208, 126, .12);
  --hz-success-border: rgba(37, 208, 126, .26);
  --hz-warning-soft:   rgba(248, 183, 74, .14);
  --hz-warning-border: rgba(248, 183, 74, .28);
  --hz-danger-soft:    rgba(244, 115, 115, .12);
  --hz-danger-border:  rgba(244, 115, 115, .26);
  /* One step up from -soft: the hover/pressed fill of a soft danger control. */
  --hz-danger-strong-soft: rgba(244, 115, 115, .20);
  /* The un-status: a neutral tint for "none / not started / unknown", so an
     absent state is a real treatment rather than a missing one. */
  --hz-neutral-soft:   rgba(146, 146, 168, .14);
  --hz-neutral-border: rgba(146, 146, 168, .24);

  /* Outgoing chat bubble — LEGACY: this name predates the chat register (app.css
     aliases it as --out). It is NOT the message bubble (that is --hz-bubble-out-bg
     below), and it flips to the light Telegram green in light, so a BUTTON must
     never fill with it: .ob-logo / .il-accept read --hz-action-gradient. */
  --hz-bubble-out: linear-gradient(148deg, #5240E8 0%, #7665FF 55%, #6858F0 100%);

  /* ─── Chat & Messaging — message-thread bubble register ───────────────────
     The thread has ONE bubble component: `.bub` inside a `.mg.{out,in,ag}`
     wrapper, with direction/role/state variants. These tokens are the single
     source for its surface, geometry, type and state colours. Theme-variant
     values flip in the [data-theme="light"] block, so the bubble rules need
     (almost) no per-theme override. Radii stay on the shared --hz-radius-* scale.
     Values below are DARK. */
  /* Suffixes are CSS-property-aligned: `-bg`, `-color`, `-shadow`, `-radius`,
     `-font-size`, `-line-height`, `-letter-spacing` — matching the text-bearing
     --hz-input-* register (`-color` / `-font-size`). NOTE: the older --hz-btn-* /
     --hz-pill-* registers predate this and use `-fg` / `-tracking`; this register
     deliberately standardises on the CSS-property names (self-consistent, unambiguous)
     and is the template the staged --hz-chatlist-* / composer registers should copy —
     new chat registers follow THIS convention, not the older `-fg` / `-tracking` one. */
  /* Outgoing (me) — the user's signature electric gradient. The chat BUBBLE is
     deliberately outside the one-blue rule (the product's chosen bubble look;
     no-violet.test.js exempts the --hz-bubble-* register and in-bubble rules). */
  --hz-bubble-out-bg:            linear-gradient(135deg, #7B5BFF 0%, var(--hz-accent-pink) 100%);
  --hz-bubble-out-color:         #fff;
  --hz-bubble-out-shadow:        0 6px 22px rgba(123, 91, 255, .32);
  /* The bubble's own violet for a glyph or ring drawn INSIDE a chat bubble (the
     voice clip's play glyph, the image-job spinner): the retired ramp's 500,
     kept here because the bubble keeps its look. Never for chrome. */
  --hz-bubble-violet:            #7968FF;
  /* The @mention chip register (app.css .grp-tag / .ag-mention): in our own bubble, white on the gradient. */
  --hz-mention-out-ink:          rgba(255, 255, 255, .95);
  --hz-mention-out-bg:           rgba(255, 255, 255, .22);
  /* Incoming (a person, P2P) — soft raised pill, borderless. */
  --hz-bubble-in-bg:             var(--hz-surface-raised);
  --hz-bubble-in-color:          var(--hz-text);
  --hz-bubble-in-shadow:         none;
  /* Agent (AI) — bubbleless plain text directly on the canvas. */
  --hz-bubble-agent-color:       var(--hz-text);
  /* The thread — the ground of every chat, on the web (.mw) and in the apps
     (android/ HzThreadBackground): a quiet wash from --hz-thread-bg to
     --hz-thread-bg-end, and over it "Pixel Life" (thread-pattern.json, drawn by
     scripts/generate-thread-pattern.js): 8-bit lifestyle sprites around the
     mascot cat, each in a logo hue at a quiet strength (--hz-thread-hue-*). A
     person's words sit in their bubble (--hz-bubble-in-bg); an agent's reply sits
     on a card of its own (--hz-thread-reply-bg), so no line of text ever runs
     over the sprites. */
  --hz-thread-bg:                #1A1A3C;
  --hz-thread-bg-end:            var(--hz-surface-canvas);
  --hz-thread-wash:              linear-gradient(165deg, var(--hz-thread-bg) 0%, var(--hz-thread-bg-end) 100%);
  /* The sprites' inks, hue and strength per theme. On dark the ink is the logo hue
     itself, saturated, at a third of its strength: a PALE ink at that strength
     composites to grey-brown on navy (the hue drowns in the wash), while the
     saturated one lands on a dark, hue-true shade the bubbles still sit clearly
     in front of, and that the meta ink clears at AA (contrast.test.js). */
  --hz-thread-hue-pink:          rgba(232, 17, 67, .32);
  --hz-thread-hue-orange:        rgba(198, 73, 4, .32);
  --hz-thread-hue-amber:         rgba(151, 103, 0, .32);
  --hz-thread-hue-blue:          rgba(74, 141, 255, .32);
  --hz-thread-hue-sky:           rgba(40, 170, 235, .30);
  --hz-thread-reply-bg:          var(--hz-bubble-in-bg);
  /* What sits on the pattern itself — a bubble's time, a group sender's name, "(stopped)" —
     holds AA over any sprite at either end of the wash (contrast.test.js). */
  --hz-thread-meta-ink:          #B8B8CC;
  /* Geometry + type. Each dimension that tightens on small/compact viewports has a
     matching `-dense` variant, so the whole compact bubble is describable from the
     register alone (no reaching past it to the raw scale). Radii stay on --hz-radius-*. */
  --hz-bubble-radius:            var(--hz-radius-20);
  --hz-bubble-radius-dense:      var(--hz-radius-18);  /* body corner, compact breakpoints */
  --hz-bubble-tail:              var(--hz-radius-8);
  --hz-bubble-tail-dense:        var(--hz-radius-4);   /* declared on the compact `.bub` rule
     (0,3,0) but SHADOWED by the base tail longhands `.mg.{out,in} .mr:… .bub` (0,5,0), so
     the painted tail stays --hz-bubble-tail (8px) at every width. Preserved verbatim from
     the pre-migration code (which had the same inert radius-4 in the same slot) — the tail
     never actually tightens today; activating it is a deliberate visual change for later. */
  --hz-bubble-pad:               12px 18px;
  --hz-bubble-pad-dense:         10px 14px;
  --hz-bubble-font-size:         15px;
  --hz-bubble-line-height:       1.56;
  --hz-bubble-line-height-dense: 1.55;                 /* compact breakpoints */
  --hz-bubble-emoji-font-size:   42px;                 /* a message of 1–3 emoji, drawn without its bubble (fmt.js _isEmojiOnly) */
  --hz-bubble-emoji-line-height: 1.2;
  --hz-bubble-letter-spacing:    -.005em;
  --hz-bubble-agent-font-size:   16px;
  --hz-bubble-agent-line-height: 1.72;
  /* Media column — the width of a picture inside a bubble, and the rim of bubble
     surface painted around it. These two are the ONLY source of truth for image
     geometry in the thread: app.css derives the media bubble's own max-width from
     them (column + 2 rims), so a picture can never be wider than the bubble that
     carries it. Re-pointed per breakpoint in app.css (tablet / desktop / wide);
     the value here is the phone one. */
  --hz-bubble-media-width:       min(280px, 68vw);
  --hz-bubble-media-pad:         10px;

  /* ── Navigation — ONE system, three registers ─────────────────────────────
     The app has two nav shapes — the ≥641px top BAR and the phone tab bar, a
     floating glass LENS — and they must read as one system. So:
       --hz-navitem-*  the item states BOTH shapes share: ink (inactive glyph
                       + label), active (the ONE tint of the selected item),
                       lens (the pill behind it), press (hover / press wash).
                       Same selected look on a phone, an iPad and a desktop.
       --hz-nav-*      the top bar's surface (bg · border · shadow · glow) and
                       the primary nav action's solid fill, --hz-nav-action
                       (the wide screen's sidebar New chat button).
       --hz-tabbar-*   the floating lens's surface, which has to be far more
                       transparent than a bar to read as glass at all.
     Every one flips in the [data-theme="light"] block — no consumer forks. */
  --hz-nav-bg:       rgba(10, 10, 22, .82);
  --hz-nav-border:   rgba(255, 255, 255, .11);
  --hz-nav-shadow:   none;
  --hz-nav-glow:     radial-gradient(ellipse 60% 120% at 50% 0%, rgba(74, 141, 255, .055) 0%, transparent 100%);
  /* The action fill carries a WHITE LABEL ("New chat", 14px/600), so it must
     hold text contrast, not just icon contrast: #0F5CD9 is 5.9:1 with white —
     and it is the light theme's selected-tab tint, so light has one blue.
     Theme-invariant on purpose: dark's #6AA8FF tint is 2.4:1 with white, and
     a lighter dark-only fill (#2F7BF6, 4.0:1) would fail AA for the label. */
  --hz-nav-action:   #0F5CD9;   /* = --hz-blue-action (a literal: the nav tests read it) */

  /* The Profile button (.hz-me, app.css): the member's avatar beside the
     plan pill, in the top bar and the phone chat list's head. Sized to that
     pill (.npp is 30px on the bar, 34px on a phone) so the two read as one
     account cluster; its resting ring is the pill's own brand edge. Selected
     — their profile on screen — it takes --hz-navitem-active like a tab. */
  --hz-nav-me-size:       30px;
  --hz-nav-me-size-phone: 34px;
  --hz-nav-me-ring:       color-mix(in srgb, var(--hz-brand) 38%, transparent);

  /* ink at label contrast: the old 35% grey measured 2.5:1 and read as
     disabled. active is 5.1:1 on the lens (AA for a 10px label). */
  --hz-navitem-ink:    rgba(255, 255, 255, .80);
  --hz-navitem-active: #6AA8FF;
  --hz-navitem-lens:   rgba(255, 255, 255, .12);
  --hz-navitem-press:  rgba(255, 255, 255, .08);

  /* Phone tab bar surface (iOS 26 pattern: one glass capsule of tabs). The
     composer docked in the phone chat list wears the same glass (home.css).
       glass   — the tinted fill the backdrop blur shows through
       solid   — the same surface, opaque: where the platform cannot blur or
                 the user asked for reduced transparency
       rim     — hairline edge; shadow carries the drop + both inner highlights
       sheen   — the specular gradient painted over the fill
       badge   — system red count badge */
  --hz-tabbar-glass:   rgba(38, 38, 50, .56);
  --hz-tabbar-solid:   #1E1E28;
  --hz-tabbar-rim:     rgba(255, 255, 255, .13);
  --hz-tabbar-sheen:   linear-gradient(180deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 55%);
  --hz-tabbar-shadow:  0 12px 32px rgba(0, 0, 0, .42), 0 2px 8px rgba(0, 0, 0, .28),
                       inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(255, 255, 255, .04);
  --hz-tabbar-badge:   #FF453A;

  /* Elevation (shadows read differently per theme → semantic) */
  --hz-shadow-sm: 0 2px 6px rgba(0, 0, 0, .30), 0 1px 2px rgba(0, 0, 0, .28);
  --hz-shadow-md: 0 8px 24px rgba(0, 0, 0, .40);
  --hz-shadow-lg: 0 20px 48px rgba(0, 0, 0, .55);
  --hz-shadow-brand: 0 8px 20px rgba(74, 141, 255, .28);

  /* ── Elevation BLEED — how far each shadow above actually paints OUTSIDE
     its own box. A shadow is drawn by the element but lands on its
     neighbours' ground, so anything that clips has to reserve room for it: a
     scroll container clips at its PADDING box, an element with a mask clips
     at its BORDER box, and `overflow: hidden` clips at the padding box too. A
     container that reserves nothing does not soften the shadow — it
     guillotines every child's shadow along the same straight line, which
     reads as one hard-edged rectangle behind the row rather than as cards
     that float.

     These are MEASURED, not derived. The obvious arithmetic — blur/2 past the
     shadow rectangle, shifted by the y-offset — is what the spec describes as
     the transition width, and it is far short of what a browser paints: the
     blur is a Gaussian, and its tail stays above the 1/255 quantisation step
     out to roughly the full blur radius. For --hz-shadow-md (24px blur) the
     arithmetic says 12px to the side; Chromium paints 20. Reserving the
     arithmetic leaves a visible hard step exactly where the fix was supposed
     to remove one. Numbers below are the distance at which the shadow comes
     within a single 1/255 step of the flat surface behind it, rounded up —
     i.e. the point where clipping it can no longer draw an edge. Measured on
     the real card, not a swatch: a wider box casts a longer tail, so a
     synthetic probe under-reads.

     One register, not one per theme: the LIGHT values are used, because they
     are the larger of the two (a low-alpha shadow over a light ground has a
     much longer visible tail than a heavy one over near-black — md needs 25px
     below in light against 17px in dark). Forking them per theme would make
     every shelf change height when the theme flips. */
  --hz-shadow-sm-bleed-top:     2px;
  --hz-shadow-sm-bleed-x:       4px;
  --hz-shadow-sm-bleed-bottom:  6px;
  --hz-shadow-md-bleed-top:    10px;
  --hz-shadow-md-bleed-x:      18px;
  --hz-shadow-md-bleed-bottom: 25px;
  --hz-shadow-lg-bleed-top:    14px;
  --hz-shadow-lg-bleed-x:      33px;
  --hz-shadow-lg-bleed-bottom: 57px;

  /* A shelf arrow floats OVER the cards, so it cannot borrow the card's own
     surface: in dark that is --hz-surface-raised for both, and the control
     dissolves into the card behind it with only a hairline left. One step
     further up the ink scale separates them. Light already separates them —
     a white control over a white card is told apart by its shadow — so there
     the card surface is exactly right. */
  --hz-shelf-arrow-bg:     var(--hz-ink-750);
  --hz-shelf-arrow-border: var(--hz-border-strong);

  /* App frosted/elevated surfaces — the "two intensities" elevation model made
     explicit: dark relies on a translucent tint + backdrop blur; light drops the
     blur for an opaque fill + a hairline drop-shadow. Values below are DARK; the
     [data-theme="light"] block flips each. Components read these tokens and need
     NO per-theme override. (Header/composer border-bottom already flips via
     --hz-border, so it is not re-tokenised here.) */
  --hz-surface-chathdr:  rgba(9, 9, 22, .90);
  --hz-chathdr-blur:     blur(32px) saturate(1.9);
  --hz-chathdr-shadow:   0 1px 0 rgba(255, 255, 255, .04);
  --hz-surface-panelhdr: rgba(9, 9, 22, .92);          /* settings + agent-market headers */
  --hz-panelhdr-blur:    blur(24px);
  --hz-panelhdr-shadow:  none;
  --hz-surface-composer:    rgba(8, 8, 20, .82);
  --hz-composer-blur:       blur(16px) saturate(1.6);
  --hz-composer-border-top: 1px solid rgba(255, 255, 255, .06);
  /* Notes editor sub-surfaces — the formatting bar under the toolbar, a frost
     distinct from chathdr/panelhdr (lighter tint), so it gets its own pair. */
  --hz-surface-fmtbar:   rgba(9, 9, 22, .72);
  --hz-fmtbar-blur:      blur(20px) saturate(1.6);
  /* Notes mobile keyboard accessory bar — completes the family above (chathdr /
     fmtbar); it follows the composer model (light drops the blur for an opaque
     fill). */
  --hz-surface-accbar:   rgba(9, 9, 22, .93);
  --hz-accbar-blur:      blur(20px) saturate(1.6);
  /* Full-screen app panel canvases */
  --hz-surface-panel-settings: var(--hz-surface-canvas);
  --hz-surface-panel-onboard:  var(--hz-surface-canvas);
  --hz-surface-panel-store:    var(--hz-surface);

  /* Elevated cards + modal scrim — the light half of the elevation model swaps
     the bordered dark card for a borderless one with a softer shadow, and lifts
     the modal scrim. Values below are DARK; [data-theme="light"] flips them.
     (Card/modal/toast BACKGROUND already flips via var(--surface); only the
     border + shadow are re-tokenised here.) */
  --hz-overlay-scrim:    rgba(0, 0, 0, .6);
  --hz-overlay-blur:     blur(12px);
  --hz-elevation-border: 1px solid var(--hz-border-strong);   /* modal / sp-card / ob-card */
  --hz-modal-shadow:     0 24px 80px rgba(0, 0, 0, .55), 0 4px 16px rgba(0, 0, 0, .25);
  --hz-toast-shadow:     0 12px 44px rgba(0, 0, 0, .65), 0 2px 8px rgba(0, 0, 0, .3);
  --hz-spcard-shadow:    none;
  --hz-obcard-shadow:    0 24px 80px rgba(0, 0, 0, .7);

  /* Media viewer — the full-screen post viewer (#feedLightbox: Feed, public
     profiles, shared-post links). Media reads best on a dark stage, so these
     are THEME-INVARIANT on purpose: there is no [data-theme="light"] override,
     exactly like the sheet scrim below. One register instead of the viewer's
     old scatter of rgba literals. */
  --hz-viewer-scrim:         rgba(6, 6, 16, .98);   /* near-opaque: no ghost of the screen below */
  --hz-viewer-surface:       rgba(255, 255, 255, .07);   /* cards, icon buttons */
  --hz-viewer-surface-hover: rgba(255, 255, 255, .14);
  --hz-viewer-border:        rgba(255, 255, 255, .10);
  --hz-viewer-ink:           #F4F4FB;                    /* primary text on the stage */
  --hz-viewer-ink-2:         rgba(244, 244, 251, .66);   /* secondary: handle, meta */
  --hz-viewer-ink-3:         rgba(244, 244, 251, .42);   /* tertiary: counters, labels */
  --hz-viewer-media-shadow:  0 18px 60px rgba(0, 0, 0, .6);
  /* The profile-photo crop editor (utils/avatar-editor.js) sits on the same
     dark stage: the photo outside the crop circle stays legible but dimmed, and
     the circle's edge reads against any photo. */
  --hz-viewer-crop-dim:      rgba(6, 6, 16, .62);
  --hz-viewer-crop-ring:     rgba(255, 255, 255, .88);

  /* Stories — the row above the chat list and its full-screen viewer
     (public/css/stories.css, public/js/stories/). A story is drawn on its
     author's own gradient, so like the media viewer above these are
     THEME-INVARIANT on purpose: white ink on a dark-veiled colour field reads
     the same in both themes and in the Telegram host. The row's ring-cut and
     badge borders use var(--hz-surface-canvas), so they still follow the theme. */
  --hz-story-z:               9350;                      /* above panels, below HzSheet (9400) */
  --hz-story-tile-w:          72px;                      /* one row tile: ring + two-line label */
  --hz-story-ring-size:       64px;
  --hz-story-ring-pad:        3px;                       /* the unwatched gradient's thickness */
  --hz-story-ring-pad-seen:   2px;
  --hz-story-ring:            conic-gradient(from 210deg, var(--hz-brand), var(--hz-brand-cyan), var(--hz-brand-blue), var(--hz-brand));
  --hz-story-ring-seen:       var(--hz-border-strong);
  --hz-story-ring-cut:        2.5px;                     /* canvas gap between ring and face */
  --hz-story-ring-cut-seen:   3px;
  --hz-story-face-glyph:      26px;                      /* emoji avatar inside the ring */
  --hz-story-badge-size:      22px;
  --hz-story-badge-border:    2px;
  --hz-story-badge-nudge:     -2px;                      /* sits on the ring's edge */
  --hz-story-label-leading:   1.25;
  --hz-story-stage:           var(--hz-ink-900);         /* behind the card on a phone */
  --hz-story-stage-wide:      rgba(5, 5, 12, .88);       /* behind the 9:16 card on wide screens */
  --hz-story-card:            #0B0B14;                   /* shows only before the gradient paints */
  --hz-story-ink:             var(--hz-text-onbrand);
  --hz-story-veil:            var(--hz-pick-veil);       /* one veil with the Picks card: the words sit at the bottom on both */
  --hz-story-track:           rgba(255, 255, 255, .35);  /* progress bar, unplayed part */
  --hz-story-bar-h:           3px;
  --hz-story-head-av:         34px;
  --hz-story-head-av-glyph:   16px;
  --hz-story-hairline:        1.5px solid rgba(255, 255, 255, .7);
  --hz-story-icon:            22px;
  --hz-story-focus:           2px solid var(--hz-text-onbrand);
  --hz-story-focus-offset:    2px;
  --hz-story-menu-w:          200px;
  --hz-story-menu-bg:         rgba(16, 16, 32, .96);
  --hz-story-menu-shadow:     0 12px 32px rgba(0, 0, 0, .4);
  --hz-story-portrait:        124px;
  --hz-story-portrait-glyph:  54px;
  --hz-story-portrait-border: 3px solid rgba(255, 255, 255, .82);
  --hz-story-portrait-shadow: 0 16px 40px -14px rgba(0, 0, 0, .6);
  --hz-story-pbadge-size:     36px;
  --hz-story-pbadge-glyph:    18px;
  --hz-story-pbadge-border:   3px solid rgba(255, 255, 255, .88);
  /* The growth story (stories/view.js growthHtml): a ring that shows a number, and its three slides */
  --hz-story-count-size:      17px;                      /* the points on the ring's face */
  --hz-story-count-size-long: 13px;                      /* five characters and more ("12.4K", "1 240") */
  --hz-story-g-ring:          168px;                     /* the level's ring */
  --hz-story-g-track:         rgba(255, 255, 255, .22);
  --hz-story-g-big:           clamp(44px, 13vw, 60px);   /* the slide's one big number */
  --hz-story-g-fig:           clamp(26px, 8vw, 34px);    /* the points the last 30 days brought */
  --hz-story-g-ring-sm:       64px;                      /* the level's ring beside its name, on the shared slide */
  --hz-story-g-deed:          clamp(28px, 5.2vh, 44px);  /* a row of "what you did" */
  --hz-story-g-deed-icon:     28px;
  --hz-story-g-dot:           36px;                      /* a day of the week */
  --hz-story-g-cat:           64px;                      /* the cat beside its line */
  --hz-story-g-hello:         min(56vw, 240px);          /* the cat alone, on a new account's slide */
  /* Picks — the heart ring's card deck (public/css/picks.css) */
  --hz-pick-z:                9360;                      /* beside the story viewer, below HzSheet */
  --hz-pick-card-w:           min(92vw, 420px);
  --hz-pick-card-h:           min(72vh, 640px);
  --hz-pick-card-radius:      28px;
  --hz-pick-card-bg:          var(--hz-ink-900);
  --hz-pick-card-shadow:      0 24px 60px -20px rgba(0, 0, 0, .7);
  --hz-pick-stack-scale:      .94;                       /* the card behind */
  --hz-pick-stack-shift:      14px;
  --hz-pick-swipe-px:         88;                        /* decision distance, px (unitless for JS) */
  --hz-pick-tilt:             14deg;                     /* max card rotation while dragging */
  --hz-pick-stamp-like:       var(--hz-accent-pink);     /* one heart, one colour: the like is pink everywhere (stories --hz-story-like) */
  --hz-pick-stamp-skip:       var(--hz-danger);
  --hz-pick-stamp-go:         var(--hz-brand);
  --hz-pick-btn:              56px;
  --hz-pick-btn-glyph:        24px;
  --hz-pick-ring-lead:        conic-gradient(from 210deg, var(--hz-accent-pink), var(--hz-logo-orange), var(--hz-accent-pink));
  --hz-pick-progress-h:       4px;
  --hz-pick-ask-opt-bg:       var(--hz-navitem-lens);
  --hz-pick-ask-opt-on:       var(--hz-story-track);
  --hz-pick-match-bg:         linear-gradient(145deg, #0F172A 0%, #123A85 55%, #0E7490 100%);
  /* the start deck (First Picks): the hello, the course (the stories row's course gradient), a chosen chip, a quoted line */
  --hz-pick-hello-bg:         linear-gradient(160deg, #0A1838 0%, #0F172A 60%, #123A85 100%);
  --hz-pick-course-bg:        linear-gradient(145deg, #0C2457 0%, #1A4FB5 50%, #22D3EE 100%);
  --hz-pick-chip-bg:          var(--hz-navitem-lens);
  --hz-pick-chip-on:          var(--hz-text-onbrand);
  --hz-pick-chip-on-fg:       var(--hz-ink-900);
  --hz-pick-says-bg:          var(--hz-navitem-lens);
  /* the card's anatomy: a hero (portrait or glyph) up top, the words anchored low over a scrim strong enough for white text on any gradient */
  --hz-pick-veil:             linear-gradient(to bottom, rgba(0, 0, 0, .26), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, .4) 60%, rgba(0, 0, 0, .74));
  --hz-pick-interests-bg:     linear-gradient(150deg, #0A1838 0%, #1A4FB5 52%, #0B7BC4 100%);
  --hz-pick-line:             rgba(255, 255, 255, .3);   /* an unchosen chip or answer: a quiet hairline, not a frame */
  --hz-pick-bubble-bg:        rgba(255, 255, 255, .18);  /* the agent's first words, drawn as the message they will be */
  --hz-pick-hero-sm:          84px;                      /* the hero on a short card (a small phone) */
  --hz-pick-gift-size:        var(--hz-text-3xl);
  /* The onboarding's screens on the Picks stage (public/js/picks/start.js, picks.css .hz-obd-*): the screen's size,
     its ground, the brand art of the welcome screen — the pre-login page's sphere, ribbon and 3D tiles (welcome.css),
     theme-invariant like every story and Picks surface. */
  --hz-start-w:               min(94vw, 440px);
  --hz-start-h:               min(88vh, 720px);
  --hz-start-art-h:           176px;
  --hz-start-gift-size:       clamp(56px, 16vw, 76px);
  --hz-start-bg:              linear-gradient(165deg, #0A1838 0%, #0F172A 55%, #0C2457 100%);
  --hz-start-sphere:          radial-gradient(38% 30% at 34% 24%, rgba(255, 255, 255, .70) 0%, rgba(255, 255, 255, .18) 45%, rgba(255, 255, 255, 0) 70%),
                              radial-gradient(70% 70% at 78% 88%, rgba(255, 170, 230, .45) 0%, rgba(255, 170, 230, 0) 45%),
                              radial-gradient(120% 120% at 28% 22%, #FFC24A 0%, #FF8A1E 16%, #FF5A2A 30%, #FE1E62 52%, #D0198F 76%, #A3127A 100%);
  --hz-start-sphere-shadow:   inset -18px -26px 50px rgba(120, 10, 70, .28), 0 40px 80px -30px rgba(254, 30, 98, .4);
  --hz-start-ribbon:          radial-gradient(closest-side, transparent calc(100% - 26px * .72), rgba(255, 255, 255, .55) calc(100% - 26px * .62), transparent calc(100% - 26px * .45)),
                              linear-gradient(120deg, rgba(255, 190, 230, .95) 0%, rgba(255, 95, 174, .92) 35%, rgba(227, 59, 200, .88) 62%, rgba(255, 138, 61, .85) 100%);
  --hz-start-accent:          linear-gradient(90deg, var(--hz-accent-cyan) 0%, var(--hz-blue-300) 45%, var(--hz-accent-pink) 100%);   /* the accent words of a screen's title (**…**) */
  --hz-start-tile-face:       linear-gradient(160deg, #FFFFFF 0%, #F2F3F7 55%, #E4E6EE 100%);
  --hz-start-tile-shadow:     inset 0 1px 1px rgba(255, 255, 255, .95), inset 0 -2px 3px rgba(0, 0, 0, .05), 0 1px 0 #DDE0E8, 0 2px 0 #DDE0E8, 0 3px 0 #D0D4DE, 0 4px 0 #D0D4DE, 0 5px 0 #D0D4DE, 0 22px 30px -8px rgba(0, 0, 0, .55);
  /* The illustrations' palette (picks.css .hz-obd-art, Android StartFlowScreen — both draw from these): the soft light
     behind each composition (brand blue; warm pink for the intro's sphere; gold for the gift), the gift's gold in its
     light and its shade, the floor shadow every drawing stands on, the drawings' blues. Plain colours, never a
     color-mix(): a gradient stop that fails to resolve draws black. */
  --hz-start-glow:            rgba(74, 141, 255, .34);
  --hz-start-glow-warm:       rgba(255, 77, 157, .26);
  --hz-start-glow-gold:       rgba(245, 180, 0, .22);
  --hz-start-gold-hi:         var(--hz-amber-400);
  --hz-start-gold-shade:      var(--hz-amber-600);
  --hz-start-floor:           rgba(0, 0, 0, .37);
  /* The drawings' blues, light to deep: the gift's lid and box, the folder's face and back, the bubble's lines. */
  --hz-start-blue-hi:         var(--hz-blue-400);
  --hz-start-blue:            var(--hz-blue-600);
  --hz-start-blue-deep:       var(--hz-blue-800);
  --hz-start-blue-night:      var(--hz-blue-950);
  --hz-start-line:            var(--hz-blue-300);
  /* The interests survey (public/js/picks/start-view.js .hz-sv-*, Android SurveyScreens): the mascot's world on the
     onboarding's ground — a lit blue edge, the cat's amber on the one button, a soft tile behind each interest's emoji.
     Theme-invariant, as the whole stage is. */
  --hz-survey-edge:           inset 0 0 0 1.5px rgba(96, 165, 250, .55), 0 0 36px -6px rgba(59, 130, 246, .6);
  --hz-survey-cta-bg:         linear-gradient(180deg, #FFC94D 0%, #F7A21B 100%);
  --hz-survey-cta-fg:         var(--hz-ink-900);
  --hz-survey-cta-glow:       0 10px 28px -10px rgba(247, 162, 27, .8);
  --hz-survey-gold:           #FFC94D;                    /* the wave's motion strokes, the cat's sparkle */
  --hz-survey-accent:         linear-gradient(90deg, #FFD36B 0%, #FFA41B 55%, #FF7A1A 100%);   /* a survey title's accent word (the cat's name): the cat's amber */
  --hz-survey-logo-bg:        var(--hz-pick-chip-bg);    /* the round tile behind an interest's emoji: a chip's own lens */
  --hz-survey-logo-on:        rgba(15, 23, 42, .08);      /* the same tile on a chosen (white) chip */
  --hz-survey-row-bg:         var(--hz-navitem-press);   /* a result row: an agent, the door */
  --hz-survey-row-hover:      var(--hz-story-glass);
  --hz-survey-call-bg:        rgba(255, 201, 77, .12);   /* the result's highlighted call: the cat's amber, softly */
  --hz-survey-call-line:      rgba(255, 201, 77, .42);
  --hz-survey-seg-h:          4px;
  --hz-survey-cat-wave:       clamp(180px, 60vw, 270px);  /* the hello's waving cat — the screen's hero */
  --hz-survey-cat-side:       80px;                       /* the sitting cat by a title; the result's corner cat */
  --hz-survey-cat-peek:       84px;                       /* the cat peeking over the foot */
  --hz-story-title-size:      clamp(24px, 6.4vw, 30px);
  --hz-story-title-leading:   1.12;
  --hz-story-title-shadow:    0 2px 14px rgba(0, 0, 0, .25);
  --hz-story-measure:         420px;                     /* prompt card + CTA width cap */
  --hz-story-glass:           rgba(255, 255, 255, .14);  /* the staged-prompt card */
  --hz-story-glass-border:    1px solid rgba(255, 255, 255, .2);
  --hz-story-glass-blur:      blur(10px);
  --hz-story-cta-h:           52px;
  --hz-story-cta-bg:          var(--hz-text-onbrand);
  --hz-story-cta-fg:          var(--hz-ink-900);
  --hz-story-cta-shadow:      0 10px 24px -12px rgba(0, 0, 0, .55);
  --hz-story-card-max-h:      820px;                     /* wide screens: 9:16 up to this height */
  --hz-story-card-shadow:     0 30px 80px rgba(0, 0, 0, .5);
  /* A story with a cover (the result a skill makes): the media fills the card
     and the words sit at the bottom, so the veil darkens the lower half more
     than the plain veil does; the chip over it names what the cover is. */
  --hz-story-cover-veil:      linear-gradient(to bottom, rgba(0, 0, 0, .42), rgba(0, 0, 0, .06) 30%, rgba(0, 0, 0, .18) 55%, rgba(0, 0, 0, .82));
  --hz-story-tag-bg:          rgba(0, 0, 0, .36);
  --hz-story-tag-blur:        blur(8px);
  --hz-story-title-size-long: var(--hz-text-xl);          /* a title over ~34 characters */
  --hz-story-title-lines:     3;
  --hz-story-name-lines:      2;                          /* the header's agent name */
  --hz-story-label-glyph:     14px;                       /* the speech mark on the message card */
  /* The reply bar on an agent's story (write to the agent; the heart = a like: the agent says hi back)
     and the cube the card turns as it goes from one person to the next. */
  --hz-story-reply-bg:        rgba(0, 0, 0, .18);
  --hz-story-reply-border:    1.5px solid rgba(255, 255, 255, .62);
  --hz-story-like:            var(--hz-accent-pink);
  --hz-story-typing-veil:     rgba(0, 0, 0, .55);        /* the story dims while a reply is typed */
  --hz-story-perspective:     1200px;
  --hz-story-burst-size:      96px;                       /* the heart that blooms over a liked story */
  --hz-story-burst-dur:       800ms;
  --hz-story-burst-shadow:    0 8px 24px rgba(0, 0, 0, .35);

  /* Bottom-sheet family — the slide-up action sheets (chip-sheet, subscription,
     stars-topup) share one visual language distinct from the centered .modal:
     a heavier scrim, the page-level --void surface (the sheet blends into the
     bottom of the page rather than reading as a raised card), top-only radius,
     and a drag handle. Deliberately NOT the same as the modal scrim: the modal
     scrim lifts .6→.35 in light, but the sheet scrim + blur stay CONSTANT across
     themes (there is no [data-theme="light"] override on any of the three sheet
     overlays). Surface + handle flip via var(--void)/var(--border); only the
     close-button chip re-tokenises for light below. */
  --hz-sheet-scrim:      rgba(0, 0, 0, .55);
  --hz-sheet-blur:       blur(20px);
  --hz-sheet-surface:    var(--void);
  --hz-sheet-radius:     var(--hz-radius-20);
  --hz-sheet-handle:     var(--border);
  --hz-sheet-close-bg:       rgba(255, 255, 255, .07);
  --hz-sheet-close-bg-hover: rgba(255, 255, 255, .15);

  /* =========================================================================
   * COMPONENT REGISTER — the single contract the atom layer (atoms.css) reads.
   * These are the PRODUCT (default) register: restrained, theme-aware, blue.
   * A surface can re-point this whole block to shift "register" without
   * touching an atom rule — marketing.css does exactly that for its expressive
   * blue register. This is the "one system, two intensities" seam in code.
   * ======================================================================= */
  /* Cookie-consent banner (public/css/cookie-consent.css) — register-aware
     colors so the banner never hardcodes either register's hue, and so its
     text always clears WCAG AA (4.5:1) against the panel background:
       accent — checkbox fill only (not a text-contrast concern).
       link   — the privacy-policy link. --hz-brand-2 (blue-400, #5A9BFF)
                measures 7.0:1 on the product register's raised-card tone;
                the marketing override below uses --cyan (10.02:1) to match
                that register's own established link color convention.
       muted  — small helper text under each toggle. --hz-text-muted (the
                general-purpose token) measures only ~3.8-4.0:1 against this
                panel's specific dark tone — under AA for 13px text — so this
                is its own verified-safe value rather than a re-use. */
  --hz-cookie-accent: var(--hz-brand);
  --hz-cookie-link:   var(--hz-brand-2);
  --hz-cookie-muted:  #91A2BE;
  /* Button */
  --hz-btn-radius:         var(--hz-radius-md);      /* 10 */
  --hz-btn-border-width:   1px;
  --hz-btn-min-h:          var(--hz-tap-min);        /* 44 floor; a register may lower it for desktop density */
  --hz-btn-min-w:          auto;
  --hz-btn-gap:            var(--hz-space-2);        /* 8 */
  --hz-btn-pad-y:          0px;
  --hz-btn-pad-x:          var(--hz-space-5);        /* 20 */
  --hz-btn-weight:         var(--hz-weight-semibold);/* 600 */
  --hz-btn-disabled-opacity: .5;
  --hz-btn-secondary-fg:     var(--hz-text);
  --hz-btn-secondary-bg:     var(--hz-surface-raised);
  --hz-btn-secondary-border: var(--hz-border-strong);
  /* Soft/tinted danger variant (.hz-btn--danger-soft) — reads the semantic
     danger tints above, so the button flips with the theme instead of carrying
     a second, dark-tuned red of its own. */
  --hz-btn-danger-soft-bg:       var(--hz-danger-soft);
  --hz-btn-danger-soft-fg:       var(--hz-danger);
  --hz-btn-danger-soft-border:   var(--hz-danger-border);
  --hz-btn-danger-soft-hover-bg: var(--hz-danger-strong-soft);
  --hz-btn-font-size:      var(--hz-text-md);
  --hz-btn-tracking:       var(--hz-tracking-snug);
  --hz-btn-ease:           var(--hz-ease);
  --hz-btn-primary-shadow: var(--hz-shadow-brand);
  --hz-btn-ghost-bg:            transparent;
  --hz-btn-ghost-border:        transparent;
  --hz-btn-ghost-fg:            var(--hz-text-muted);
  --hz-btn-ghost-hover-bg:      var(--hz-brand-soft);
  --hz-btn-ghost-hover-border:  transparent;
  --hz-btn-ghost-hover-fg:      var(--hz-text);
  --hz-btn-hover-transform:     none;
  --hz-btn-active-transform:    translateY(1px) scale(.99);
  --hz-btn-lg-min-h:       var(--hz-tap-comfort);
  --hz-btn-lg-pad-y:       0px;
  --hz-btn-lg-pad-x:       var(--hz-space-6);
  --hz-btn-lg-font-size:   var(--hz-text-lg);
  /* Card */
  --hz-card-radius:        var(--hz-radius-lg);      /* 14 */
  --hz-card-pad:           var(--hz-space-5);        /* 20 */
  --hz-card-bg:            var(--hz-surface);
  --hz-card-border:        var(--hz-border);
  --hz-card-shadow:        var(--hz-shadow-sm);
  --hz-card-raised-bg:     var(--hz-surface-raised);
  --hz-card-raised-shadow: var(--hz-shadow-md);
  /* Option card (atoms.css .hz-option) — one choice or one action in a short
     list on a sheet: the composer's "Who answers" and "+" sheets. Built on the
     semantic layer, so both themes follow from it: a raised card on the sheet
     surface, the brand edge marking the current choice (never the Plus
     register — that is the paid moment's alone). No tint under the choice: the
     card stays opaque so its hint keeps AA (a 9% brand wash over the light sheet
     took it to 3.7:1); the edge and the filled radio mark carry the state. */
  --hz-option-bg:            var(--hz-surface-raised);
  --hz-option-bg-pressed:    var(--hz-surface-hover);
  --hz-option-border:        var(--hz-border-strong);
  --hz-option-radius:        var(--hz-radius-16);
  --hz-option-tile-bg:       var(--hz-surface-hover);
  --hz-option-selected-edge: var(--hz-brand-ink);   /* a hairline that must be read: ≥ 3:1 in both themes */
  /* Empty state (atoms.css .hz-empty ↔ Android HzEmptyState) — a screen with
     nothing in it yet: the Harizma mark over a soft spectrum halo, one line
     that says what to do, one that says what will appear. The halo is the
     brand's sky at its "soft" strength (a tint in light, a glow in dark), so
     it follows the theme with no override. Lengths are exported to Android. */
  --hz-empty-mark:    64px;                         /* the mark; the halo is twice it */
  --hz-empty-gap:     var(--hz-space-2);            /*  8 — title ↔ body */
  --hz-empty-mark-gap: var(--hz-space-5);           /* 20 — mark ↔ title */
  --hz-empty-pad:     var(--hz-space-8) var(--hz-space-6);
  --hz-empty-measure: 280px;                        /* the text's width: two short lines at most */
  --hz-empty-halo:    radial-gradient(closest-side, var(--hz-spectrum-4-soft), transparent);
  /* Input */
  --hz-input-radius:       var(--hz-radius-md);      /* 10 */
  --hz-input-min-h:        var(--hz-tap-min);        /* 44 floor; a register may lower it for desktop density */
  --hz-input-pad:          0 var(--hz-space-4);      /* 0 16 */
  --hz-input-border-width: 1.5px;
  --hz-input-font-size:    var(--hz-text-md);
  --hz-input-color:        var(--hz-text);
  --hz-input-bg:           var(--hz-surface-raised);
  --hz-input-border:       var(--hz-border-strong);
  /* A placeholder is read (a hint of what to type), so it carries the readable ink — --hz-text-subtle
     is decorative-only (1.5:1 on the dark surfaces; see the Ink note below). */
  --hz-input-placeholder:  var(--hz-text-meta);
  --hz-input-focus-border: var(--hz-brand);
  --hz-input-focus-shadow: 0 0 0 var(--hz-focus-width) var(--hz-brand-soft);
  /* Composer — the message composer shell + its controls. Consumed by BOTH the
     chat bar (.ish) and the home hero (.cmh-composer) so the two read as ONE
     component; only their layout (single-row vs hero card) differs. References
     theme-aware semantics only, so it needs no light-theme override. */
  --hz-composer-radius:        var(--hz-radius-22);
  --hz-composer-bg:            var(--hz-surface-raised);
  --hz-composer-border:        var(--hz-border);
  --hz-composer-border-width:  1px;
  --hz-composer-focus-border:  var(--hz-brand-border);
  --hz-composer-focus-ring:    0 0 0 3px var(--hz-brand-soft);
  --hz-composer-gap:           6px;
  /* Controls — one box size for the send + icon buttons: 40 on a fine pointer
     (dense desktop), 44 (the tap floor) on coarse/touch. */
  --hz-composer-control-size:       40px;
  --hz-composer-control-size-touch: var(--hz-tap-min);            /* 44 */
  /* The controls are read too ("+", the mic, the idle send): the readable ink, 3:1 at least on every composer floor. */
  --hz-composer-icon-color:         var(--hz-text-meta);
  --hz-composer-icon-hover-color:   var(--hz-text);
  --hz-composer-icon-hover-bg:      var(--hz-surface-hover);
  /* Send = filled brand-blue action (unified with every other primary action). */
  --hz-composer-send-bg:            var(--hz-brand);
  --hz-composer-send-fg:            #FFFFFF;
  --hz-composer-send-shadow:        var(--hz-shadow-brand);
  --hz-composer-send-hover-bg:      var(--hz-brand-strong, var(--hz-brand));
  --hz-composer-send-idle-bg:       var(--hz-surface-hover);      /* nothing to send yet */
  --hz-composer-send-idle-fg:       var(--hz-text-meta);
  /* Co-brand lockup — a partner white-label's mark in a logo slot (atoms.css
     .hz-cobrand; partners/whitelabel-shell.js writes it into the slots). Beside
     the wordmark the mark sits at --hz-cobrand-mark-h; alone (logo.mode
     "partner") it takes the platform mark's place, so a slot whose mark is not
     28px re-points --hz-cobrand-solo-h to its own size (sidebar 44). Spacing is
     the slot's own gap on both sides of the "×" (atoms.css). */
  --hz-cobrand-mark-h:      22px;
  --hz-cobrand-mark-max-w:  132px;
  --hz-cobrand-solo-h:      28px;
  --hz-cobrand-solo-max-w:  180px;
  --hz-cobrand-x-color:     var(--hz-text-muted);
  --hz-cobrand-x-weight:    var(--hz-weight-medium);  /* 500 */

  /* Pill */
  --hz-pill-radius:        var(--hz-radius-pill);
  --hz-pill-pad:           var(--hz-space-1) var(--hz-space-3);   /* 4 12 */
  --hz-pill-font-size:     var(--hz-text-xs);        /* 12 */
  --hz-pill-weight:        var(--hz-weight-semibold);/* 600 */
  --hz-pill-tracking:      normal;
  --hz-pill-color:         var(--hz-text-muted);
  --hz-pill-bg:            var(--hz-surface-raised);
  --hz-pill-border:        var(--hz-border);
  --hz-pill-brand-color:   var(--hz-brand-ink);   /* an INK: 11px text on a tint needs 4.5:1 — the accent read 2.7–2.9:1 in light */
  --hz-pill-brand-bg:      var(--hz-brand-soft);
  --hz-pill-brand-border:  transparent;
  /* The role variants carry their colour through a token for the same reason
     --brand does: a register (the operator panels) must be able to re-point a
     pill's ink without re-declaring the atom. Defaults are the values the
     variants had inline, so no surface changes. */
  --hz-pill-p2p-color:     var(--hz-p2p);
  /* The AGENT pill — the Catalog's type chip ("Agent" beside "Model"), the
     task head's "N agents" — is the spectrum's sky (--hz-spectrum-4), not the
     agent ROLE's pink: beside a neutral badge, a pink-red pill read as an
     error state ("Agent" looked like a warning), and in light the role's ink
     is a red. The sky is the brand's AI colour; the model chip keeps the
     brand blue, so the two kinds stay one family and still tell apart. Ink on
     its soft tint: 5.6:1 in both themes (contrast.test.js). The role colour
     itself (--hz-agent) is untouched: it paints the agent's presence, not a
     label. */
  --hz-pill-agent-color:   var(--hz-spectrum-4-ink);
  --hz-pill-agent-bg:      var(--hz-spectrum-4-soft);
  --hz-pill-agent-border:  transparent;
  --hz-pill-group-color:   var(--hz-group);
  /* The compact size (.hz-pill--xs): a tag inside a card — the Catalog card's
     type chip and outcome badge — where the default pill is a control's size. */
  --hz-pill-xs-pad:        1px var(--hz-space-2);     /* 1 8 */
  --hz-pill-xs-font-size:  var(--hz-text-2xs);       /* 11 */

  /* ─── Notes editor — component register (--hz-note-*) ─────────────────────
     The single contract for the Notes surface (notes.css): the block editor,
     its menus/popovers, tag chips, AI provisional states and the AI-history
     panel. Same discipline as --hz-bubble-* / --hz-composer-*: values below
     are DARK; [data-theme="light"] re-points them, so notes.css needs no
     per-component light rules for anything routed through this register.

     Identity — ONE accent language, three hues with precise meanings:
       • INTERACTIVE accent = the product brand BLUE (--hz-brand), both themes:
         carets, selections, active controls, chips, focus, primary CTAs.
         Notes is a surface of the app, not a different app.
       • AI BLUE = AI affordances only (the theme-invariant --hz-ai-gradient
         family, channels --hz-ai-rgb): the ✦ AI buttons' borders, AI
         preview/provisional states, the thinking pill. It MEANS "AI did/will
         do this" — the marine brand blue, one family with the accent.
       • TEAL (--hz-note-shared) = collaboration ("shared with me"), so it
         never blends into accent-tinted tag chips.
     Tints compose as rgba(var(--hz-note-accent-rgb), <alpha>).

     Migration provenance: chrome/ink/menu/placeholder values are the shipped
     values (sub-perceptual normalizations only — hairline alphas ±.02, shadow
     alphas on a dark canvas, chip fills within a 3-unit gray). The accent
     unification and the danger/type-role alignment below are the deliberate
     design pass, documented at /design-system#notes. The code block + Prism
     palette stay fixed-dark by design and are NOT tokenised here (VS Code /
     Notion / GitHub convention). */
  /* Accent — interactive = product blue (the AI family is below) */
  --hz-note-accent:       var(--hz-brand);              /* theme-invariant blue */
  --hz-note-accent-rgb:   74, 141, 255;                 /* --hz-blue-500        */
  --hz-note-accent-hover: var(--hz-blue-600);           /* solid-CTA hover      */
  --hz-note-accent-ink:   var(--hz-brand-2);            /* active-control text  */
  /* Accent tints */
  --hz-note-tint-selected:   rgba(var(--hz-note-accent-rgb), .12);  /* selected list card */
  --hz-note-tint-ctl:        rgba(var(--hz-note-accent-rgb), .22);  /* active toolbar ctl */
  --hz-note-tint-pulse:      rgba(var(--hz-note-accent-rgb), .18);  /* new-block pulse    */
  --hz-note-tint-blocksel:   rgba(var(--hz-note-accent-rgb), .16);  /* block-range select */
  /* Callout — an informational content block reads the accent (info-box blue) */
  --hz-note-callout-bg:      rgba(var(--hz-note-accent-rgb), .10);
  --hz-note-callout-border:  rgba(var(--hz-note-accent-rgb), .18);
  /* Shared/collaboration teal (its own hue on purpose — see identity above) */
  --hz-note-shared:      #2DD4BF;
  --hz-note-shared-rgb:  45, 212, 191;
  /* Danger — Notes had five drifted reds (#dc2626/#d9263f/#ff5f5f/#ef4444/
     var(--err)); all danger ink now reads var(--hz-danger) and tints compose
     from the pairs below (dark rides the dark-red channels, light the
     light-red ones). */
  --hz-note-danger-bg:     rgba(244, 115, 115, .08);    /* trashed-note banner  */
  --hz-note-danger-border: rgba(244, 115, 115, .18);
  --hz-note-danger-tint:   rgba(244, 115, 115, .12);    /* danger-row hover     */
  /* Ink — the note document reads its own ink (light is a soft near-black
     #1C1C2E, not the app's pure #000; preserved from the shipped values) */
  --hz-note-ink:        var(--hz-text);
  --hz-note-ink-muted:  var(--hz-text-muted);
  /* Placeholders */
  --hz-note-ph:        rgba(255, 255, 255, .18);
  --hz-note-ph-title:  rgba(255, 255, 255, .12);
  --hz-note-ph-cell:   rgba(255, 255, 255, .15);
  /* Hairlines & separators */
  --hz-note-sep:       rgba(255, 255, 255, .09);        /* toolbar separators  */
  --hz-note-hairline:  rgba(255, 255, 255, .06);        /* in-menu dividers    */
  --hz-note-divider:   rgba(255, 255, 255, .10);        /* the --- block       */
  /* Menus & popovers — bg is var(--hz-surface-raised) (flips on its own);
     border + shadow are the register. menu = large floating menus (slash,
     style, AI, table/color/icon pickers); pop = small anchored popovers
     (more-menu, block context, floating format bar, link popover). */
  --hz-note-menu-border: rgba(255, 255, 255, .10);
  --hz-note-menu-shadow: 0 16px 48px rgba(0, 0, 0, .60), 0 2px 8px rgba(0, 0, 0, .40);
  --hz-note-pop-shadow:  0 8px 32px rgba(0, 0, 0, .50), 0 2px 8px rgba(0, 0, 0, .30);
  --hz-note-scrim:       rgba(0, 0, 0, .45);            /* agent-picker backdrop */
  --hz-note-scrollthumb: rgba(255, 255, 255, .08);      /* hairline vertical rails */
  /* Horizontal rails (tables) + in-menu rails need ≥.18 alpha to stay visible
     on the dark canvas (a11y guard in notes-addon.test.js). */
  --hz-note-scrollthumb-strong: rgba(255, 255, 255, .20);
  /* Chips & fields — chip = pill controls (type tabs, starters, history
     composer shell); chiplet = the small square icon tiles inside menus. */
  --hz-note-chip-bg:           var(--hz-surface-raised);
  --hz-note-chip-border:       rgba(255, 255, 255, .08);
  --hz-note-chip-border-hover: rgba(255, 255, 255, .15);
  --hz-note-chiplet-bg:        rgba(255, 255, 255, .06);
  --hz-note-chipdel-hover:     rgba(255, 255, 255, .12);  /* tag-chip ✕ hover */
  /* Wells — media/upload placeholder boxes */
  --hz-note-well-bg:     rgba(255, 255, 255, .04);
  --hz-note-pending-bg:  var(--hz-surface-raised);
  --hz-note-spin-track:  rgba(255, 255, 255, .12);
  /* Media overlay chips (delete ✕ / select ⠿ / Ask-AI on images & video) —
     they sit ON the media, not on the theme, so they are theme-invariant. */
  --hz-note-media-overlay: rgba(0, 0, 0, .65);
  /* Tables */
  --hz-note-table-border:        rgba(255, 255, 255, .18);
  --hz-note-table-border-strong: rgba(255, 255, 255, .22); /* header row */
  --hz-note-table-th-bg:         rgba(255, 255, 255, .04);
  --hz-note-table-zebra:         rgba(255, 255, 255, .015);
  --hz-note-table-add-border:    rgba(255, 255, 255, .14); /* dashed add-row/col */
  --hz-note-cell-bg:             rgba(255, 255, 255, .06); /* table-grid picker  */
  --hz-note-cell-border:         rgba(255, 255, 255, .12);
  /* Inline content — inline code chip + links (links are Catppuccin blue on
     dark, product blue on light; underline carries the same hue at .35/.80) */
  --hz-note-inlinecode-bg:  rgba(255, 255, 255, .08);
  --hz-note-inlinecode-ink: #9DD6F8;
  --hz-note-link:                 #89B4FA;
  --hz-note-link-rgb:             137, 180, 250;
  --hz-note-link-underline:       rgba(var(--hz-note-link-rgb), .35);
  --hz-note-link-underline-hover: rgba(var(--hz-note-link-rgb), .80);
  /* Link popover — code-flavored chrome (fixed-dark #1e1e2e surface in dark,
     paper in light); its fields/buttons/danger flip through these pairs. */
  --hz-note-codepop-bg:       #1E1E2E;
  --hz-note-codefield-bg:     rgba(255, 255, 255, .08);
  --hz-note-codefield-border: rgba(255, 255, 255, .15);
  --hz-note-codefield-ink:    #CDD6F4;
  --hz-note-codebtn-bg:       rgba(255, 255, 255, .07);
  --hz-note-codebtn-bg-hover: rgba(255, 255, 255, .14);
  --hz-note-codedanger:       #F38BA8;                  /* Catppuccin red → app red in light */
  --hz-note-codedanger-rgb:   243, 139, 168;
  /* AI provisional-state (preview blocks + confirm bar + cell card + think
     pill) — the AI blue (--hz-ai-rgb): the "AI touched this" signal. */
  --hz-note-ai-border:           rgba(var(--hz-ai-rgb), .32);
  --hz-note-aibar-shadow:        0 4px 24px rgba(0, 0, 0, .45);
  --hz-note-aibar-shadow-mobile: 0 -4px 24px rgba(0, 0, 0, .50), 0 2px 8px rgba(0, 0, 0, .30);
  --hz-note-aicard-shadow:       0 8px 30px rgba(0, 0, 0, .52), 0 2px 8px rgba(0, 0, 0, .28);
  --hz-note-preview-bg:          rgba(var(--hz-ai-rgb), .06);
  --hz-note-preview-rail:        rgba(var(--hz-ai-rgb), .60);
  --hz-note-think-bg:     linear-gradient(135deg, rgba(var(--hz-ai-rgb), .12), rgba(0, 200, 255, .08));
  --hz-note-think-border: rgba(var(--hz-ai-rgb), .26);
  --hz-note-ai-ink:       var(--hz-blue-300);           /* "AI RESULT" label ink — AI blue */
  --hz-note-ai-sweep:     rgba(var(--hz-ai-rgb), .20);  /* thinking sweep highlight — AI blue */
  --hz-note-dim-opacity:  .35;                          /* originals dimmed under an AI preview */
  /* AI-history side panel */
  --hz-note-histpanel-shadow: calc(-6px * var(--hz-inline-dir, 1)) 0 32px rgba(0, 0, 0, .30);
  /* Agent-picker elevation — deep frost + accent ring in dark; the app's soft
     modal shadow + a slightly stronger ring in light. */
  --hz-note-picker-shadow: 0 24px 64px rgba(0, 0, 0, .72), 0 0 0 1px rgba(var(--hz-note-accent-rgb), .07), 0 4px 16px rgba(0, 0, 0, .4);
  /* History composer shell border (light: borderless filled chip) */
  --hz-note-hcomposer-border: var(--hz-border-strong);
  /* Mobile bottom-sheet lift (AI menu / color picker as sheets) */
  --hz-note-sheet-shadow: 0 -8px 40px rgba(0, 0, 0, .50);
  /* The editor page surface (light: paper-white while the app canvas stays gray) */
  --hz-note-surface: var(--hz-surface-canvas);
  /* Empty-state artwork + the color-picker "none" swatch outline */
  --hz-note-art-fill:         var(--hz-surface-raised);
  --hz-note-art-stroke:       rgba(var(--hz-note-accent-rgb), .32);
  --hz-note-art-glow-opacity: .08;
  --hz-note-swatch-outline:   rgba(255, 255, 255, .20);

  /* ─── Agent card — component register (--hz-agentcard-*) ──────────────────
     THE way an agent is offered anywhere in the product. One component
     (`.hz-agent-card` in design-system/agent-card.css), rendered by ONE builder
     (public/js/utils/agent-card.js), consumed by every surface that lists an
     agent: the home screen's Popular grid, its category shelves, and the
     Agents page.

     One component, two COMPOSITIONS of the same values — never two components:

       TILE  a centred launcher (avatar over name over one meta line) while the
             container is wide enough for name-safe columns;
       ROW   the same card as a compact landscape row — 44px icon, name, meta,
             chevron — once it is not.

     The switch is a container query on the section, not a viewport media query,
     so a narrow column on a desktop reflows exactly like a phone does. Which is
     why every dimension the row tightens has a `-dense` twin here: the row is
     described by re-pointing this register, so there is exactly ONE description
     of the card at any width. (The --hz-bubble-* register is the template this
     follows: CSS-property-aligned suffixes, dense twins, semantic ink.)

     The card's SHELL is the shared atom (`.hz-card --raised --flat --xl`), so
     surface, hairline and radius are not restated here. Values that land on a
     shared scale read that scale; what is left are this component's own
     measurements, stated once: 42% is the avatar's share of a tile (it keeps
     the icon optically constant as columns reflow), 44px is the row icon that
     meets the tap floor, and 170px is the narrowest column a one-line agent
     name survives at.

     Surfaces and ink are semantic tokens, so the card themes itself and needs
     no light-mode rule. */
  /* Grid — how many columns fit is a property of the CARD, declared once. */
  --hz-agentcard-col-min:            170px;
  --hz-agentcard-shelf-w:            150px;                /* a tile on a shelf (.hz-agent-grid--shelf): ~2.4 visible on a 390px phone */
  --hz-agentcard-grid-gap:           var(--hz-space-3);   /* 12 */
  /* Tile geometry */
  --hz-agentcard-pad:                var(--hz-space-4);   /* 16 */
  --hz-agentcard-pad-dense:          var(--hz-space-3);   /* 12 — row: block padding */
  --hz-agentcard-gap:                var(--hz-space-2);   /* 8  — avatar ↔ copy */
  --hz-agentcard-gap-dense:          var(--hz-space-3);   /* 12 */
  --hz-agentcard-row-min-h:          var(--hz-space-16);  /* 64 — row height floor */
  --hz-agentcard-row-divider:        var(--hz-rule-width) solid var(--hz-border);
  /* Avatar tile */
  --hz-agentcard-av-ratio:           42%;                 /* of the tile's width */
  --hz-agentcard-av-min:             var(--hz-space-12);  /* 48 */
  --hz-agentcard-av-max:             var(--hz-space-16);  /* 64 */
  --hz-agentcard-av-radius:          var(--hz-radius-avatar);
  --hz-agentcard-av-font-size:       var(--hz-text-xl);   /* the emoji glyph */
  --hz-agentcard-av-size-dense:      var(--hz-space-11);  /* 44 — the tap floor */
  --hz-agentcard-av-font-size-dense: var(--hz-text-lg);
  /* Name — one line, ellipsised: a name that wraps costs a whole row. */
  --hz-agentcard-name-font-size:       var(--hz-text-sm);   /* 13 */
  --hz-agentcard-name-font-size-dense: var(--hz-text-md);   /* 15–16 */
  --hz-agentcard-name-weight:          var(--hz-weight-semibold);
  --hz-agentcard-name-color:           var(--hz-text);
  /* Meta — one quiet line under the name: what the agent does, and (where a
     surface passes one) what it costs. */
  --hz-agentcard-meta-font-size:       var(--hz-text-2xs); /* 11 */
  --hz-agentcard-meta-font-size-dense: var(--hz-text-xs);  /* 12 */
  --hz-agentcard-meta-weight:          var(--hz-weight-medium);
  --hz-agentcard-meta-color:           var(--hz-text-meta);
  --hz-agentcard-meta-gap:             var(--hz-space-2);  /* 8 — label ↔ price */
  --hz-agentcard-meta-gap-dense:       var(--hz-space-1);  /* 4 — row: stacked */
  /* The description (the agent's tagline) has NO line budget: it is the
     agent's short description and is always shown whole, on both the tile and
     the row. There used to be --hz-agentcard-desc-lines(-dense) here (2 / 1),
     and they cut real copy mid-sentence; see .hz-agent-card-type. */
  /* One line of meta is as tall as the price pill, whether or not this agent
     has a price, so a priceless tile's meta block is never shorter than the
     pill it would otherwise hold. */
  --hz-agentcard-meta-min-h:           var(--hz-space-5);  /* 20 */
  /* Tags — the row under the name the Catalog adds: the type chip ("Model" /
     "Agent", only where a list mixes the two) and the outcome badge ("Everyday
     tasks"). Each is the pill atom at its compact size (.hz-pill--xs); this
     is only the space between them. */
  --hz-agentcard-tags-gap:             var(--hz-space-1);  /* 4 — chip ↔ badge */
  /* Chevron — the row form's "this opens" affordance (the tile has none: a
     centred launcher reads as tappable on its own). */
  --hz-agentcard-arrow-size:         var(--hz-space-10);   /* 40 */
  --hz-agentcard-arrow-bg:           var(--hz-surface-hover);
  --hz-agentcard-arrow-color:        var(--hz-text-meta);
  /* Interaction — the tile lifts, the row does not (a row that lifts inside a
     divider list tears the list apart). */
  --hz-agentcard-hover-lift:         -3px;
  --hz-agentcard-press-scale:        .97;
  --hz-agentcard-focus-width:        var(--hz-focus-width);
  --hz-agentcard-focus-color:        var(--hz-brand);
  --hz-agentcard-focus-offset:       var(--hz-space-1);
  /* The section a grid of cards lives in: its head and the space beneath it. */
  --hz-agentsection-hdr-gap:         var(--hz-space-3);    /* 12 — title ↔ action */
  --hz-agentsection-hdr-offset:      var(--hz-space-6);    /* 24 — head ↔ grid */
  --hz-agentsection-hdr-offset-dense: var(--hz-space-4);   /* 16 */
  --hz-agentsection-title-font-size: var(--hz-text-md);    /* 15–16 */
  --hz-agentsection-title-weight:    var(--hz-weight-bold);
  --hz-agentsection-title-color:     var(--hz-text);
  --hz-agentsection-sub-font-size:   var(--hz-text-xs);    /* 12 */
  --hz-agentsection-sub-color:       var(--hz-text-meta);
  --hz-agentsection-action-font-size: var(--hz-text-sm);   /* 13 */
  --hz-agentsection-action-weight:   var(--hz-weight-semibold);
  --hz-agentsection-action-color:    var(--hz-brand);
  /* Stars price pill — the one place a number rides a card's meta line. The
     star glyph keeps its own warm token in BOTH themes: "currency" has to read
     identically, and the amber ramp is tuned for text contrast, not for a
     glyph. */
  /* The pill sits on two different grounds — the tile's card fill, and (in the
     row, which has no fill of its own) the page canvas. --hz-surface-hover
     clears the card but collides with the Agents page canvas in light
     (#F1F1F1 on #F3F4F8 = 1.028:1); -active clears all four. */
  /* The tags row's outcome badge (.hz-agent-card-badge): 11px text on the raised
     surface reads the META ink — the pill atom's default (muted) read 3.8:1 in dark. */
  --hz-agentcard-badge-color:        var(--hz-text-meta);
  --hz-agentcard-price-bg:           var(--hz-surface-active);
  --hz-agentcard-price-color:        var(--hz-text-meta);   /* 11px: 4.7:1 light, 6+ dark — muted read 3.4–3.8:1 */
  --hz-agentcard-price-num-color:    var(--hz-text);
  --hz-agentcard-price-star-color:   var(--hz-star);
  --hz-agentcard-price-radius:       var(--hz-radius-8);
  --hz-agentcard-price-pad:          2px var(--hz-space-2);
  --hz-agentcard-price-font-size:    var(--hz-text-2xs);   /* 11 */
  --hz-agentcard-price-weight:       var(--hz-weight-semibold);
  /* The unit is a PHRASE now ("per reply", «за ответ»), not a '/'-glued noun,
     so it needs a real word space after the star rather than the 1px that
     kept a slash from touching it. Em-relative so it tracks the pill's own
     font size wherever the register is re-pointed. */
  --hz-agentcard-price-unit-gap:     .34em;

  /* ─── Filter chip — component register (--hz-chip-*) ──────────────────────
     The pill in a horizontal filter rail: the agent store's category rail
     (`.sb-filters` / `.sb-filter`, built by HzFilterBar), and the chat list's
     filter bar when it returns. One rail, one pill, one definition.

     The rail is the store's primary navigation, which is why the pill is a
     register and not a handful of literals: the ON state has to stay the single
     loudest thing in a panel that is otherwise deliberately quiet, and "loudest"
     is a relationship between tokens, not a hex value. Fills read the semantic
     surface ramp (so light mode is a token swap, not a second rule), and the ON
     fill reads the product brand. */
  --hz-chip-h:            34px;
  --hz-chip-h-dense:      36px;                      /* a phone gets the tap floor */
  --hz-chip-pad-x:        14px;
  --hz-chip-gap:          6px;                       /* emoji ↔ label */
  --hz-chip-rail-gap:     7px;                       /* chip ↔ chip   */
  --hz-chip-radius:       var(--hz-radius-pill);
  --hz-chip-font-size:    var(--hz-text-sm);         /* 13 */
  --hz-chip-weight:       var(--hz-weight-semibold);
  --hz-chip-bg:           var(--hz-surface-hover);
  --hz-chip-bg-hover:     var(--hz-surface-active);
  --hz-chip-fg:           var(--hz-text-meta);    /* 13px semibold labels: 4.5:1 — --hz-text-muted read 3.6–4.1:1 */
  --hz-chip-fg-hover:     var(--hz-text);
  --hz-chip-on-bg:        var(--hz-brand);
  --hz-chip-on-bg-hover:  var(--hz-blue-600);
  --hz-chip-on-fg:        var(--hz-text-onbrand);
  --hz-chip-count-size:   var(--hz-text-2xs);        /* 11 */

  /* ─── Store section head — RETIRED (--hz-storehead-*) ─────────────────────
     A category's head on the Agents page was a register of its own, calibrated
     against the marketing `.hz-section-head` atom it deliberately was not. It
     is neither now: a category there is a SHELF, the same object the home
     screen renders, so its head is `.hz-agent-section-hdr` off the
     --hz-agentsection-* half of the agent-card register above. One header, two
     screens, one set of values — which is what the old register was reaching
     for and could not have while it belonged to one panel. */

  /* ─── Panel head — component register (--hz-panel-head-*) ─────────────────
     The band that sits above a scrolling list surface: a title row, then the
     search field, pinned together so the field stays reachable at any scroll
     depth. The chat list (`.sb-head`) is the reference implementation; the
     agents store (`.cs-hdr`) is the second consumer of the same rule. (On a
     phone the chat list's head scrolls away with its chats — app.css "The chat
     list scrolls as one screen"; the geometry here is unchanged by that.)

     This register exists because the two surfaces HAD drifted: the store
     restated the geometry with its own padding and put the field at the top
     of the scrolling body instead, which also dropped the field onto the
     store's tinted card canvas and forced a light-theme override just to keep
     it visible. Naming the geometry once is what makes a third surface cheap
     and a fourth divergence impossible to introduce quietly.

     Follows the --hz-bubble-* template: a -dense twin for every dimension that
     changes at the phone breakpoint, so the compact head is describable from
     the register alone. A phone gives the head MORE room, not less — it is the
     whole screen there rather than a 310px column beside a conversation.

     The top inset carries var(--st), the safe-area strip, inside the token
     rather than beside it. Stated as a separate `padding-top` line it has to be
     restated by every consumer and at every breakpoint, and the one that
     forgets loses its notch clearance silently.

     The side inset is named on its own (-pad-x) because a full-bleed child —
     the chat list's stories row, a horizontal scroller — has to cancel exactly
     that inset to run edge to edge (.hz-panel-head-bleed, app.css). */
  --hz-panel-head-pad-x:        10px;
  --hz-panel-head-pad-x-dense:  12px;
  --hz-panel-head-pad:        calc(14px + var(--st)) var(--hz-panel-head-pad-x) 10px;
  --hz-panel-head-pad-dense:  calc(16px + var(--st)) var(--hz-panel-head-pad-x-dense) 10px;
  --hz-panel-head-gap:        var(--hz-space-2);   /* 8 — title row ↔ field */
  --hz-panel-head-gap-dense:  10px;
  --hz-panel-head-row-pad:    0 4px;
  /* The chat list's brand-mark height. A surface whose row is shorter is
     floored to it, so the search field lands on the same baseline on both and
     does not jump when you move between them. It is also the tap floor for a
     control sitting alone in the row (--hz-tap-min). */
  --hz-panel-head-row-h:      44px;

  /* ── The title cluster ──────────────────────────────────────────────────
     A panel head's row is a leading cluster (an optional back control, then
     an optional eyebrow over the title) and a trailing cluster of actions.

     These values exist here because they had THREE copies. The agents store
     wrote 18px/700/-.35px, the Profile panel wrote the same three numbers
     again under its own class name, and the AI Course wrote 15px/700/-.02em
     with an 10.5px/.07em kicker above it — so the same screen title rendered
     at two sizes depending which tab you were on, and no single edit could
     change "the panel title" anywhere. */
  --hz-panel-head-lead-gap:         var(--hz-space-2);      /* 8  — back ↔ titles */
  --hz-panel-head-actions-gap:      var(--hz-space-2);
  --hz-panel-head-title-size:       var(--hz-text-lg);
  --hz-panel-head-title-weight:     var(--hz-weight-bold);
  --hz-panel-head-title-tracking:   -.35px;
  /* The kicker above a drilled-in title ("МОДУЛЬ 3"). Only the Course has one;
     it is in the register rather than in course.css because the moment a
     second panel grows one, the two must be the same object. */
  --hz-panel-head-eyebrow-size:     var(--hz-text-2xs);     /* 11 */
  --hz-panel-head-eyebrow-tracking: .07em;
  /* The back control's PAINTED box. Its TAP box is --hz-tap-min on a coarse
     pointer (app.css), which is why the two are separate values: shrinking the
     glyph must not be able to shrink the target. */
  --hz-panel-head-back-size:        34px;
  --hz-panel-head-back-glyph:       20px;

  /* ─── List row — component register (--hz-row-*) ──────────────────────────
     The one row every list is built from (.ci — the chat list, the notes list;
     see "Lists" in /design-system). Its measurements used to live in six
     places in app.css that overrode each other — the avatar size alone was
     restated five times — so no single edit could change "the chat row".

     Two densities. The base values are the COMPACT row a mouse gets (desktop,
     64px); the -touch twins are what a finger gets (phone, iPad: 72px, the
     52px avatar and one type step up). The block after this :root switches
     them by input, not by width: an iPad in landscape is as wide as a laptop
     but is still driven by a finger. The type sizes are the roles plus that
     one step, never a new scale.

     Colour is referenced, not restated: every ink below is a text-weight
     token that already clears WCAG AA on the list surface in both themes
     (the preview used to read --hz-text-muted, 3.98:1 in dark). The unread
     badge sits on --hz-brand-ink-2 because that is the brand fill white text
     is measured against. Light re-points only what differs, in its block. */
  --hz-row-h:             64px;
  --hz-row-h-touch:       72px;
  --hz-row-av:            44px;
  --hz-row-av-touch:      52px;
  --hz-row-av-glyph:      18px;   /* emoji / initials inside the avatar */
  --hz-row-av-glyph-touch: 21px;
  --hz-row-gap:           var(--hz-space-3);   /* 12 — avatar ↔ text */
  --hz-row-line-gap:      2px;                 /* title line ↔ preview line */
  --hz-row-pad-x:         10px;                /* a rounded row inside an inset list */
  --hz-row-pad-x-flush:   var(--hz-space-4);   /* 16 — an edge-to-edge row (.hz-list-flush) */
  --hz-row-radius:        var(--hz-radius-12);
  --hz-row-leading:       1.35;

  --hz-row-title-size:        var(--hz-role-title-size);   /* 15 */
  --hz-row-title-size-touch:  16px;
  --hz-row-preview-size:      var(--hz-role-body-size);    /* 14 */
  --hz-row-preview-size-touch: 15px;
  --hz-row-meta-size:         var(--hz-role-meta-size);    /* 12 */
  --hz-row-meta-size-touch:   13px;

  --hz-row-title-ink:     var(--hz-text);
  --hz-row-preview-ink:   var(--hz-text-meta);    /* dark: --hz-text-muted fails AA */
  --hz-row-meta-ink:      var(--hz-text-meta);
  --hz-row-unread-ink:    var(--hz-brand-ink);    /* the time of a chat with unread messages */
  --hz-row-live-ink:      var(--hz-brand-ink);    /* "typing…" / "Thinking…" */
  --hz-row-danger-ink:    var(--hz-danger-ink);   /* a reply that failed */
  --hz-row-read-ink:      var(--hz-success-ink);  /* read ticks */
  --hz-row-pin-ink:       var(--hz-text-meta);

  --hz-row-bg-hover:      var(--hz-surface-hover);
  --hz-row-bg-pressed:    var(--hz-surface-active);
  --hz-row-bg-selected:   color-mix(in srgb, var(--hz-brand) 14%, transparent);
  --hz-row-divider:       var(--hz-border);
  --hz-row-status-ring:   var(--hz-surface);      /* the cut-out around the online dot */
  /* A hairline on every avatar, so a white logo tile keeps its edge on the
     white list and a black one on the dark list. */
  --hz-row-av-ring:       var(--hz-border);

  --hz-row-badge-size:    22px;
  --hz-row-badge-bg:      var(--hz-brand-ink-2);
  --hz-row-badge-ink:     var(--hz-text-onbrand);
  --hz-row-pin-size:      16px;
}

/* A finger gets the touch row. `pointer: coarse` catches the iPad at desktop
   widths; the width clause keeps a phone-sized window on the touch row even
   where a browser reports a fine pointer (desktop devtools, some Android). */
@media (max-width: 640px), (pointer: coarse) {
  :root {
    --hz-row-h:            var(--hz-row-h-touch);
    --hz-row-av:           var(--hz-row-av-touch);
    --hz-row-av-glyph:     var(--hz-row-av-glyph-touch);
    --hz-row-title-size:   var(--hz-row-title-size-touch);
    --hz-row-preview-size: var(--hz-row-preview-size-touch);
    --hz-row-meta-size:    var(--hz-row-meta-size-touch);
  }
}


/* ─── Reading direction + Arabic script (docs/i18n.md §2 rule 7) ────────────
   The server sets <html lang dir> (lib/i18n-assets.js) and public/js/i18n.js
   keeps it in sync, so both hooks below are always present.

   --hz-inline-dir is the SIGN of the inline axis: 1 in LTR, -1 in RTL. Motion
   that travels "forward" (a panel sliding in, a toast arriving from the end
   edge, a switch knob turning on) multiplies its X offset by it, so one
   @keyframes serves both directions — including the keyframe names JS sets
   inline (app.js / settings-addon.js use slideInRight). Scoped to :root on
   purpose: page chrome moves with the PAGE direction, not with a dir="auto"
   message body that happens to be Arabic inside an English UI. */
:root            { --hz-inline-dir: 1; }
:root[dir="rtl"] { --hz-inline-dir: -1; }

/* Arabic and Devanagari (Hindi) are connected scripts: tracking breaks the
   joins between letters — Arabic's cursive joins, Devanagari's headline
   (shirorekha) and its conjuncts — and both stack marks above and below the
   letter (Arabic diacritics; Hindi matras such as ि ी ु ू and the nukta),
   which clip under the sub-1.5 leadings tuned for Latin display faces. Every
   negative/positive tracking token goes to 0 and every leading below 1.5
   opens up. Leadings at or above 1.5 (body, read, relaxed, bubbles) already
   suit both. (0,2,0) outranks every plain :root re-declaration in later sheets. */
:root:lang(ar),
:root:lang(hi) {
  --hz-tracking-hero:    0;
  --hz-tracking-heading: 0;
  --hz-tracking-tight:   0;
  --hz-tracking-snug:    0;
  --hz-role-title-tracking:   0;
  --hz-role-read-tracking:    0;
  --hz-role-label-tracking:   0;
  --hz-bubble-letter-spacing: 0;
  --hz-btn-tracking:          0;
  --hz-panel-head-title-tracking:   0;
  --hz-panel-head-eyebrow-tracking: 0;

  --hz-leading-hero:    1.25;
  --hz-leading-heading: 1.3;
  --hz-leading-tight:   1.35;
  --hz-leading-snug:    1.5;
  --hz-role-title-leading:   1.5;
  --hz-role-label-leading:   1.4;
  --hz-role-caption-leading: 1.55;
  --hz-role-meta-leading:    1.25;
  --hz-row-leading:          1.5;
}

/* ===========================================================================
 * L2 · LIGHT THEME — a pure token swap. Applied by theme-addon.js via
 * <html data-theme="light">. NOTE: this is the ONLY place light values live —
 * components never need a light-specific rule.
 * ========================================================================= */
[data-theme="light"] {
  --hz-plus-ink: #0F5CD9;
  --hz-plus-soft: rgba(15,92,217,.10);
  --hz-plus-soft-hover: rgba(15,92,217,.16);
  --hz-plus-surface: rgba(15,92,217,.05);
  --hz-plus-border: rgba(15,92,217,.30);
  --hz-plus-tile: var(--hz-surface-raised);
  --hz-plus-tile-border: rgba(15,92,217,.16);
  --hz-plus-tile-shadow: 0 1px 2px rgba(17,17,39,.06);
  --hz-plus-hue-stars: #B45309;
  /* The warning ink (#9A6200) is 4.2:1 on the invite tint over the light sheet;
     one step deeper clears AA on both tints (5.3 / 4.9 — contrast.test.js). */
  --hz-invite-ink:    #855300;
  --hz-invite-soft:   rgba(180, 83, 9, .10);
  --hz-invite-tint:   rgba(180, 83, 9, .04);
  --hz-invite-border: rgba(180, 83, 9, .32);
  --hz-plus-hue-text:  #0F5CD9;
  --hz-plus-hue-image: #0F5CD9;
  --hz-plus-hue-video: #0F5CD9;
  --hz-plus-hue-sound: #0F5CD9;
  --hz-plus-hue-voice: #0F5CD9;
  --hz-plus-hue-life:  #0F5CD9;
  --hz-plus-chip-mix: 11%;
  --hz-plus-selected: #0F5CD9;
  color-scheme: light;

  --hz-surface-canvas: var(--hz-paper-150);
  --hz-plans-canvas: var(--hz-paper-0);
  --hz-surface:        var(--hz-paper-0);
  --hz-surface-raised: var(--hz-paper-0);
  --hz-surface-hover:  var(--hz-paper-100);
  --hz-shelf-arrow-bg:     var(--hz-paper-0);
  --hz-shelf-arrow-border: var(--hz-border);
  --hz-surface-active: var(--hz-paper-200);

  /* The filled card and the spectrum, light (see the dark block for the why). */
  --hz-surface-fill:   var(--hz-paper-50);
  --hz-surface-fill-2: var(--hz-paper-0);
  --hz-text-meta-fill: #5F6671;
  --hz-spectrum-1-soft: #FFE4EC;
  --hz-spectrum-2-soft: #FFEDE5;
  --hz-spectrum-3-soft: #E3EEFF;
  --hz-spectrum-4-soft: #E0F2FB;
  --hz-spectrum-1-ink: #C70F4A;
  --hz-spectrum-2-ink: #C2410C;
  --hz-spectrum-3-ink: #1A57CC;
  --hz-spectrum-4-ink: #0A6698;
  --hz-spectrum-wash-from: #EAF2FF;
  --hz-spectrum-wash-to:   #E4F6FD;
  --hz-spectrum-wash-base: #E7F4FE;
  --hz-spectrum-glow: 0 24px 56px -30px rgba(26, 107, 255, .40);

  --hz-border:        rgba(0, 0, 0, .08);
  --hz-border-strong: rgba(0, 0, 0, .12);

  --hz-text:        var(--hz-text-lite-1);
  --hz-text-muted:  var(--hz-text-lite-2);
  --hz-text-subtle: var(--hz-text-lite-3);
  --hz-text-onbrand: #FFFFFF;
  /* meta — AA-compliant timestamp/count colour (~4.5:1 on white). -subtle
     (#A2ACB4, ~2.2:1) is decorative-only and must not carry read-important text. */
  --hz-text-meta:   #5F6672;   /* 5.3:1 on --hz-surface-raised's tint; the old #6E7581 read 4.2:1 under the card's 12px meta */

  --hz-brand:      var(--hz-blue-500);
  --hz-brand-2:    var(--hz-blue-400);
  --hz-brand-glow: rgba(74, 141, 255, .20);
  --hz-brand-border: rgba(74, 141, 255, .30);
  --hz-brand-soft: rgba(74, 141, 255, .09);

  --hz-focus-ring: rgba(74, 141, 255, .55);

  --hz-p2p:        var(--hz-green-600);
  --hz-p2p-soft:   rgba(60, 145, 64, .10);
  --hz-p2p-border: rgba(60, 145, 64, .22);
  --hz-agent:        var(--hz-pink-600);
  --hz-agent-ink:    #B3123F;                    /* light: the accent read 3.2:1 as 11px text on its tint; this reads 5.5:1 */
  --hz-agent-soft:   rgba(228, 64, 95, .10);
  --hz-agent-border: rgba(228, 64, 95, .22);
  --hz-group:        var(--hz-amber-600);
  --hz-group-soft:   rgba(190, 122, 0, .10);
  --hz-group-border: rgba(190, 122, 0, .22);

  --hz-warning: var(--hz-amber-600);
  --hz-danger:  var(--hz-red-600);
  --hz-success: var(--hz-green-600);
  /* The reading inks. Measured against #FFF and against each hue's own .10
     tint: brand 5.4/5.0, success 5.1/4.6, warning 5.1/4.6, danger 5.6/4.9 —
     all clear of the 4.5 AA floor for normal text, which the plain hues are
     not on a light surface. --brand-ink-2 keeps white button text at 5.1. */
  --hz-brand-ink:    #1A64D8;
  --hz-brand-ink-2:  #2569DC;
  --hz-success-ink:  #2E7D32;
  /* The cookie banner's privacy link reads on white here: the dark default
     (--hz-brand-2, a highlight stop) is 2.8:1 on it, the reading ink 5.4:1. */
  --hz-cookie-link:  var(--hz-brand-ink);
  --hz-warning-ink:  #9A6200;
  --hz-danger-ink:   #C62828;
  --hz-success-soft:   rgba(60, 145, 64, .12);
  --hz-success-border: rgba(60, 145, 64, .26);
  --hz-warning-soft:   rgba(190, 122, 0, .12);
  --hz-warning-border: rgba(190, 122, 0, .26);
  --hz-danger-soft:    rgba(229, 57, 53, .10);
  --hz-danger-border:  rgba(229, 57, 53, .24);
  --hz-danger-strong-soft: rgba(229, 57, 53, .18);
  --hz-neutral-soft:   rgba(17, 24, 39, .06);
  --hz-neutral-border: rgba(17, 24, 39, .12);

  --hz-bubble-out: linear-gradient(180deg, #EEFFDE 0%, #E3FDD0 100%);

  /* Chat bubble register — LIGHT flips. Outgoing keeps the same signature gradient
     in both themes (the user's brand), so only the incoming (person) surface flips:
     a white pill with a hairline drop-shadow + black text. Agent + meta colours
     flip automatically via --hz-text / --hz-text-subtle. */
  --hz-bubble-in-bg:      #FFFFFF;
  --hz-bubble-in-color:   #000000;
  --hz-bubble-in-shadow:  0 1px 2px rgba(0, 0, 0, .06);
  /* The thread (see the dark block): a lavender-to-paper wash. */
  --hz-thread-bg:           #F2F0FB;
  --hz-thread-bg-end:       #F8F5F8;
  --hz-thread-hue-pink:     rgba(254, 30, 98, .16);
  --hz-thread-hue-orange:   rgba(255, 103, 37, .18);
  --hz-thread-hue-amber:    rgba(255, 179, 14, .22);
  --hz-thread-hue-blue:     rgba(26, 107, 255, .16);
  --hz-thread-hue-sky:      rgba(11, 123, 196, .18);
  --hz-thread-meta-ink:     #585E6A;   /* AA over every sprite hue at the wash's dark end; --hz-text-meta is not */

  /* Navigation — light flips (see the dark block for the three registers).
     --hz-nav-action is theme-invariant (it holds a white label). */
  --hz-nav-bg:       rgba(255, 255, 255, .94);
  --hz-nav-border:   rgba(0, 0, 0, .08);
  --hz-nav-shadow:   0 1px 0 rgba(0, 0, 0, .04), 0 2px 10px rgba(0, 0, 0, .04);
  --hz-nav-glow:     none;

  --hz-navitem-ink:    rgba(17, 24, 39, .82);
  --hz-navitem-active: #0F5CD9;
  --hz-navitem-lens:   rgba(118, 118, 128, .14);
  --hz-navitem-press:  rgba(118, 118, 128, .10);

  --hz-tabbar-glass:   rgba(255, 255, 255, .64);
  --hz-tabbar-solid:   #F7F7F9;
  --hz-tabbar-rim:     rgba(15, 23, 42, .08);
  --hz-tabbar-sheen:   linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 60%);
  --hz-tabbar-shadow:  0 10px 30px rgba(15, 23, 42, .13), 0 1px 4px rgba(15, 23, 42, .07),
                       inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .35);
  --hz-tabbar-badge:   #FF3B30;

  --hz-shadow-sm: 0 2px 6px rgba(20, 20, 43, .06), 0 1px 2px rgba(20, 20, 43, .05);
  --hz-shadow-md: 0 8px 24px rgba(20, 20, 43, .10);
  --hz-shadow-lg: 0 20px 48px rgba(20, 20, 43, .14);
  --hz-shadow-brand: 0 8px 20px rgba(74, 141, 255, .28);

  /* App frosted/elevated surfaces — light drops the blur for an opaque fill + a
     hairline drop-shadow (the light half of the elevation model). */
  --hz-surface-chathdr:  #FFFFFF;
  --hz-chathdr-blur:     none;
  --hz-chathdr-shadow:   0 1px 3px rgba(0, 0, 0, .08);
  --hz-surface-panelhdr: #FFFFFF;
  --hz-panelhdr-blur:    none;
  --hz-panelhdr-shadow:  0 1px 3px rgba(0, 0, 0, .07);
  --hz-surface-composer:    #FFFFFF;
  --hz-composer-blur:       none;
  --hz-composer-border-top: 0.5px solid rgba(0, 0, 0, .06);
  /* Notes editor sub-surfaces (light) */
  --hz-surface-fmtbar:   #FFFFFF;
  --hz-fmtbar-blur:      none;
  --hz-surface-accbar:   #FFFFFF;
  --hz-accbar-blur:      none;
  --hz-surface-panel-settings: #F2F2F7;
  --hz-surface-panel-onboard:  #EFEFF4;
  --hz-surface-panel-store:    #F3F4F8;

  /* Elevated cards + modal scrim — light: borderless, softer shadows, lighter scrim. */
  --hz-overlay-scrim:    rgba(0, 0, 0, .35);
  --hz-overlay-blur:     blur(8px);
  --hz-elevation-border: none;
  --hz-modal-shadow:     0 8px 40px rgba(0, 0, 0, .16), 0 2px 8px rgba(0, 0, 0, .08);
  --hz-toast-shadow:     0 6px 24px rgba(0, 0, 0, .14);
  --hz-spcard-shadow:    0 1px 3px rgba(0, 0, 0, .08);
  --hz-obcard-shadow:    0 8px 32px rgba(0, 0, 0, .10);

  /* Bottom-sheet family — only the close-button chip flips for light; scrim +
     blur intentionally stay constant (see the dark block for the rationale). */
  --hz-sheet-close-bg:       rgba(0, 0, 0, .06);
  --hz-sheet-close-bg-hover: rgba(0, 0, 0, .12);

  /* ─── Notes editor register — LIGHT re-points ─────────────────────────────
     Theme-invariant (NOT re-pointed): --hz-note-accent / -rgb / -hover (the
     interactive blue), the AI blue family's hue (ai-border, preview-*, think-*;
     only their alphas step down here),
     and --hz-note-media-overlay (sits on media, not on the theme). Tint
     alphas step down slightly on white — pale tints read stronger on paper. */
  --hz-note-accent-ink:   var(--hz-brand);
  --hz-note-tint-selected:  rgba(var(--hz-note-accent-rgb), .09);
  --hz-note-tint-ctl:       rgba(var(--hz-note-accent-rgb), .12);
  --hz-note-tint-pulse:     rgba(var(--hz-note-accent-rgb), .12);
  --hz-note-tint-blocksel:  rgba(var(--hz-note-accent-rgb), .10);
  --hz-note-callout-bg:     rgba(var(--hz-note-accent-rgb), .07);
  --hz-note-callout-border: rgba(var(--hz-note-accent-rgb), .20);
  --hz-note-shared:      #0D9488;
  --hz-note-shared-rgb:  13, 148, 136;
  --hz-note-danger-bg:     rgba(229, 57, 53, .05);
  --hz-note-danger-border: rgba(229, 57, 53, .12);
  --hz-note-danger-tint:   rgba(229, 57, 53, .08);
  --hz-note-ink:        #1C1C2E;
  --hz-note-ink-muted:  #555555;
  --hz-note-ph:        rgba(0, 0, 0, .20);
  --hz-note-ph-title:  rgba(0, 0, 0, .14);
  --hz-note-ph-cell:   rgba(0, 0, 0, .18);
  --hz-note-sep:       rgba(0, 0, 0, .10);
  --hz-note-hairline:  rgba(0, 0, 0, .07);
  --hz-note-divider:   rgba(0, 0, 0, .10);
  --hz-note-menu-border: rgba(0, 0, 0, .10);
  --hz-note-menu-shadow: 0 8px 32px rgba(0, 0, 0, .13), 0 2px 8px rgba(0, 0, 0, .07);
  --hz-note-pop-shadow:  0 8px 32px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);
  --hz-note-scrim:       rgba(0, 0, 0, .35);
  --hz-note-scrollthumb: rgba(0, 0, 0, .14);
  --hz-note-scrollthumb-strong: rgba(0, 0, 0, .15);
  --hz-note-chip-bg:           #F2F2F5;
  --hz-note-chip-border:       rgba(0, 0, 0, .08);
  --hz-note-chip-border-hover: rgba(0, 0, 0, .12);
  --hz-note-chiplet-bg:        #F2F2F5;
  --hz-note-chipdel-hover:     rgba(0, 0, 0, .08);
  --hz-note-well-bg:     rgba(0, 0, 0, .03);
  --hz-note-pending-bg:  rgba(0, 0, 0, .03);
  --hz-note-spin-track:  rgba(0, 0, 0, .10);
  --hz-note-table-border:        rgba(0, 0, 0, .18);
  --hz-note-table-border-strong: rgba(0, 0, 0, .22);
  --hz-note-table-th-bg:         rgba(0, 0, 0, .03);
  --hz-note-table-zebra:         rgba(0, 0, 0, .015);
  --hz-note-table-add-border:    rgba(0, 0, 0, .12);
  --hz-note-cell-bg:             rgba(0, 0, 0, .08);
  --hz-note-cell-border:         rgba(0, 0, 0, .12);
  --hz-note-inlinecode-bg:  rgba(0, 0, 0, .07);
  --hz-note-inlinecode-ink: #0055AA;
  --hz-note-link:     var(--hz-blue-600);
  --hz-note-link-rgb: 59, 130, 246;
  --hz-note-codepop-bg:       #FFFFFF;
  --hz-note-codefield-bg:     #F2F2F5;
  --hz-note-codefield-border: rgba(0, 0, 0, .14);
  --hz-note-codefield-ink:    #1C1C2E;
  --hz-note-codebtn-bg:       #F0F0F2;
  --hz-note-codebtn-bg-hover: #E4E4E8;
  --hz-note-codedanger:       var(--hz-red-600);
  --hz-note-codedanger-rgb:   229, 57, 53;
  --hz-note-ai-border:           rgba(var(--hz-ai-rgb), .22);
  --hz-note-ai-ink:              var(--hz-brand-ink);   /* the dark ink (blue-300) is 2:1 on paper */
  --hz-note-aibar-shadow:        0 4px 18px rgba(0, 0, 0, .10);
  --hz-note-aibar-shadow-mobile: 0 -4px 24px rgba(0, 0, 0, .10), 0 2px 8px rgba(0, 0, 0, .06);
  --hz-note-aicard-shadow:       0 8px 30px rgba(0, 0, 0, .15), 0 2px 8px rgba(0, 0, 0, .08);
  --hz-note-preview-bg:          rgba(var(--hz-ai-rgb), .045);
  --hz-note-preview-rail:        rgba(var(--hz-ai-rgb), .45);
  --hz-note-think-bg:     linear-gradient(135deg, rgba(var(--hz-ai-rgb), .08), rgba(0, 200, 255, .06));
  --hz-note-think-border: rgba(var(--hz-ai-rgb), .20);
  --hz-note-dim-opacity:  .4;
  --hz-note-histpanel-shadow: calc(-4px * var(--hz-inline-dir, 1)) 0 20px rgba(0, 0, 0, .09);
  --hz-note-picker-shadow: var(--hz-modal-shadow), 0 0 0 1px rgba(var(--hz-note-accent-rgb), .15);
  --hz-note-hcomposer-border: transparent;
  --hz-note-sheet-shadow: 0 -8px 40px rgba(0, 0, 0, .15);
  --hz-note-surface: #FFFFFF;
  --hz-note-art-fill:         rgba(255, 255, 255, .88);
  --hz-note-art-stroke:       rgba(var(--hz-note-accent-rgb), .25);
  --hz-note-art-glow-opacity: .06;
  --hz-note-swatch-outline:   rgba(0, 0, 0, .22);

  /* ─── List row register — LIGHT re-points ─────────────────────────────────
     Every ink in the register already follows its token into light. Only the
     selected tint differs: 14% brand on white reads as a coloured block, 10%
     as the soft selection it is in dark. */
  --hz-row-bg-selected: color-mix(in srgb, var(--hz-brand) 10%, transparent);
}
