/* Текст «Песка» — вариант A «Простор» (наряд 2714f, кусок 1; проверка дизайна 19.11.2026, слово владельца «делай куски»).
   Тот же Source Sans 3 (public/fonts, @font-face в ap.css), буква крупнее, строка просторнее: 15 / 14 / 13, заголовок 22,
   строка таблицы 40, поле 36, межстрочный 1,5. Замер и снимки «сейчас / A / B / C» — dev-docs/ui-shots/2714f/report.md.
   Только под «Песком» (html[data-skin="sand"]): «Стекло» и «Как было» не меняются. Откат — убрать подключение
   в partial/ap_head.blade.php; ap.css и style.css этим файлом не правятся (style.css заморожен до этапа 13).
   Раздел 2 — старые экраны (не v2): их текст идёт из style.css (CoreSansA45 12 px, разрядка .5px), здесь — общий шрифт. */

/* ============================================================
   1. Новые экраны: токены и шкала. Вес html[data-skin] (0,1,1) выше :root (0,1,0) в ap.css.
   ============================================================ */
html[data-skin="sand"] {
    --ap-fs-base: 15px;    /* ap.css: 14 */
    --ap-fs-sm: 14px;      /* 13 */
    --ap-fs-xs: 13px;      /* 12: шапка таблицы, бейджи */
    --ap-fs-title: 22px;   /* 20 */
    --ap-row: 40px;        /* 36 */
    --ap-control: 36px;    /* 32 */
    /* --ap-nav-w не меняется: от 220 зависит отступ .main старых экранов (style.css:214, ap-shell.css:80) */
}
html[data-skin="sand"] .ap { line-height: 1.5; letter-spacing: .005em; }
html[data-skin="sand"] .ap .ap-table thead th { height: 34px; font-weight: 600; letter-spacing: .01em; }
html[data-skin="sand"] .ap .ap-table--dense thead tr:first-child th { height: 34px; }
html[data-skin="sand"] .ap .ap-table--dense thead tr:nth-child(2) th { top: 34px; height: 28px; }
html[data-skin="sand"] .ap-btn--sm,
html[data-skin="sand"] .ap-filterbar .ap-select,
html[data-skin="sand"] .c2-colset,
html[data-skin="sand"] .c2-exp-stage { height: 30px; }
html[data-skin="sand"] .ap-shell-head__crumb--current { font-size: 17px; }

/* ============================================================
   2. Старые экраны: общий шрифт без разрядки, 14 px. !important — против style.css:21–27 (html, body: font-family,
      font-size 12px, letter-spacing .5px) и его частных правил с !important; новые блоки (.ap) не задеваются.
   ============================================================ */
html[data-skin="sand"]:not([data-ap-shell]),
html[data-skin="sand"]:not([data-ap-shell]) body,
html[data-skin="sand"]:not([data-ap-shell]) .main .table:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .main .form-control:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .main .btn:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .main select:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .main textarea:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .main input:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .modal .form-control,
html[data-skin="sand"]:not([data-ap-shell]) .modal .btn {
    font-family: var(--ap-font) !important;
    letter-spacing: normal !important;
    font-feature-settings: var(--ap-font-features);
}
html[data-skin="sand"]:not([data-ap-shell]) body { font-size: 14px !important; line-height: 1.5 !important; }
html[data-skin="sand"]:not([data-ap-shell]) .main table:not(.ap-table):not(.ap *) td,
html[data-skin="sand"]:not([data-ap-shell]) .main table:not(.ap-table):not(.ap *) th { font-size: 14px !important; }
html[data-skin="sand"]:not([data-ap-shell]) .main table:not(.ap-table):not(.ap *) th {   /* и th в tbody: шапка кассы (#kassaDriversTable) так свёрстана */
    font-size: 13px !important; font-weight: 600 !important; letter-spacing: normal !important;   /* style.css:1333 .8px */
}
html[data-skin="sand"]:not([data-ap-shell]) .main .form-control:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .main .btn:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .main input:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .main select:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .main textarea:not(.ap *) { font-size: 14px !important; }
html[data-skin="sand"]:not([data-ap-shell]) .main label:not(.ap *),
html[data-skin="sand"]:not([data-ap-shell]) .main .auto_add p:not(.ap *) { font-size: 14px !important; letter-spacing: normal !important; }
/* заголовки разделов старых форм: одна шкала вместо 24 / 21 / 18 (h2 «Паспорт», h3 /kassa, h4 /fines) */
html[data-skin="sand"]:not([data-ap-shell]) .main h2:not(.ap *) { font-size: 20px !important; font-weight: 650 !important; letter-spacing: -.01em !important; }
html[data-skin="sand"]:not([data-ap-shell]) .main h3:not(.ap *) { font-size: 18px !important; font-weight: 650 !important; letter-spacing: normal !important; }
html[data-skin="sand"]:not([data-ap-shell]) .main h4:not(.ap *) { font-size: 16px !important; font-weight: 650 !important; letter-spacing: normal !important; }

/* Меню рамки — прежние 14 / 13 / 12: ширина меню 220 не меняется, при 15 / 14 пункты обрезались бы чаще. */
html[data-skin="sand"] #apShellNav { --ap-fs-base: 14px; --ap-fs-sm: 13px; --ap-fs-xs: 12px; }
/* Шапка и меню рамки (и на экранах v2) наследовали разрядку .5px от body (style.css:21–27): почта, ⌘K. */
html[data-skin="sand"] :is(#apShellNav, .ap-shell-head) { letter-spacing: normal; }

/* /cargo2/orders: чип статуса 124 px (cargo-v2.css:111) резал «Новый заказ» до «Новый за…» при тексте «Простора» — шире */
html[data-skin="sand"] .ap .ap-table--dense td .ap-status--chip { max-width: 150px; }
