/* tokens.css - единственный источник значений для UI Image Background Remover.
 * Линия: tools/design-line (светло + округло, один акцент, тёмной темы нет).
 * Проверка: node tools/design-line/contrast-check.mjs tokens.css
 * Акцент from product.config.mjs `accent`.
 */
:root {
  /* --- поверхность (светлая, единственная тема) --- */
  --background: #ffffff;
  --foreground: #1f2328;          /* не чистый чёрный: мягче на белом */
  --card: #f7f8fa;                /* вторичная поверхность; НЕ рамка-в-рамке */
  --card-foreground: #1f2328;
  --muted: #eef0f3;
  --muted-foreground: #59616b;

  /* --- акцент: ОДИН на экран --- */
  --primary: #c81e3a;             /* PEEL --red in peel.css; hosted feedback theme */
  --primary-foreground: #ffffff;
  --primary-muted: #f1eafd;       /* заливка выделения; текст на ней - --primary */
  --destructive: #b3261e;
  --destructive-foreground: #ffffff;

  /* --- границы и фокус --- */
  --border: #dde1e6;
  --ring: var(--primary);

  /* --- форма: округло по вкусу владелицы --- */
  --radius: 12px;
  --radius-sm: 8px;
  --border-width: 1px;
  --border-width-dashed: 2px;

  /* --- шрифт --- */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-sm: 12px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
  /* Число - главный объект этого продукта, поэтому у него свой размер и своя ширина цифр. */
  --text-number: 22px;
  --tracking-number: 0.04em;

  /* --- отступы (4px сетка) --- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;  --space-4: 16px;  --space-6: 24px;  --space-8: 32px;

  /* --- поверхность попапа --- */
  --surface-width: 360px;         /* высота НЕ фиксируется: следует состоянию (правило 30.08 №3) */
  --void-max: 24px;               /* порог остатка пустоты снизу/по бокам для compact-check */
  --list-max-height: 320px;       /* единственный контейнер с внутренней прокруткой */
  --content-max: 960px;           /* ширина полосы контента в рабочей вкладке */
  --consent-max: 680px;
  --row-min-height: 56px;         /* строка реестра */
  --dropstrip-height: 64px;       /* полоса приёма, когда файлы уже есть */
  --glyph-width: 28px;  --glyph-height: 34px;  --glyph-fold: 9px;
  --bar-height: 6px;              /* дорожка прогресса */
  --mark: 22px;                   /* фирменный знак в топбаре */
  --dot: 8px;                     /* зелёный маркер готового файла */
  --field-range: 220px;  --field-range-min: 120px;  --field-num: 96px;
  --breakpoint-narrow: 1100px;    /* единственный брейкпоинт: полноэкранная вкладка */
  --shadow: 0 4px 14px rgba(31, 35, 40, 0.08), 0 1px 2px rgba(31, 35, 40, 0.06);

  /* --- состояние пустого ввода (референс: дроп-зона донора QR) --- */
  --dropzone-height: 168px;
  --border-width-dropzone: 1.5px;
  --primary-muted-dropzone: color-mix(in srgb, var(--primary-muted) 55%, transparent);

  /* --- моушен: попап не анимируется при открытии (daily+) --- */
  --duration-fast: 120ms;
  --duration-max: 300ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* --- цели нажатия --- */
  --target-min: 44px;             /* primary-действия; пол WCAG 24px для остальных */
  --target-compact: 24px;

  /* --- размеры контролов и глифов (компонентный CSS не держит сырых px) --- */
  --control: 32px;                /* иконка-источник, Copy в строке результата */
  --btn-height: 36px;             /* обычная кнопка состояния */
  --icon: 18px;                   /* глиф в строке источников */
  --icon-sm: 16px;                /* глиф Copy */
  --meta-gap: 2px;
  /* --- v1.1 three levels (owner 10.09): action accent from icon-128.png --- */
  --accent: #c81e3a;              /* PEEL --red in peel.css; hosted feedback theme */
  --accent-muted: #f1eafd;        /* same family as --primary-muted */
  --work-ink: #1f2328;            /* work level: black ink */
  --preview-share: 40%;
  --preview-min: 340px;
  --preview-stage-max: 520px;
  --card-min: 200px;
  --row-selected: color-mix(in srgb, var(--primary-muted) 45%, transparent);
  --radius-xs: 6px;
}

/* @pair --foreground on --background */
/* @pair --card-foreground on --card */
/* @pair --muted-foreground on --background */
/* @pair --muted-foreground on --card */
/* @pair --primary-foreground on --primary */
/* @pair --destructive-foreground on --destructive */
/* @pair --primary on --primary-muted */
/* @pair --primary on --background */

/* Used only when the product tokens.css has no prefers-color-scheme block. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #14171b;
    --foreground: #e6e9ee;
    --card: #1c2027;
    --card-foreground: #e6e9ee;
    --muted: #262b33;
    --muted-foreground: #9aa3ae;
    --border: #333a44;
    --primary-foreground: #0a1b33;
  }
}
