/* Единый источник токенов оформления: роли текста, шкала отступов, геометрия меню задачи, радиусы,
 * строка попапа, вторичное действие. Свод: docs/design-system/DESIGN_SYSTEM_RU.md (DS-TYPE-02, DS-SPACE-01,
 * DS-SHAPE-01, DS-SHAPE-02, DS-MENU-02, DS-ACT-02, DS-CHG-05). Размер шрифта, радиус и цвет в стилях
 * задаются через var(--…); литерал вне токена не проходит scripts/check-design-tokens.cjs.
 * Файл грузится первым из стилей оформления: значение токена меняется здесь, в одном месте.
 *
 * Единая шкала шрифтов приложения (см. ANDROID_TASKMENU_PORT_PROMPT.md §190).
 * 6 ролей вместо разрозненных размеров текста. Размеры интерфейсного текста
 * переведены на переменные; восемь оставшихся литералов относятся к
 * содержимому заметок, рисунку и миниатюрам. Интерфейсные насыщенности и
 * межстрочные интервалы также ссылаются на роли; собственная типографика
 * документа и геометрия значков сохраняются отдельно (DS-TYPE-04, DS-ICON-01).
 *
 * Роли:
 *  title     — заголовок экрана/страницы (.page-title, заголовок редактора
 *              проекта/идеи)
 *  heading   — заголовок поля/сущности (название задачи, название заметки)
 *  body      — основной текст: короткие подписи и ряды (название в списке,
 *              подписи рядов меню задачи, текст кнопки/чипа с подписью)
 *  reading   — текст ДЛЯ ЧТЕНИЯ: то же 15px, что у body, но обычное
 *              начертание (400, не 500) — длинный многострочный текст
 *              (описание задачи/проекта, тело комментария) плохо читается
 *              полужирным, а 12px «вторичного» для него слишком мелко —
 *              это контент, который реально читают целиком, не метаданные
 *  secondary — вторичный: метаданные, вторая строка списка, суммы/счётчики,
 *              чипы даты/срока/напоминания, строка статистики
 *  caption   — подпись/счётчик — нижняя граница, не уходить мельче для
 *              настоящего текста (таймстемпы, подпись нижней навигации,
 *              правая колонка списка)
 */
