/* SPDX-License-Identifier: EUPL-1.2 */

/*
 * hominis.eu marketing site — fidelity kit, layer 1: TOKENS.
 *
 * VERBATIM transcription of three regions of the shipped token sheet
 *   engine/browser/themes/shared/hominis-tokens.css
 * transcribed 2026-07-22, in source order, comments preserved:
 *
 *   1. lines  18–271  — the :root token block
 *   2. lines 273–303  — the @media (prefers-color-scheme: dark) block
 *   3. lines 436–469  — the private-palette block, with the ONE edit:
 *                       `:root[data-private]` re-scoped to `.hx-private`
 *                       (marketing vignettes wrap in <div class="hx-private">;
 *                       custom properties re-resolve for all descendants).
 *
 * Re-verify against source:
 *   { sed -n '18,271p;273,303p' $SRC;
 *     sed -n '436,469p' $SRC | sed 's/^:root\[data-private\]/.hx-private/'; }
 *   diffed against this file below this header (plus the blank separator lines).
 *
 * Deliberately NOT transcribed: the :root[data-theme=…] explicit-choice
 * blocks and the [data-skin=…] blocks — the site ships glass-skin,
 * system-scheme-only (light default, dark via the media block).
 */

:root {
  /* = Colors — General = */
  /* (add design tokens for "Colors — General" here; use `fireforge token add --category "Colors — General" …`) */

  /* = Colors — Canvas = */
  /* (add design tokens for "Colors — Canvas" here; use `fireforge token add --category "Colors — Canvas" …`) */
  /* Canvas surface background */
  --hominis-canvas-background: #e7e7ee; /* auto */
  /* Canvas grid pattern tint */
  --hominis-canvas-grid-tint: rgba(27, 27, 33, 0.08); /* override */

  /* = Colors — Experiment = */
  /* (add design tokens for "Colors — Experiment" here; use `fireforge token add --category "Colors — Experiment" …`) */

  /* = Spacing = */
  /* (add design tokens for "Spacing" here; use `fireforge token add --category "Spacing" …`) */
  /* Canvas background pattern gap (world px, user scalar) */
  --hominis-bg-gap: 26px; /* static, fork-specific */
  /* Window bar height */
  --hominis-window-bar-height: 56px; /* static, fork-specific */
  /* Window-bar pill height */
  --hominis-pill-height: 40px; /* static, fork-specific */
  /* Radius bases (skin-set; with --hominis-full-radius these are the ONLY
     raw-px radius values in the system — everything else derives; the
     radius audit enforces this at the definition site) */
  --hominis-overlay-radius-base: 14px; /* static, fork-specific */
  /* Overlay corner radius (glass rhythm; derived: base × the one user scale) */
  --hominis-overlay-radius: calc(var(--hominis-overlay-radius-base) * var(--hominis-r-scale, 1)); /* static, fork-specific */
  /* Inner rows/fields radius (derived: overlay-base − 6 at base level, scaled —
     the prototype's pop−6 concentric nesting; degrades smoothly at low scale) */
  --hominis-inner-radius: max(0px, calc((var(--hominis-overlay-radius-base) - 6px) * var(--hominis-r-scale, 1))); /* static, fork-specific */
  /* Command bar width (genesis/04 feel constant: command width 520px) */
  --hominis-command-width: 520px; /* static, fork-specific */
  /* Command pill shrink floor (bar density cascade) */
  --hominis-command-min-width: 180px; /* static, fork-specific */
  /* Window minimum width (full-chrome windows; popups exempt) */
  --hominis-window-min-width: 500px; /* static, fork-specific */
  /* Window minimum height (full-chrome windows; popups exempt) */
  --hominis-window-min-height: 360px; /* static, fork-specific */
  /* Vertical sidebar expanded width (spec-law 248, ux-reference §3) */
  --hominis-v-sidebar-width: 248px; /* static, fork-specific */
  /* Vertical sidebar rail width (spec-law 72, ux-reference §3) */
  --hominis-v-rail-width: 72px; /* static, fork-specific */
  /* micro radius: small controls, chips, thumbs (derived: 4×scale, never
     rounder than inner — reproduces glass 4 / precision 2 / humanist 4) */
  --hominis-micro-radius: min(var(--hominis-inner-radius), calc(4px * var(--hominis-r-scale, 1))); /* static, fork-specific */
  /* full/capsule radius: pills-of-any-height, progress tracks, hairline marks */
  --hominis-full-radius: 999px; /* static, fork-specific */
  /* gap scale: tight */
  --hominis-gap-s: 4px; /* static, fork-specific */
  /* gap scale: default */
  --hominis-gap-m: 6px; /* static, fork-specific */
  /* gap scale: roomy */
  --hominis-gap-l: 8px; /* static, fork-specific */
  /* media corner badge diameter (the favicon corner speaker; media.md badge law) */
  --hominis-media-badge-size: 12px; /* static, fork-specific */

  /* = Tiles = */
  /* Tile radius base (skin-set; glass 12 — prototype value user-adjudicated
     2026-07-10, supersedes the shipped 10) */
  --hominis-tile-radius-base: 12px; /* static, fork-specific */
  /* Tile corner radius (derived) */
  --hominis-tile-radius: calc(var(--hominis-tile-radius-base) * var(--hominis-r-scale, 1)); /* static, fork-specific */
  /* Tile header strip height */
  --hominis-tile-header-height: 38px; /* static, fork-specific */
  /* Tile header control hit size */
  --hominis-tile-control-size: 28px; /* static, fork-specific */
  /* Edge-resize band thickness (total per-edge hit area; edge-resize law) */
  --hominis-tile-resize-band: 10px; /* static, fork-specific */
  /* Edge-resize overhang outside the tile bounds (hit leeway) */
  --hominis-tile-resize-outset: 4px; /* static, fork-specific */
  /* Edge-resize corner hit-square size */
  --hominis-tile-resize-corner: 18px; /* static, fork-specific */
  /* Canvas tile gap rhythm */
  --hominis-tile-gap: 18px; /* static, fork-specific */
  /* Tile resize floor width */
  --hominis-tile-min-width: 300px; /* static, fork-specific */
  /* Tile resize floor height */
  --hominis-tile-min-height: 220px; /* static, fork-specific */
  /* Pill radius base (skin-set; glass 22) */
  --hominis-pill-radius-base: 22px; /* static, fork-specific */
  /* Pill corner radius (derived) */
  --hominis-pill-radius: calc(var(--hominis-pill-radius-base) * var(--hominis-r-scale, 1)); /* static, fork-specific */
  /* Raised-chrome blur (glass material; 0 under precision) */
  --hominis-blur: 12px; /* static, fork-specific */
  /* Display font stack (humanist swaps in a serif) */
  --hominis-display-font: system-ui, sans-serif; /* static, fork-specific */
  /* Mono metadata font stack (group labels, counts, metadata lines) */
  --hominis-mono-font: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; /* static, fork-specific */

  /* = Motion = */
  /* Faded docked-chrome ghost (F-04 proximity auto-fade) */
  --hominis-overlay-faded-opacity: 0.15; /* static, fork-specific */
  /* Hover feedback duration */
  --hominis-motion-duration-fast: 150ms; /* static, fork-specific */
  /* State change and reveal duration */
  --hominis-motion-duration-base: 200ms; /* static, fork-specific */
  /* Emphasized mode-switch duration */
  --hominis-motion-duration-slow: 250ms; /* static, fork-specific */
  /* Standard easing */
  --hominis-motion-ease-standard: cubic-bezier(0.2, 0, 0, 1); /* static, fork-specific */
  /* Emphasized easing */
  --hominis-motion-ease-emphasized: cubic-bezier(0.3, 0, 0, 1); /* static, fork-specific */
  /* Focus morph duration: every focus entrance, exit, and frame transition (genesis/04 feel table) */
  --hominis-morph-duration: 400ms; /* static, fork-specific */
  /* Camera fly duration (dock chip / minimap flights) */
  --hominis-fly-duration: 520ms; /* static, fork-specific */
  /* Sidebar hover-fly open delay (spec-law 130ms) */
  --hominis-v-fly-open-duration: 130ms; /* static, fork-specific */
  /* Sidebar hover-fly close delay (spec-law 260ms) */
  --hominis-v-fly-close-duration: 260ms; /* static, fork-specific */
  /* THE popover pop-in curve (prototype .2/.8/.3/1 — fast out, gentle settle) */
  --hominis-motion-ease-pop: cubic-bezier(0.2, 0.8, 0.3, 1); /* static, fork-specific */

  /* = Focus = */
  /* Uniform focus ring width */
  --hominis-focus-ring-width: 2px; /* static, fork-specific */
  /* Uniform focus ring offset */
  --hominis-focus-ring-offset: 2px; /* static, fork-specific */
  /* Canvas-armed inset edge (never a full-bleed outline) */
  --hominis-canvas-armed-inset: inset 0 0 0 var(--hominis-focus-ring-width) var(--hominis-accent); /* static, fork-specific */
  /* The toolkit ring bridge (ux-reference §3 button law, 2026-07-12):
   * toolkit shadow-DOM widgets (moz-button, moz-toggle, findbar…)
   * ring themselves with tokens-shared's --focus-outline-*; re-point
   * them here so every toolkit :focus-visible IS the Hominis ring —
   * bridge, never fork (the panel-list precedent). */
  --focus-outline-width: var(--hominis-focus-ring-width); /* bridge */
  --focus-outline-color: var(--hominis-accent); /* bridge */
  --focus-outline-offset: var(--hominis-focus-ring-offset); /* bridge */

  /* = Colors — Chrome = */
  /* Chrome surface (toolbars, docks, tile headers) */
  --hominis-chrome-surface: #f0f0f5; /* override */
  /* Raised surface (popovers, active tile chrome) */
  --hominis-chrome-surface-raised: #ffffff; /* override */
  /* Primary chrome text and icons */
  --hominis-chrome-text: #1b1b21; /* override */
  /* Secondary chrome metadata text */
  --hominis-chrome-text-muted: #585862; /* override */
  /* Subtle boundary (tile outlines, separators) */
  --hominis-chrome-boundary: rgba(27, 27, 33, 0.16); /* override */
  /* The ONE spatial accent (active, focus, primary action) */
  --hominis-accent: #2b5fd9; /* override */
  /* Danger state role (never color-alone) */
  --hominis-danger: #c50042; /* override */
  /* ink on the media corner badge (accent-filled circle; media.md) */
  --hominis-media-badge-ink: #ffffff; /* static, fork-specific */
  /* Recessed content wells (two-tier surface law, ux-reference §3) */
  --hominis-chrome-surface-recessed: #e9e9f0; /* override */
  /* Faint text tier (uppercase group labels, mono metadata — hierarchy law clause 6) */
  --hominis-chrome-text-faint: #8f8f9b; /* override */
  /* Private-role violet (hue 305): private entries OUTSIDE private windows; equals the forced accent inside */
  --hominis-private-accent: oklch(0.45 0.15 305); /* override */
  /* Ink on accent fills (accent=current law: white in light; dark ink on the pale dark accent) */
  --hominis-accent-ink: #ffffff; /* override */
  /* Weak hairline tier (in-panel separators, quiet control borders, the
     ghost-hover wash; --hominis-chrome-boundary is the STRONG tier —
     popover rings, selected/bordered controls; two-tier law, ux-ref §3) */
  --hominis-chrome-line: rgba(27, 27, 33, 0.10); /* override */
  --hominis-material-pill: color-mix(in srgb, var(--hominis-chrome-surface) calc(var(--hominis-pill-alpha, 0.62) * 100%), transparent); /* static, fork-specific */
  --hominis-material-pill-dim: color-mix(in srgb, var(--hominis-chrome-surface) calc(var(--hominis-pill-alpha, 0.62) * 75%), transparent); /* static, fork-specific */
  /* Scrollbar thumb (derives from chrome text — theme/skin/private lockstep free) */
  --hominis-scrollbar-thumb: color-mix(in srgb, var(--hominis-chrome-text) 30%, transparent); /* static, fork-specific */
  /* Scrollbar track (transparent — the thumb alone marks the rail) */
  --hominis-scrollbar-track: transparent; /* static, fork-specific */

  /* = Elevation = */
  /* Tier 0 anchored shadow */
  --hominis-shadow-low: 0 1px 2px rgba(15, 15, 20, 0.06), 0 1px 3px rgba(15, 15, 20, 0.10); /* override */
  /* Tier 1 floating shadow */
  --hominis-shadow-mid: 0 2px 4px rgba(15, 15, 20, 0.06), 0 8px 20px rgba(15, 15, 20, 0.12); /* override */
  /* Tier 2 overlay shadow (popovers, menus, dialogs) */
  --hominis-shadow-high: 0 4px 8px rgba(15, 15, 20, 0.08), 0 24px 48px rgba(15, 15, 20, 0.20); /* override */
  /* Tier 0.5 object shadow (tiles — the canvas objects) */
  --hominis-shadow-tile: 0 2px 6px rgba(15, 15, 20, 0.08), 0 12px 32px rgba(15, 15, 20, 0.14); /* override */
  /* Tier 0.5 object shadow, active tile */
  --hominis-shadow-tile-active: 0 4px 10px rgba(15, 15, 20, 0.10), 0 20px 48px rgba(15, 15, 20, 0.22); /* override */

  /* = Colors — Identity = */
  /* Identity chip: default/personal */
  --hominis-identity-default: #7c7c87; /* static, fork-specific */
  /* Identity chip: container blue */
  --hominis-identity-blue: #37adff; /* static, fork-specific */
  /* Identity chip: container turquoise */
  --hominis-identity-turquoise: #00c79a; /* static, fork-specific */
  /* Identity chip: container green */
  --hominis-identity-green: #51cd00; /* static, fork-specific */
  /* Identity chip: container yellow */
  --hominis-identity-yellow: #ffcb00; /* static, fork-specific */
  /* Identity chip: container orange */
  --hominis-identity-orange: #ff9f00; /* static, fork-specific */
  /* Identity chip: container red */
  --hominis-identity-red: #ff613d; /* static, fork-specific */
  /* Identity chip: container pink */
  --hominis-identity-pink: #ff4bda; /* static, fork-specific */
  /* Identity chip: container purple */
  --hominis-identity-purple: #af51f5; /* static, fork-specific */

  /* = Colors — Sketch ink = */
  /* Sketch ink: iris (default) — theme-stable data color, never accent */
  --hominis-ink-iris: oklch(0.66 0.16 285); /* static, fork-specific */
  /* Sketch ink: blue */
  --hominis-ink-blue: oklch(0.66 0.14 240); /* static, fork-specific */
  /* Sketch ink: teal */
  --hominis-ink-teal: oklch(0.68 0.12 195); /* static, fork-specific */
  /* Sketch ink: moss */
  --hominis-ink-moss: oklch(0.68 0.14 150); /* static, fork-specific */
  /* Sketch ink: amber */
  --hominis-ink-amber: oklch(0.74 0.14 75); /* static, fork-specific */
  /* Sketch ink: coral */
  --hominis-ink-coral: oklch(0.66 0.17 25); /* static, fork-specific */
  /* Sketch ink: black (near-black; the spec's 'ink' swatch) */
  --hominis-ink-black: oklch(0.30 0.02 260); /* static, fork-specific */
  /* Sketch ink: white (near-white; the spec's 'chalk' swatch) */
  --hominis-ink-white: oklch(0.94 0.005 260); /* static, fork-specific */
  /* Ink casing: the theme-reactive under-stroke ground (F-15 contrast law) — chrome, not a data color; tracks the canvas ground so strokes separate from any underlying content */
  --hominis-ink-casing: var(--hominis-canvas-background); /* auto */

  /* = Colors — Sketch sticky fills = */
  /* Sticky-note fill: butter (default) */
  --hominis-note-fill-butter: oklch(0.90 0.09 95); /* static, fork-specific */
  /* Sticky-note fill: mint */
  --hominis-note-fill-mint: oklch(0.89 0.07 155); /* static, fork-specific */
  /* Sticky-note fill: sky */
  --hominis-note-fill-sky: oklch(0.88 0.06 235); /* static, fork-specific */
  /* Sticky-note fill: blush */
  --hominis-note-fill-blush: oklch(0.87 0.07 20); /* static, fork-specific */
  /* Sticky-note fill: lilac */
  --hominis-note-fill-lilac: oklch(0.86 0.07 300); /* static, fork-specific */
  /* Sticky-note fill: slate */
  --hominis-note-fill-slate: oklch(0.80 0.02 260); /* static, fork-specific */

  /* = Colors — Canvas groups = */
  /* Canvas-group palette 'slate' (contracts/canvas-groups.md; spec H_GROUP_COLORS — theme-invariant scanning-aid family like the identity palette) */
  --hominis-group-slate: oklch(0.62 0.045 250); /* static, fork-specific */
  /* Canvas-group palette 'iris' (contracts/canvas-groups.md; spec H_GROUP_COLORS — theme-invariant scanning-aid family like the identity palette) */
  --hominis-group-iris: oklch(0.62 0.13 285); /* static, fork-specific */
  /* Canvas-group palette 'teal' (contracts/canvas-groups.md; spec H_GROUP_COLORS — theme-invariant scanning-aid family like the identity palette) */
  --hominis-group-teal: oklch(0.64 0.10 195); /* static, fork-specific */
  /* Canvas-group palette 'moss' (contracts/canvas-groups.md; spec H_GROUP_COLORS — theme-invariant scanning-aid family like the identity palette) */
  --hominis-group-moss: oklch(0.64 0.11 150); /* static, fork-specific */
  /* Canvas-group palette 'amber' (contracts/canvas-groups.md; spec H_GROUP_COLORS — theme-invariant scanning-aid family like the identity palette) */
  --hominis-group-amber: oklch(0.70 0.11 75); /* static, fork-specific */
  /* Canvas-group palette 'clay' (contracts/canvas-groups.md; spec H_GROUP_COLORS — theme-invariant scanning-aid family like the identity palette) */
  --hominis-group-clay: oklch(0.64 0.13 40); /* static, fork-specific */
  /* Canvas-group palette 'rose' (contracts/canvas-groups.md; spec H_GROUP_COLORS — theme-invariant scanning-aid family like the identity palette) */
  --hominis-group-rose: oklch(0.64 0.13 5); /* static, fork-specific */

  /* = Colors — Connection tags = */
  /* Tag-hue OKLCH lightness anchor (contracts/connections.md adjudication A1 — per-tag hue COMPUTES at runtime on these two anchors under the data-viz exemption; the tag NAME disambiguates, never color alone) */
  --hominis-tag-l: 0.62; /* static, fork-specific */
  /* Tag-hue OKLCH chroma anchor (contracts/connections.md adjudication A1) */
  --hominis-tag-c: 0.12; /* static, fork-specific */
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark-mode overrides land here. Use `fireforge token add --mode override --dark-value <v>`
       to have a token's dark value placed inside this block. */
    /* C1 lockstep repair (2026-07-12 remediation sweep): this block
     * omitted the canvas background — under SYSTEM dark (no explicit
     * data-theme) the canvas stayed light and every translucent pill
     * (62% surface mix) READ light over it while opaque surfaces
     * re-themed. The invariants audit now diffs the four themed
     * lists. */
    --hominis-canvas-background: #131317;
    --hominis-chrome-surface: #1f1f25;
    --hominis-chrome-surface-raised: #2a2a31;
    --hominis-chrome-text: #f1f1f5;
    --hominis-chrome-text-muted: #a7a7b2;
    --hominis-chrome-boundary: rgba(241, 241, 245, 0.18);
    --hominis-accent: #85aaff;
    --hominis-danger: #ff88a5;
    --hominis-canvas-grid-tint: rgba(241, 241, 245, 0.10);
    --hominis-shadow-low: 0 1px 2px rgba(0, 0, 0, 0.30), 0 1px 3px rgba(0, 0, 0, 0.40);
    --hominis-shadow-mid: 0 2px 4px rgba(0, 0, 0, 0.30), 0 8px 20px rgba(0, 0, 0, 0.45);
    --hominis-shadow-high: 0 4px 8px rgba(0, 0, 0, 0.35), 0 24px 48px rgba(0, 0, 0, 0.55);
    --hominis-chrome-surface-recessed: #1a1a20;
    --hominis-chrome-text-faint: #73737f;
    --hominis-private-accent: oklch(0.80 0.10 305);
    --hominis-accent-ink: #1b1b21;
    --hominis-chrome-line: rgba(241, 241, 245, 0.09);
    --hominis-shadow-tile: 0 2px 6px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.50);
    --hominis-shadow-tile-active: 0 4px 10px rgba(0, 0, 0, 0.40), 0 20px 48px rgba(0, 0, 0, 0.60);
  }
}

