/* Source: structured-spec */
:root {
  /* color / neutral */
  --hlp-color-neutral-900: #0f172a;
  --hlp-color-neutral-700: #334155;
  --hlp-color-neutral-500: #64748b;
  --hlp-color-neutral-300: #cbd5e1;
  --hlp-color-neutral-50: #f1f5f9;
  --hlp-color-white: #ffffff;

  /* color / primary */
  --hlp-color-primary-700: #1d4ed8;
  --hlp-color-primary-50: #eff6ff;

  /* color / accent */
  --hlp-color-accent-green-600: #2ba245;
  --hlp-color-accent-green-50: #eef8f1;
  --hlp-color-accent-orange-500: #f97316;
  --hlp-color-accent-orange-50: #fff7ed;

  /* color / semantic */
  --hlp-color-semantic-warning: #f59e0b;
  --hlp-color-semantic-error: #dc2626;

  /* color / semantic aliases */
  --hlp-color-state-info: var(--hlp-color-primary-700);
  --hlp-color-text-primary: #0f172a;
  --hlp-color-text-secondary: #334155;
  --hlp-color-text-tertiary: #64748b;
  --hlp-color-text-inverse: #ffffff;
  --hlp-color-bg-default: #ffffff;
  --hlp-color-bg-secondary: #f1f5f9;
  --hlp-color-surface-card: #ffffff;
  --hlp-color-surface-info: #eff6ff;
  --hlp-color-surface-success: #eef8f1;
  --hlp-color-surface-warning: #fff7ed;
  --hlp-color-surface-error: #fef2f2;
  --hlp-color-info-soft: var(--hlp-color-surface-info);
  --hlp-color-success-soft: var(--hlp-color-surface-success);
  --hlp-color-warning-soft: var(--hlp-color-surface-warning);
  --hlp-color-error-soft: var(--hlp-color-surface-error);
  --hlp-color-border-default: #cbd5e1;
  --hlp-color-action-primary: #1d4ed8;
  --hlp-color-action-consult: #2ba245;
  --hlp-color-state-success: #2ba245;
  --hlp-color-state-warning: #f59e0b;
  --hlp-color-state-error: #dc2626;

  /* typography */
  --hlp-font-family-cn: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --hlp-font-family-latin: "Inter", Arial, sans-serif;
  --hlp-type-display-size: 48px;
  --hlp-type-display-line-height: 1.2;
  --hlp-type-display-weight: 700;
  --hlp-type-headline-size: 32px;
  --hlp-type-headline-line-height: 1.3;
  --hlp-type-headline-weight: 700;
  --hlp-type-title-size: 24px;
  --hlp-type-title-line-height: 1.4;
  --hlp-type-title-weight: 600;
  --hlp-type-subtitle-size: 18px;
  --hlp-type-subtitle-line-height: 1.5;
  --hlp-type-subtitle-weight: 500;
  --hlp-type-body-size: 16px;
  --hlp-type-body-line-height: 1.6;
  --hlp-type-body-weight: 400;
  --hlp-type-body-sm-size: 14px;
  --hlp-type-body-sm-line-height: 1.5;
  --hlp-type-body-sm-weight: 400;
  --hlp-type-label-size: 14px;
  --hlp-type-label-line-height: 1.4;
  --hlp-type-label-weight: 600;
  --hlp-type-caption-size: 12px;
  --hlp-type-caption-line-height: 1.4;
  --hlp-type-caption-weight: 400;
  --hlp-type-metric-size: 40px;
  --hlp-type-metric-line-height: 1.1;
  --hlp-type-metric-weight: 700;

  /* spacing */
  --hlp-space-1: 4px;
  --hlp-space-2: 8px;
  --hlp-space-3: 12px;
  --hlp-space-4: 16px;
  --hlp-space-6: 24px;
  --hlp-space-8: 32px;
  --hlp-space-12: 48px;
  --hlp-space-16: 64px;
  --hlp-space-24: 96px;

  /* radius */
  --hlp-radius-xs: 4px;
  --hlp-radius-sm: 6px;
  --hlp-radius-md: 8px;
  --hlp-radius-lg: 12px;
  --hlp-radius-xl: 16px;
  --hlp-radius-pill: 100px;
  --hlp-radius-full: 9999px;

  /* shadow */
  --hlp-shadow-none: 0 0 0 0 rgba(15, 23, 42, 0);
  --hlp-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --hlp-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.10), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --hlp-shadow-hover: 0 10px 15px -3px rgba(15, 23, 42, 0.10), 0 4px 6px -4px rgba(15, 23, 42, 0.05);

  /* motion */
  --hlp-duration-fast: 150ms;
  --hlp-duration-normal: 200ms;
  --hlp-duration-slow: 300ms;
  --hlp-ease-standard: ease;

  /* layout */
  --hlp-layout-mobile: 375px;
  --hlp-layout-tablet: 768px;
  --hlp-layout-desktop: 1024px;
  --hlp-layout-wide: 1440px;
  --hlp-layout-content-max: 1200px;
  --hlp-layout-landing-max: 1120px;
  --hlp-layout-reading-max: 800px;
  --hlp-layout-form-max: 640px;

  /* portable aliases */
  --color-neutral-900: var(--hlp-color-neutral-900);
  --color-neutral-700: var(--hlp-color-neutral-700);
  --color-neutral-500: var(--hlp-color-neutral-500);
  --color-neutral-300: var(--hlp-color-neutral-300);
  --color-neutral-50: var(--hlp-color-neutral-50);
  --color-white: var(--hlp-color-white);
  --color-primary-700: var(--hlp-color-primary-700);
  --color-primary-50: var(--hlp-color-primary-50);
  --color-accent-green-600: var(--hlp-color-accent-green-600);
  --color-accent-green-50: var(--hlp-color-accent-green-50);
  --color-accent-orange-500: var(--hlp-color-accent-orange-500);
  --color-accent-orange-50: var(--hlp-color-accent-orange-50);
  --color-semantic-warning: var(--hlp-color-semantic-warning);
  --color-semantic-error: var(--hlp-color-semantic-error);
  --color-primary: var(--hlp-color-action-primary);
  --color-info: var(--hlp-color-state-info);
  --color-success: var(--hlp-color-state-success);
  --color-warning: var(--hlp-color-state-warning);
  --color-error: var(--hlp-color-state-error);
  --color-text-primary: var(--hlp-color-text-primary);
  --color-text-secondary: var(--hlp-color-text-secondary);
  --color-text-tertiary: var(--hlp-color-text-tertiary);
  --color-text-inverse: var(--hlp-color-text-inverse);
  --color-bg-default: var(--hlp-color-bg-default);
  --color-bg-secondary: var(--hlp-color-bg-secondary);
  --color-surface-card: var(--hlp-color-surface-card);
  --color-surface-info: var(--hlp-color-surface-info);
  --color-surface-success: var(--hlp-color-surface-success);
  --color-surface-warning: var(--hlp-color-surface-warning);
  --color-surface-error: var(--hlp-color-surface-error);
  --color-info-soft: var(--hlp-color-info-soft);
  --color-success-soft: var(--hlp-color-success-soft);
  --color-warning-soft: var(--hlp-color-warning-soft);
  --color-error-soft: var(--hlp-color-error-soft);
  --color-border-default: var(--hlp-color-border-default);
  --color-action-primary: var(--hlp-color-action-primary);
  --color-action-consult: var(--hlp-color-action-consult);
  --color-state-info: var(--hlp-color-state-info);
  --color-state-success: var(--hlp-color-state-success);
  --color-state-warning: var(--hlp-color-state-warning);
  --color-state-error: var(--hlp-color-state-error);
  --font-family-cn: var(--hlp-font-family-cn);
  --font-family-latin: var(--hlp-font-family-latin);
  --type-display-size: var(--hlp-type-display-size);
  --type-display-line-height: var(--hlp-type-display-line-height);
  --type-display-weight: var(--hlp-type-display-weight);
  --type-headline-size: var(--hlp-type-headline-size);
  --type-headline-line-height: var(--hlp-type-headline-line-height);
  --type-headline-weight: var(--hlp-type-headline-weight);
  --type-title-size: var(--hlp-type-title-size);
  --type-title-line-height: var(--hlp-type-title-line-height);
  --type-title-weight: var(--hlp-type-title-weight);
  --type-subtitle-size: var(--hlp-type-subtitle-size);
  --type-subtitle-line-height: var(--hlp-type-subtitle-line-height);
  --type-subtitle-weight: var(--hlp-type-subtitle-weight);
  --type-body-size: var(--hlp-type-body-size);
  --type-body-line-height: var(--hlp-type-body-line-height);
  --type-body-weight: var(--hlp-type-body-weight);
  --type-body-sm-size: var(--hlp-type-body-sm-size);
  --type-body-sm-line-height: var(--hlp-type-body-sm-line-height);
  --type-body-sm-weight: var(--hlp-type-body-sm-weight);
  --type-label-size: var(--hlp-type-label-size);
  --type-label-line-height: var(--hlp-type-label-line-height);
  --type-label-weight: var(--hlp-type-label-weight);
  --type-caption-size: var(--hlp-type-caption-size);
  --type-caption-line-height: var(--hlp-type-caption-line-height);
  --type-caption-weight: var(--hlp-type-caption-weight);
  --type-metric-size: var(--hlp-type-metric-size);
  --type-metric-line-height: var(--hlp-type-metric-line-height);
  --type-metric-weight: var(--hlp-type-metric-weight);
  --space-1: var(--hlp-space-1);
  --space-2: var(--hlp-space-2);
  --space-3: var(--hlp-space-3);
  --space-4: var(--hlp-space-4);
  --space-6: var(--hlp-space-6);
  --space-8: var(--hlp-space-8);
  --space-12: var(--hlp-space-12);
  --space-16: var(--hlp-space-16);
  --space-24: var(--hlp-space-24);
  --radius-xs: var(--hlp-radius-xs);
  --radius-sm: var(--hlp-radius-sm);
  --radius-md: var(--hlp-radius-md);
  --radius-lg: var(--hlp-radius-lg);
  --radius-xl: var(--hlp-radius-xl);
  --radius-pill: var(--hlp-radius-pill);
  --radius-full: var(--hlp-radius-full);
  --shadow-none: var(--hlp-shadow-none);
  --shadow-sm: var(--hlp-shadow-sm);
  --shadow-md: var(--hlp-shadow-md);
  --shadow-hover: var(--hlp-shadow-hover);
  --duration-fast: var(--hlp-duration-fast);
  --duration-normal: var(--hlp-duration-normal);
  --duration-slow: var(--hlp-duration-slow);
  --ease-standard: var(--hlp-ease-standard);
  --layout-mobile: var(--hlp-layout-mobile);
  --layout-tablet: var(--hlp-layout-tablet);
  --layout-desktop: var(--hlp-layout-desktop);
  --layout-wide: var(--hlp-layout-wide);
  --layout-content-max: var(--hlp-layout-content-max);
  --layout-landing-max: var(--hlp-layout-landing-max);
  --layout-reading-max: var(--hlp-layout-reading-max);
  --layout-form-max: var(--hlp-layout-form-max);

  /* admin aliases */
  --admin-color-primary: var(--hlp-color-action-primary);
  --admin-color-success: var(--hlp-color-state-success);
  --admin-color-warning: var(--hlp-color-state-warning);
  --admin-color-error: var(--hlp-color-state-error);
  --admin-color-text: var(--hlp-color-text-primary);
  --admin-color-text-secondary: var(--hlp-color-text-secondary);
  --admin-color-border: var(--hlp-color-border-default);
  --admin-color-bg-layout: var(--hlp-color-bg-secondary);
  --admin-color-bg-container: var(--hlp-color-surface-card);
  --admin-radius-md: var(--hlp-radius-md);
  --admin-shadow-popup: var(--hlp-shadow-md);

  /* miniapp aliases */
  --miniapp-color-primary: var(--hlp-color-action-primary);
  --miniapp-color-accent: var(--hlp-color-action-consult);
  --miniapp-color-page-bg: var(--hlp-color-bg-default);
  --miniapp-color-card-bg: var(--hlp-color-surface-card);
  --miniapp-color-text: var(--hlp-color-text-primary);
  --miniapp-color-text-secondary: var(--hlp-color-text-secondary);
  --miniapp-color-border: var(--hlp-color-border-default);
  --miniapp-color-success: var(--hlp-color-state-success);
  --miniapp-color-warning: var(--hlp-color-state-warning);
  --miniapp-color-error: var(--hlp-color-state-error);
  --miniapp-radius-card: var(--hlp-radius-lg);
  --miniapp-control-height: var(--hlp-space-12);
}

.dark {
  --hlp-color-state-info: #60a5fa;
  --hlp-color-text-primary: #e2e8f0;
  --hlp-color-text-secondary: #cbd5e1;
  --hlp-color-text-tertiary: #94a3b8;
  --hlp-color-text-inverse: #0f172a;
  --hlp-color-bg-default: #0f172a;
  --hlp-color-bg-secondary: #162033;
  --hlp-color-surface-card: #162033;
  --hlp-color-surface-info: #112545;
  --hlp-color-surface-success: #10281b;
  --hlp-color-surface-warning: #33230f;
  --hlp-color-surface-error: #34161a;
  --hlp-color-info-soft: var(--hlp-color-surface-info);
  --hlp-color-success-soft: var(--hlp-color-surface-success);
  --hlp-color-warning-soft: var(--hlp-color-surface-warning);
  --hlp-color-error-soft: var(--hlp-color-surface-error);
  --hlp-color-border-default: rgba(203, 213, 225, 0.16);
  --hlp-color-action-primary: #60a5fa;
  --hlp-color-action-consult: #4ade80;
  --hlp-color-state-success: #4ade80;
  --hlp-color-state-warning: #f59e0b;
  --hlp-color-state-error: #f87171;
}