:root{
  /* Priority colours P1–P4 (the flag and the status circle of the task window; the same hues as the previous menu). */
  --dj-priority-1:#d55242;--dj-priority-2:#e9a268;--dj-priority-3:#77a7c8;--dj-priority-4:#a7a39d;
  --dj-calendar-selected:#f28b20;
  --dj-calendar-today:#d8483c;
  /* Desktop/Windows keeps the existing compact scale. */
  --dj-text-title-size:24px;     --dj-text-title-weight:700;     --dj-text-title-line-height:1.2;
  --dj-text-heading-size:19px;   --dj-text-heading-weight:700;   --dj-text-heading-line-height:1.15;
  --dj-text-body-size:15px;      --dj-text-body-weight:500;      --dj-text-body-line-height:1.25;
  --dj-text-reading-size:15px;   --dj-text-reading-weight:400;   --dj-text-reading-line-height:1.35;
  --dj-text-secondary-size:12px; --dj-text-secondary-weight:400; --dj-text-secondary-line-height:1.55;
  --dj-text-caption-size:11px;   --dj-text-caption-weight:500;   --dj-text-caption-line-height:1.5;
  /* Ceiling for the phone dock labels at a large system text size (DS-NAV-04). */
  --dj-text-dock-max-size:16px;

  /* Shared 4px spatial scale for new and touched layouts. */
  --dj-space-1:4px; --dj-space-2:8px; --dj-space-3:12px;
  --dj-space-4:16px; --dj-space-6:24px; --dj-space-8:32px;

  /* Shared task-menu geometry. The value is a minimum: content is always
   * allowed to make a structural/content row taller. */
  --dj-task-property-min-height:34px;
  --dj-task-content-min-height:34px;
  --dj-task-property-padding-x:12px;
  --dj-task-content-padding-y:6px;

  /* Radius scale. Chip — an element of choice and the container of a segment; popup — the container of any
   * floating menu and of a grouped list; popup-row — a full-width row inside a popup. Circle and pill are
   * shapes, not sizes: an icon-only button and a tag. The values are the same on every width. */
  --dj-radius-chip:8px;
  --dj-radius-popup:10px;
  --dj-radius-popup-row:7px;
  /* Field — inputs, selects, text areas. Card — a standalone surface: card, panel, metric, grouped block. */
  --dj-radius-field:8px;
  --dj-radius-card:10px;
  /* Window — a large dialog or sheet. Detail — a tiny mark: legend square, history cell, badge, inline code. */
  --dj-radius-window:18px;
  --dj-radius-detail:3px;
  --dj-radius-circle:50%;
  --dj-radius-pill:999px;
  /* Text button (.btn): one radius in every style. Styles that draw their own corners (generated corners of
   * design/control-geometry.js, the primary button of the Art Nouveau style) build on top of it. */
  --dj-radius-button:var(--dj-radius-chip);

  /* Icon sizes (DS-ICON-01): compact — dense rows and metadata, standard — buttons and rows, large — section
   * headings, accent — section title icons and main buttons. */
  --dj-icon-line-height:1;
  --dj-icon-compact:16px;
  --dj-icon-standard:20px;
  --dj-icon-large:28px;
  --dj-icon-accent:52px;

  /* Popup row: minimum height (DS-MENU-02). */
  --dj-minheight-popup-row:36px;

  /* Secondary action: visual priority is independent of the button shape. Theme colours come from the theme
   * variables, not from component literals. */
  --dj-action-secondary-bg:color-mix(in srgb,var(--accent) 9%,var(--panel));
  --dj-action-secondary-pressed:color-mix(in srgb,var(--accent) 32%,var(--panel));
}

/* Existing phone layout band. */
@media(max-width:599px){
  :root{
    --dj-minheight-popup-row:44px;
    --dj-text-title-size:26px;     --dj-text-title-weight:700;     --dj-text-title-line-height:1.15;
    --dj-text-heading-size:21px;   --dj-text-heading-weight:700;   --dj-text-heading-line-height:1.2;
    --dj-text-body-size:17px;      --dj-text-body-weight:500;      --dj-text-body-line-height:1.25;
    --dj-text-reading-size:16px;   --dj-text-reading-weight:400;   --dj-text-reading-line-height:1.45;
    --dj-text-secondary-size:14px; --dj-text-secondary-weight:400; --dj-text-secondary-line-height:1.3;
    --dj-text-caption-size:12px;   --dj-text-caption-weight:500;   --dj-text-caption-line-height:1.25;
    --dj-task-property-min-height:46px;
    --dj-task-content-min-height:46px;
  }
}

/* Existing Android wide/Fold/tablet layout band. Only the two top hierarchy
 * levels grow versus phone; working text keeps the same physical size. */
@media(min-width:600px) and (max-width:1024px){
  :root{
    --dj-minheight-popup-row:44px;
    --dj-text-title-size:28px;     --dj-text-title-weight:700;     --dj-text-title-line-height:1.15;
    --dj-text-heading-size:22px;   --dj-text-heading-weight:700;   --dj-text-heading-line-height:1.2;
    --dj-text-body-size:17px;      --dj-text-body-weight:500;      --dj-text-body-line-height:1.25;
    --dj-text-reading-size:16px;   --dj-text-reading-weight:400;   --dj-text-reading-line-height:1.45;
    --dj-text-secondary-size:14px; --dj-text-secondary-weight:400; --dj-text-secondary-line-height:1.3;
    --dj-text-caption-size:12px;   --dj-text-caption-weight:500;   --dj-text-caption-line-height:1.25;
    --dj-task-property-min-height:44px;
    --dj-task-content-min-height:44px;
  }
}