/* PRIVATE (genesis/07 forced palette; contracts/private-mode.md owns
 * the wiring): while the window is private every color token takes
 * the forced dark violet cast and the private accent — over every
 * theme, skin, and user scalar. Two mechanisms make it unbeatable:
 * (1) same specificity (0,2,0) as the theme/skin blocks + LAST IN
 * SOURCE — this block must remain the final block in this file; (2)
 * hominis-appearance.js never writes the user's inline accent in a
 * private window (an inline custom property would beat any rule
 * here). Skins keep their radius/blur/font material — private forces
 * color, not material — but the shadow recipe is re-forced dark.
 * Under forced-colors the palette is UA-overridden by design; the
 * private distinction survives through the pill's localized label
 * badge (never color-alone). Values: UX spec §11/§17,
 * accent oklch(0.64 0.17 305), surfaces hue 310. */

.hx-private {
  --hominis-accent: oklch(0.64 0.17 305);
  --hominis-chrome-surface: oklch(0.225 0.024 310);
  --hominis-chrome-surface-raised: oklch(0.265 0.024 310);
  --hominis-chrome-text: oklch(0.93 0.008 310);
  --hominis-chrome-text-muted: oklch(0.67 0.02 310);
  --hominis-chrome-boundary: oklch(0.93 0.008 310 / 0.18);
  --hominis-chrome-line: oklch(0.93 0.008 310 / 0.09);
  --hominis-danger: #ff88a5;
  --hominis-canvas-background: oklch(0.155 0.028 310);
  --hominis-canvas-grid-tint: oklch(0.275 0.034 310);
  --hominis-shadow-low: 0 1px 2px rgba(0, 0, 0, 0.55);
  --hominis-shadow-mid: 0 3px 10px rgba(0, 0, 0, 0.6);
  --hominis-shadow-high: 0 10px 28px rgba(0, 0, 0, 0.65);
  --hominis-chrome-surface-recessed: oklch(0.195 0.024 310); /* static, fork-specific */
  --hominis-chrome-text-faint: oklch(0.50 0.02 310); /* static, fork-specific */
  --hominis-private-accent: oklch(0.64 0.17 305); /* static, fork-specific */
  --hominis-accent-ink: #ffffff; /* static, fork-specific */
}
