/* ============================================================================
   ACTIVE — shared brand tokens
   ----------------------------------------------------------------------------
   Canonical copy. Mirrored byte-for-byte into:
     running/cycling/hiking: src/styles/brand-tokens.css
     health:                 dashboard/brand-tokens.css

   The palette is not invented here: every surface/text/line colour is read
   from the live main site (zhubao315.github.io, BaseLayout CSS), and the
   site accents are the main site's own direction colours:
     --build  #38bdf8 → health      --think  #fbbf24 → cycling
     --measure #34d399 → hiking     running keeps #d9f36a (owner decision).

   Rules that must survive any local change:

   1. A site's accent colour is a brand colour, not a data colour. Health
      metric colours (sleep, HRV, RHR, stress, load) keep their own meaning
      and are never replaced by the site accent.
   2. Every colour is a token. A component never hard-codes a hex value.
   3. Dark is the default surface of the brand; light is the same design read
      on paper. Both themes ship from the same token names.
   ========================================================================== */

:root {
  /* --- mother brand ------------------------------------------------------ */
  --active-brand: 'ACTIVE';
  --active-brand-zh: '朱宝 · 运动与健康数字档案';
  --active-brand-en: 'PERSONAL HEALTH & ACTIVE LIFE';
  --active-owner: 'zhubao315';
  /* v3.0 PRECISION MOTION identity */
  --active-tagline: 'MOVE · MEASURE · EXPLORE';
  --active-slogan: '用数据记录每一次前进。';
  --active-wordmark-tracking: 2.2px; /* Manrope ExtraBold 800 */
  --active-sub-tracking: 2.1px; /* Fira Code Medium 500 */
  --active-mark-blue: #2563eb; /* the A's descending leg */
  --active-mark-cyan: #38bdf8; /* the ascending leg */
  --active-mark-arc: #22d3ee; /* the motion arc */
  --active-watch-node: #34d399; /* healthy status only */
  --active-watch-line: #94a3b8; /* control-centre connectors */

  /* --- surfaces (dark is the house style: the main site's canvas) ------- */
  --active-canvas: #07111f; /* 主站 --canvas */
  --active-navy: #0b1d33; /* 主站 --navy */
  --active-navy-3: #13263d; /* 主站 --navy-3 */
  --active-bg: var(--active-canvas);
  --active-surface: #102a43;
  --active-surface-raised: #13263d;
  --active-surface-hover: #16324e;
  --active-border: rgba(247, 250, 255, 0.16); /* 主站 --line-dark 家族 */
  --active-border-strong: rgba(247, 250, 255, 0.32); /* 主站 --line-dark-strong */

  /* --- text -------------------------------------------------------------- */
  --active-text: #f7faff; /* 主站 --paper */
  --active-text-secondary: #cbd5e1;
  --active-text-muted: #94a3b8; /* 主站 --muted-light */
  --active-text-dim: #64748b;

  /* --- light surfaces (the main site's paper) ---------------------------- */
  --active-light-bg: #f7faff; /* 主站 --paper */
  --active-light-surface: #ffffff;
  --active-light-surface-2: #eef2f7; /* 主站 --paper-2 */
  --active-light-surface-3: #d9e1ec; /* 主站 --paper-3 */
  --active-light-text: #101828; /* 主站 --ink */
  --active-light-text-secondary: #38495b;
  --active-light-text-muted: #667085; /* 主站 --muted */
  --active-light-border: rgba(16, 24, 40, 0.14); /* 主站 --line 家族 */
  --active-light-border-strong: rgba(16, 24, 40, 0.3); /* 主站 --line-strong */

  /* --- site accents ------------------------------------------------------
     A site uses its own pair and nothing else. health/cycling/hiking are
     the main site's direction colours; running keeps its lime by owner
     decision — the one deliberate exception to the main-site palette. */
  --active-accent-health: #38bdf8; /* 主站 --build */
  --active-accent-health-2: #0ea5e9;
  --active-accent-running: #d9f36a; /* owner exception, see BRAND_SYSTEM.md */
  --active-accent-running-2: #a3b82f;
  --active-accent-cycling: #fbbf24; /* 主站 --think */
  --active-accent-cycling-2: #f59e0b;
  --active-accent-hiking: #34d399; /* 主站 --measure */
  --active-accent-hiking-2: #10b981;

  /* --- status / utility colours ------------------------------------------ */
  --active-success: #34d399;
  --active-warning: #f59e0b;
  --active-danger: #f43f5e;
  --active-link: #2563eb; /* 主站 --electric */
  --active-link-ink: #1d4ed8; /* 主站 --electric-ink */
  --active-link-hi: #60a5fa; /* 主站 --electric-hi */

  /* --- health metric semantics -------------------------------------------
     Metric colours never change with the site accent: sleep stays indigo,
     HRV stays emerald, resting heart rate stays rose. */
  --active-metric-sleep: #6366f1;
  --active-metric-hrv: #10b981;
  --active-metric-rhr: #f43f5e;
  --active-metric-stress: #f59e0b;
  --active-metric-load: #38bdf8;

  /* --- geometry ---------------------------------------------------------- */
  --active-radius: 12px;
  --active-radius-sm: 8px;
  --active-radius-xs: 6px;
  --active-radius-pill: 999px;
  --active-space: 4px;
  --active-shell: 1440px; /* the one content width all four sites share */
  --active-gutter: clamp(1rem, 3vw, 2rem);
  --active-header-h: 64px;
  --active-header-h-sm: 56px;

  /* --- type --------------------------------------------------------------
     Text faces are the main site's (Inter for reading, Manrope for display),
     self-hosted under each site's /fonts/. CJK falls back to the system
     stack. Numerals, times, distances and paces stay in Fira Code. */
  --active-font-sans: 'Inter Variable', 'Manrope Variable', 'Noto Sans CJK SC',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --active-font-display: 'Manrope Variable', 'Inter Variable', 'Noto Sans CJK SC',
    'PingFang SC', sans-serif;
  --active-font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;

  --active-ease: cubic-bezier(0.22, 0.72, 0.2, 1); /* 主站 --ease */
  --active-ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* 主站 --ease-out */
  --active-fast: 160ms;
  --active-medium: 260ms;

  /* --- mobile navigation -------------------------------------------------- */
  --active-mobile-nav-height: 60px;
  --active-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* The mobile bottom bar exists only on small screens; the desktop header
   keeps the full navigation. */
@media (min-width: 769px) {
  :root {
    --active-mobile-nav-height: 0px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --active-fast: 0ms;
    --active-medium: 0ms;
  }
}
