/* Токены взяты из karo: internal/web/skin-apple.css, коммит 0255fd3e 2026-11-09 (ветка karo-map на 8a5cf0e2, 10.11.2026).
   Поменялись токены в karo — сверить эту копию. */
/* «Вторичная почта» — стили интерфейса. Токены (цвета, шрифты, скругления,
   состояния) — из стиля новой версии «Развития» karo (internal/web/skin-apple.css,
   выбор Артура 06–07.11): своя копия, сервис к karo не обращается.
   Тема: <html data-mode="light|dark">; без выбора — как в системе (vt.js). */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs: 14px; --radius: 12px; --radius-field: 9px; --radius-chip: 999px;
  --bg: #f2f2f7; --panel: #ffffff; --surface: #ffffff; --surface-2: #f2f2f7;
  --line: #e5e5ea; --line-strong: #c7c7cc; --ink: #1d1d1f; --muted: #6e6e73; --faint: #a1a1a6;
  --accent: #007aff; --accent-soft: rgba(0, 122, 255, .12); --on-accent: #ffffff;
  --header-bg: rgba(246, 246, 248, .74); --header-line: rgba(0, 0, 0, .1);
  --header-hover: rgba(120, 120, 128, .12); --header-cur-bg: rgba(120, 120, 128, .16); --header-track: rgba(120, 120, 128, .2);
  --bad: #d70015; --bad-bg: rgba(255, 59, 48, .12); --part: #b25000; --part-bg: rgba(255, 149, 0, .15);
  --ok: #248a3d; --ok-bg: rgba(52, 199, 89, .15); --wait: #0040dd; --wait-bg: rgba(0, 122, 255, .11);
  --off: #6e6e73; --off-bg: rgba(120, 120, 128, .12);
  --ap-fill: rgba(120, 120, 128, .12); --ap-sep: rgba(60, 60, 67, .14);
  /* Шкала «сколько писем» (календарь): свои токены, не --ok — тот значит «всё хорошо». У каждой ступени свой цвет текста. */
  --heat-1: #d2f3da; --heat-1-ink: #1d1d1f; --heat-2: #a3e6b3; --heat-2-ink: #1d1d1f; --heat-3: #6dd785; --heat-3-ink: #1d1d1f;
  --heat-4: #1f7534; --heat-4-ink: #ffffff; --heat-0-ink: #1d1d1f;
  --ap-seg-on: #ffffff; --ap-seg-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04);
  --ap-blur: saturate(180%) blur(26px);
  --row-hover: rgba(120, 120, 128, .07);
}
:root[data-mode="dark"] {
  color-scheme: dark;
  --bg: #000000; --panel: #1c1c1e; --surface: #2c2c2e; --surface-2: #2c2c2e;
  --line: #38383a; --line-strong: #48484a; --ink: #f5f5f7; --muted: #98989d; --faint: #636366;
  --accent: #0a84ff; --accent-soft: rgba(10, 132, 255, .2);
  --header-bg: rgba(30, 30, 32, .74); --header-line: rgba(255, 255, 255, .09);
  --header-hover: rgba(120, 120, 128, .24); --header-cur-bg: rgba(120, 120, 128, .32); --header-track: rgba(120, 120, 128, .36);
  --bad: #ff6961; --bad-bg: rgba(255, 69, 58, .18); --part: #ffb340; --part-bg: rgba(255, 159, 10, .18);
  --ok: #4cd964; --ok-bg: rgba(48, 209, 88, .17); --wait: #64a8ff; --wait-bg: rgba(10, 132, 255, .18);
  --off: #98989d; --off-bg: rgba(120, 120, 128, .24);
  --ap-fill: rgba(120, 120, 128, .24); --ap-sep: rgba(84, 84, 88, .55);
  --heat-1: #20442a; --heat-1-ink: #f5f5f7; --heat-2: #256d37; --heat-2-ink: #f5f5f7; --heat-3: #2a9e48; --heat-3-ink: #101012;
  --heat-4: #30d158; --heat-4-ink: #101012; --heat-0-ink: #f5f5f7;
  --ap-seg-on: #636366; --ap-seg-shadow: 0 3px 8px rgba(0, 0, 0, .3), 0 0 0 .5px rgba(0, 0, 0, .2);
  --row-hover: rgba(120, 120, 128, .16);
}

* { box-sizing: border-box; }
input, select, button, option { font: inherit; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: var(--fs); letter-spacing: -.006em; line-height: 1.42;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:is(button, a, select, input, [tabindex]):focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 1px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* Шапка как на GitHub (слово Артура 10.11): сверху название и кнопки, под ними
   вкладки разделов — текущая с чертой снизу, у вкладки счётчик. Высота шапки
   постоянная (--header-h): по ней держатся шапка таблицы и карточка письма. */
:root { --header-h: 93px; }
body > header { position: sticky; top: 0; z-index: 5; height: var(--header-h); background: var(--header-bg);
  border-bottom: 1px solid var(--header-line); -webkit-backdrop-filter: var(--ap-blur); backdrop-filter: var(--ap-blur); }
header .top { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; }
header h1 { font-family: var(--font-head); font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 0; white-space: nowrap; }
header .right { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
header button { background: transparent; color: var(--ink); border: 1px solid var(--header-track); border-radius: var(--radius-field);
  padding: 5px 12px; font-size: 13px; font-weight: 500; cursor: pointer; }
header button:hover { background: var(--header-hover); }
header .tabs { display: flex; gap: 4px; height: 44px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
header .tabs a { display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--ink); white-space: nowrap;
  border-bottom: 2px solid transparent; }
header .tabs a:hover { text-decoration: none; background: var(--header-hover); border-radius: var(--radius-field) var(--radius-field) 0 0; }
header .tabs a[aria-current] { font-weight: 600; border-bottom-color: var(--accent); }
/* Счётчик-капсула у вкладки и у «Все / С файлами». */
.cnt { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: var(--radius-chip); background: var(--ap-fill);
  color: var(--ink); font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.cnt.bad { background: var(--bad-bg); color: var(--bad); }

/* Поля и кнопки. */
label, .label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 5px; }
input[type=text], input[type=date], input[type=password], input[type=search], select { width: 100%; padding: 9px 12px; font: inherit;
  border: 1px solid var(--line-strong); border-radius: var(--radius-field); background: var(--surface); color: var(--ink); }
input:hover, select:hover { border-color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
button.main { background: var(--accent); color: var(--on-accent); border: 0; border-radius: var(--radius-field); padding: 10px 16px;
  font: inherit; font-weight: 600; cursor: pointer; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }

/* Раскладка «Писем»: отборы слева, список, карточка письма справа. */
/* Место под карточку письма занято всегда (пока письмо не выбрано — подсказка):
   открытие и закрытие письма не сдвигают список ни на пиксель. */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 16px; padding: 0 16px 16px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
/* minmax(0, 1fr): иначе колонка растягивается под самое широкое поле и вылезает из панели. */
aside.filters { padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: sticky; top: 72px; }
aside.filters h2, .card h3, .tile h2 { font-family: var(--font-head); font-size: 14px; font-weight: 650; margin: 0 0 8px; }

/* Список-выбор ящика: строка с числом справа. */
.pick { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pick a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: var(--radius-field); color: var(--ink); }
.pick a:hover { background: var(--row-hover); text-decoration: none; }
.pick a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pick .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.pick a[aria-current] .n { color: var(--accent); }

/* Сегменты периода. */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 2px; border-radius: var(--radius-field); background: var(--ap-fill); }
.seg a { text-align: center; padding: 6px 2px; white-space: nowrap; border-radius: 7px; color: var(--ink); font-size: 12px; font-weight: 500; }
.seg a:hover { text-decoration: none; }
.seg a[aria-current] { background: var(--ap-seg-on); box-shadow: var(--ap-seg-shadow); font-weight: 600; }
.dates { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 6px 8px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 400; margin: 0; }
.dates label { margin: 0; }
.reset { color: var(--accent); font-size: 13px; }

/* Таблица писем. */
/* clip, а не hidden: hidden сделал бы панель областью прокрутки, и шапка таблицы
   перестала бы держаться под шапкой страницы. */
.list { overflow: clip; }
.list .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.list .head b { font-family: var(--font-head); font-size: 14px; font-weight: 650; }
/* На широком экране таблица не прокручивается вбок (ячейки режутся «…») — иначе
   шапка таблицы не держится при прокрутке страницы: писем тысячи. На узком —
   прокрутка внутри списка. */
.scroll { overflow: visible; }
@media (max-width: 1100px) { .scroll { overflow-x: auto; } }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--panel); position: sticky; top: var(--header-h); z-index: 1; }
td { padding: 9px 12px; border-bottom: 1px solid var(--ap-sep); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
/* Строка письма открывает карточку; строки прочих таблиц не нажимаются. */
table.letters tbody tr { cursor: pointer; }
table.letters tbody tr:hover { background: var(--row-hover); }
table.letters tbody tr[aria-selected="true"] { background: var(--accent-soft); }
td.when { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
td.from, td.subj { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.from small { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
td.from b { font-weight: 400; }
td.subj a { color: var(--ink); }
td.att { white-space: nowrap; color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
td.att b { color: var(--ink); font-weight: 500; }
/* При открытой карточке список уже: имя файла видно в карточке, в строке остаётся число. */
@media (max-width: 1700px) { td.att .fname { display: none; } td.from { max-width: 180px; } td.subj { max-width: 230px; } }
/* 1366: список ещё уже — карточка и колонки писем сжимаются, прокрутки внутри списка нет. */
@media (max-width: 1400px) { .layout { grid-template-columns: minmax(0, 1fr) minmax(310px, 350px); } td.from { max-width: 160px; } td.subj { max-width: 190px; } td, th { padding-left: 10px; padding-right: 10px; } }
td.num, th.num { text-align: right; }
.more { padding: 12px; text-align: center; border-top: 1px solid var(--line); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* Плашки: ящик и состояние. */
.tag { display: inline-block; padding: 1px 8px; border-radius: var(--radius-chip); font-size: 12px; font-weight: 500;
  background: var(--off-bg); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.part { background: var(--part-bg); color: var(--part); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.wait { background: var(--wait-bg); color: var(--wait); }

/* Карточка письма. */
.card { padding: 16px; display: grid; gap: 14px; position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; }
.card h2 { font-family: var(--font-head); font-size: 17px; font-weight: 650; margin: 0; overflow-wrap: anywhere; }
.card .meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; }
.card .meta dt { color: var(--muted); }
.card .meta dd { margin: 0; overflow-wrap: anywhere; }
.files { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-field); }
.files li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--ap-sep); }
.files li:last-child { border-bottom: 0; }
.files .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.files .size { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.body { margin: 0; padding: 12px; border-radius: var(--radius-field); background: var(--surface-2); font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; }
.note { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.alert { padding: 10px 12px; border-radius: var(--radius-field); background: var(--part-bg); color: var(--part); font-size: 13px; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details .meta { margin-top: 8px; }
.close { float: right; }

/* «Сбор»: плитки ящиков и прогоны. */
main.page { padding: 16px; display: grid; gap: 16px; max-width: 1500px; margin: 0 auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tile { padding: 16px; display: grid; gap: 8px; align-content: start; }
.tile .sum { font-variant-numeric: tabular-nums; }
.tile .sum b { font-weight: 650; }
.tile ul { margin: 0; padding-left: 18px; font-size: 13px; }
.strip { padding: 12px 16px; }
/* Цвет тревоги — один раз на строку (плашка итога); заметка — обычным цветом. */
td.note-cell { white-space: normal; }

/* Вход. */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
form.login { width: 100%; max-width: 360px; padding: 24px; display: grid; gap: 14px; }
form.login h1 { font-family: var(--font-head); font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }

/* Узкий экран: отборы и карточка — на всю ширину, список прокручивается внутри. */
@media (max-width: 1100px) { .layout { grid-template-columns: minmax(0, 1fr); } .layout .card { position: static; max-height: none; } }
@media (max-width: 800px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 0 10px 10px; }
  .bar { padding: 10px; }
  aside.filters { position: static; }
  header .right .who { display: none; }
}
@media (prefers-reduced-motion: no-preference) { tbody tr, .pick a, header nav a { transition: background-color .15s; } }

/* Пустая карточка: письмо не выбрано. */
.card .hint { color: var(--muted); padding: 40px 8px; text-align: center; }

/* ── Варианты макета (только для выбора Артуром: ?v=1|2|3, полоса внизу) ── */
.variants { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 9; display: flex; gap: 2px; padding: 3px;
  border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-strong); box-shadow: 0 6px 20px rgba(0, 0, 0, .14); font-size: 13px; }
.variants a { padding: 6px 12px; border-radius: 9px; color: var(--ink); white-space: nowrap; }
.variants a:hover { text-decoration: none; background: var(--row-hover); }
.variants a[aria-current] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
/* Вариант 2: письмо открывается своей страницей — список во всю ширину, имена файлов видны. */
body.v2 .layout { grid-template-columns: minmax(0, 1fr); }
body.v2 .card { display: none; }
body.v2 td.att .fname { display: inline; }
body.v2 td.from { max-width: 260px; } body.v2 td.subj { max-width: 0; width: 100%; } body.v2 td.att { max-width: 190px; }
/* Вариант 3: как в почте — строка в два этажа (от кого / тема), карточка шире. */
body.v3 .layout { grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.1fr); }
body.v3 th:nth-child(4), body.v3 td.subj { display: none; }
body.v3 td.from small { font-size: 13px; color: var(--ink); max-width: none; }
/* max-width: 0 + width: 100% — ячейка берёт остаток ширины и обрезает текст многоточием. */
body.v3 td.from { max-width: 0; width: 100%; }
body.v3 td.from b { font-weight: 600; }
td.from small.s3 { display: none; } body.v3 td.from small.s3 { display: block; } body.v3 td.from small.addr { display: none; }

/* ── Отборы сверху, как в списке задач GitHub (слово Артура 10.11) ── */
.bar { display: flex; align-items: center; gap: 12px; padding: 16px; }
.bar .q { flex: 1; min-width: 0; padding-left: 12px; }
.bar .reset { white-space: nowrap; }
/* Шапка списка: слева «Все / С файлами», справа выпадающие отборы. Высота постоянная. */
.list .head { align-items: center; min-height: 48px; padding: 0 8px 0 16px; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.states { display: flex; gap: 16px; }
.states a { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; }
.states a[aria-current] { color: var(--ink); font-weight: 600; }
.states a:hover { text-decoration: none; color: var(--ink); }
.menus { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; padding: 7px 10px; border-radius: var(--radius-field); color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: " ▾"; font-size: 11px; }
.menu > summary:hover, .menu[open] > summary { background: var(--row-hover); color: var(--ink); }
.menu > summary b { color: var(--ink); font-weight: 600; }
/* Меню поверх списка: ничего не сдвигает. */
.pop { position: absolute; z-index: 4; top: calc(100% + 4px); left: 0; width: 240px; padding: 6px; background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, .16); }
.menu.wide .pop { width: 320px; }
.menu.right .pop { left: auto; right: 0; }
.pop-head { padding: 6px 8px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pop-head .sub { font-weight: 400; }
.pop input[type=search] { margin: 0 0 6px; }
.opts { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.opts a { display: flex; align-items: baseline; gap: 6px; padding: 7px 8px; border-radius: 7px; color: var(--ink); font-size: 13px; }
.opts a:hover { background: var(--row-hover); text-decoration: none; }
.opts a[aria-current] { font-weight: 600; }
.opts .ck { flex: 0 0 14px; color: var(--accent); }
.opts .n { margin-left: auto; padding-left: 10px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.opts .sep { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--ap-sep); }
.pop .dates { margin: 6px 8px 8px; }
/* Телефон: меню раскрывается на всю ширину шапки списка, а не от своей кнопки — иначе уходит за край. */
@media (max-width: 800px) {
  .list .head { position: relative; flex-wrap: wrap; padding: 6px 8px; }
  .menus { justify-content: flex-start; }
  .menu { position: static; }
  .menu .pop, .menu.wide .pop, .menu.right .pop { left: 8px; right: 8px; width: auto; top: 100%; }
  .variants { max-width: calc(100vw - 20px); overflow-x: auto; }
}

/* ── Письма по дням: клетки как в календаре вкладов GitHub (образец Артура 10.11) ──
   Строки — дни недели, столбцы — недели выбранного месяца; в клетке число дня и
   сколько писем; цвет — пять ступеней от «нет писем» до «много». Справа — кто
   сколько прислал за день под мышью: место постоянной высоты, ничего не сдвигает. */
.days { margin: 16px 16px 0; }
.days-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 48px; padding: 0 12px 0 8px; border-bottom: 1px solid var(--line); }
.days-head .menu > summary { color: var(--ink); }
.month { display: flex; align-items: center; gap: 2px; }
.month .step { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-field); color: var(--ink); font-size: 17px; }
.month a.step:hover { background: var(--row-hover); text-decoration: none; }
.month .step.off { color: var(--faint); }
.legend { margin-left: auto; display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.legend .day { width: 14px; height: 14px; padding: 0; border-radius: 4px; }
.days-body { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 20px; padding: 12px 16px 14px; align-items: start; }
/* Клетка 58×24: число дня слева, число писем справа — в одну строку. */
.cal { display: grid; grid-template-columns: 26px repeat(6, 58px); gap: 4px; }
.cal .wd { align-self: center; color: var(--muted); font-size: 12px; }
.day { display: flex; align-items: center; justify-content: space-between; height: 24px; padding: 0 7px; border-radius: 6px;
  background: var(--ap-fill); color: var(--heat-0-ink); }
a.day:hover { text-decoration: none; outline: 2px solid var(--line-strong); outline-offset: -1px; }
a.day[aria-current] { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Число дня — тем же цветом, что число писем, чуть прозрачнее: серое на зелёном не читалось. */
.day i { font-style: normal; font-size: 11px; opacity: .9; } /* .8 в тёмной теме давало 4,3 на средних ступенях */
.day b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.day.l0 b { font-weight: 400; }
.day.l1 { background: var(--heat-1); color: var(--heat-1-ink); }
.day.l2 { background: var(--heat-2); color: var(--heat-2-ink); }
.day.l3 { background: var(--heat-3); color: var(--heat-3-ink); }
.day.l4 { background: var(--heat-4); color: var(--heat-4-ink); }
.day.l4 i { opacity: .92; } /* белое на тёмно-зелёном: при .8 число дня не дотягивало до 4,5 */
/* Три разных «пусто»: писем не было (серая клетка с нулём), сбора в этот день не
   было (штриховка, слово в разбивке), день ещё не наступил (пунктир). */
.day.none { background: none; }
.day.future { background: none; border: 1px dashed var(--line); color: var(--faint); }
.day.nodata { background: repeating-linear-gradient(135deg, var(--ap-fill) 0 4px, transparent 4px 8px); border: 1px solid var(--line); }
.day.nodata b { font-weight: 400; }
.legend .day.nodata { margin-left: 10px; }
/* Разбивка той же высоты, что календарь (7 строк по 24 px + промежутки): до 10 строк, дальше «и ещё N». */
.brk { height: 192px; display: flex; flex-direction: column; min-width: 0; }
.brk h3 { font-family: var(--font-head); font-size: 14px; font-weight: 650; margin: 0 0 8px; }
.brk-list { list-style: none; margin: 0; padding: 0; flex: 1; overflow: hidden; columns: 2 260px; column-gap: 24px; font-size: 13px; }
.brk-list li { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--ap-sep); break-inside: avoid; }
.brk-list .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brk-list .n { font-variant-numeric: tabular-nums; font-weight: 600; }
.brk-list .empty-day { color: var(--muted); border: 0; }
.brk-list .more-row { color: var(--muted); border: 0; }
/* Пояснение — под «?» в шапке панели (как .q в маршрутном листе karo), а не абзацем.
   Подсказка раскрывается под строкой шапки во всю ширину панели: справа от
   значка её резал бы край панели. Лежит поверх — ничего не сдвигает. */
.days-head { position: relative; }
.q > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; font-weight: 600; }
.q > summary::-webkit-details-marker { display: none; }
.q > summary:hover, .q[open] > summary { background: var(--row-hover); color: var(--ink); }
.q-pop { position: absolute; z-index: 4; left: 0; right: 0; top: 100%; padding: 10px 16px; background: var(--panel);
  border-bottom: 1px solid var(--line-strong); box-shadow: 0 10px 24px rgba(0, 0, 0, .12); font-size: 12px; color: var(--muted); }
@media (max-width: 800px) {
  .days { margin: 10px 10px 0; }
  .days-body { grid-template-columns: minmax(0, 1fr); }
  .cal { grid-template-columns: 26px repeat(6, minmax(0, 1fr)); }
  .legend { margin-left: 0; }
}

/* ── «Сбор данных»: строение вкладки «Сбор данных» страницы «Светофор» karo
   (отбор сверху, плитки, календарь по дням, столбцы по месяцам, сводка) в виде
   новой версии «Развития». Образец назвал Артур 10.11. ── */
/* minmax(0, 1fr): иначе годовой календарь (1 008 px) растягивал всю страницу на телефоне вместо прокрутки внутри своей панели. */
main.page2 { padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 1500px; margin: 0 auto; }
.filters2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.filters2 label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.filters2 select { width: auto; min-width: 230px; max-width: 100%; padding: 7px 10px; font-size: 13px; }
.filters2 .asof { margin-left: auto; font-size: 12px; }
/* Плитки-сводка: подпись, значение 20px (в karo — .h-tv), пояснение. */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kpi { padding: 12px 14px; display: grid; gap: 2px; align-content: start; min-height: 86px; }
.kpi .k { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 20px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi.bad .v { color: var(--bad); }
.intro { margin: 0; color: var(--muted); font-size: 13px; }
.ph { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-family: var(--font-head); font-size: 14px; font-weight: 650; }
.ph .legend { font-family: var(--font); font-weight: 400; }
/* Год мелкими клетками, как календарь вкладов GitHub и как в «Светофоре». */
.year { padding: 12px 16px 6px; overflow-x: auto; }
/* Клетка года 18 px, шаг 22: 46 недель — 1 012 px, помещается на 1366; уже — прокрутка внутри панели, как в «Светофоре». */
.year-months { display: grid; grid-template-columns: repeat(46, 22px); margin-left: 26px; height: 16px; font-size: 11px; color: var(--muted); }
.year-months .on { color: var(--accent); font-weight: 600; }
.year-row { display: flex; gap: 6px; }
.year-wd { display: grid; grid-template-rows: repeat(7, 18px); row-gap: 4px; width: 20px; font-size: 11px; line-height: 18px; color: var(--muted); }
.year-grid { display: grid; grid-template-rows: repeat(7, 18px); grid-auto-flow: column; grid-auto-columns: 18px; gap: 4px; }
.year-grid i { border-radius: 4px; background: var(--ap-fill); }
.year-grid i.l1 { background: var(--heat-1); } .year-grid i.l2 { background: var(--heat-2); }
.year-grid i.l3 { background: var(--heat-3); } .year-grid i.l4 { background: var(--heat-4); }
.year-grid i.fut { background: none; }
.year-grid i.nd { background: repeating-linear-gradient(135deg, var(--ap-fill) 0 3px, transparent 3px 6px); outline: 1px solid var(--line); outline-offset: -1px; }
.year-grid i.cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.month-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 12px 0 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.month-head select { width: auto; padding: 5px 8px; font-size: 13px; font-weight: 600; }
/* Столбцы по месяцам. */
.bars { padding: 10px 16px 12px; }
.bars svg { display: block; width: 100%; height: auto; }
.bars text { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.bars .ml { fill: var(--ink); font-size: 12px; }
.bars .gl { stroke: var(--line); stroke-width: 1; }
.bars .bg { fill: transparent; }
.bars .grp.sel .bg { fill: var(--accent-soft); }
.bars .grp:hover .bg { fill: var(--row-hover); }
.b1 { fill: var(--accent); background: var(--accent); }
.b2 { fill: var(--heat-3); background: var(--heat-3); }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
/* Сводка: месяцы капсулами, таблица по дилерам. */
.mtabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 16px 4px; }
.mtabs a { padding: 4px 10px; border-radius: var(--radius-chip); color: var(--ink); font-size: 12px; font-weight: 500; background: var(--ap-fill); }
.mtabs a:hover { text-decoration: none; background: var(--row-hover); }
.mtabs a[aria-current] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.sumline { margin: 0; padding: 6px 16px 8px; font-size: 13px; }
td.wrapname { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.wrapname a, .list td a { color: var(--ink); }
.list td a:hover { color: var(--accent); }
@media (max-width: 800px) {
  main.page2 { padding: 10px; }
  .filters2 .asof { margin-left: 0; }
  /* список с длинным названием дилера не шире экрана */
  .filters2 label { flex: 1 1 100%; display: grid; grid-template-columns: max-content minmax(0, 1fr); }
  .filters2 select { min-width: 0; width: 100%; }
  /* разбивка на телефоне — одной колонкой и во всю высоту: сдвигать тут нечего, она последняя в панели */
  .brk { height: auto; min-height: 120px; } .brk-list { columns: 1; overflow: visible; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bars { overflow-x: auto; } .bars svg { min-width: 560px; }
}

/* ══ Четыре концепции главного экрана (k1–k4): выбор Артура, останется одна ══ */
.idea { margin: 0; padding: 10px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.idea b { color: var(--ink); }
.bar2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; }
.bar2 label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; white-space: nowrap; }
.bar2 select { width: auto; max-width: 260px; padding: 6px 10px; font-size: 13px; }
.bar2 input[type=search] { width: 260px; max-width: 100%; padding: 6px 10px; font-size: 13px; }
.bar2 .legend { margin-left: auto; }
.bar2 .today { font-size: 13px; flex: 1 1 420px; }
.sm { font-size: 12px; font-weight: 400; }
.dot { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot.ok { background: var(--ok); } .dot.wait { background: var(--wait); } .dot.part { background: var(--part); } .dot.bad { background: var(--bad); }
.more2 { margin: 0; padding: 8px 12px; font-size: 12px; }
/* Полоска последних дней: клетка — день, цвет — сколько писем. */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 12px; gap: 2px; }
.strip i { height: 12px; border-radius: 3px; background: var(--ap-fill); }
.strip i.l1 { background: var(--heat-1); } .strip i.l2 { background: var(--heat-2); } .strip i.l3 { background: var(--heat-3); } .strip i.l4 { background: var(--heat-4); }

/* 1. Табель: дилеры × дни */
.wrap2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 0 16px 70px; }
.scroll-x { overflow-x: auto; }
table.tb { font-size: 12px; border-collapse: separate; border-spacing: 0; }
.tb th, .tb td { padding: 4px 6px; border-bottom: 1px solid var(--ap-sep); position: static; }
.tb thead th { position: sticky; top: 0; background: var(--panel); font-size: 11px; vertical-align: bottom; }
.tb .nm { position: sticky; left: 0; z-index: 1; background: var(--panel); text-align: left; font-weight: 500; color: var(--ink); font-size: 13px;
  width: 230px; min-width: 230px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-right: 1px solid var(--line); }
/* top: auto — общее правило th держит шапку таблицы под шапкой страницы; у столбца имён оно сдвигало бы имена вниз */
.tb tbody .nm, .tb tfoot .nm { top: auto; }
.tb thead .nm { font-weight: 600; z-index: 2; }
.tb .d { width: 28px; min-width: 28px; padding: 3px 2px; text-align: center; } /* 28 px: тридцать дней помещаются на 1366 без прокрутки */
.tb th.d i { display: block; font-style: normal; font-weight: 400; color: var(--faint); }
.tb .we { background: var(--surface-2); }
.tb .now { box-shadow: inset 1px 0 0 var(--accent), inset -1px 0 0 var(--accent); }
.tb th.now { color: var(--accent); }
.tb .fut { color: var(--faint); }
.tb a.c { display: block; height: 22px; line-height: 22px; border-radius: 5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tb a.c:hover { text-decoration: none; outline: 2px solid var(--accent); }
.tb a.c.l1 { background: var(--heat-1); color: var(--heat-1-ink); } .tb a.c.l2 { background: var(--heat-2); color: var(--heat-2-ink); }
.tb a.c.l3 { background: var(--heat-3); color: var(--heat-3-ink); } .tb a.c.l4 { background: var(--heat-4); color: var(--heat-4-ink); }
.tb .z { color: var(--faint); }
.tb .tot { font-weight: 600; font-size: 13px; }
.tb tr.silent .nm { color: var(--muted); }
.tb tr.unk th, .tb tr.unk td { border-top: 2px solid var(--line); color: var(--muted); }
.tb tfoot th, .tb tfoot td { border-bottom: 0; color: var(--muted); font-weight: 600; }
.sel .lt td { padding: 8px 12px; }
.sel .close { margin-left: auto; }

/* 2. Лента дня */
.feed3 { display: grid; grid-template-columns: 250px minmax(0, 1fr) minmax(320px, 400px); gap: 14px; padding: 0 16px 70px; align-items: start; }
.dayslist ul, .dlist ul { list-style: none; margin: 0; padding: 6px; }
.dayslist a { display: grid; grid-template-columns: 1fr max-content; gap: 2px 8px; padding: 8px 10px; border-radius: var(--radius-field); color: var(--ink); }
.dayslist a:hover { background: var(--row-hover); text-decoration: none; }
.dayslist a[aria-current] { background: var(--accent-soft); }
.dayslist .dd b { font-weight: 600; } .dayslist .dd { font-size: 13px; }
.dayslist .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.dayslist .dbar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--ap-fill); overflow: hidden; }
.dayslist .dbar i { display: block; height: 100%; background: var(--heat-3); }
.dayslist .sub { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.feed .grp h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 16px 6px; font-size: 14px; font-weight: 650; }
.feed .grp.unk h3 { color: var(--muted); }
.letters2 { list-style: none; margin: 0; padding: 0 8px 8px; }
.letters2 li { display: grid; grid-template-columns: 46px max-content minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px; border-radius: var(--radius-field); cursor: pointer; }
.letters2 li:hover { background: var(--row-hover); }
.letters2 li[aria-selected="true"] { background: var(--accent-soft); }
.letters2 .when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.letters2 .s { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.letters2 .f { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 12px; }
.file { padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-chip); color: var(--ink); }
.file:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }

/* 3. Дилеры */
.deal2 { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; padding: 14px 16px 70px; align-items: start; }
.dl-head { display: grid; gap: 8px; padding: 12px 12px 6px; }
.dlist li a { display: grid; grid-template-columns: 8px minmax(0, 1fr) max-content; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-field); color: var(--ink); }
.dlist li a:hover { background: var(--row-hover); text-decoration: none; }
.dlist li a[aria-current] { background: var(--accent-soft); }
.dlist .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlist .st { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dpage { display: grid; gap: 14px; min-width: 0; }
.dhead { padding: 16px; display: grid; gap: 14px; }
.dh-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dh-top h2 { margin: 0; font-family: var(--font-head); font-size: 17px; font-weight: 650; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 20px; margin: 0; }
.facts dt { font-size: 12px; color: var(--muted); } .facts dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.strip-wrap { display: flex; align-items: center; gap: 10px; }

/* 4. Контроль */
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 0 16px 14px; align-items: start; }
.col { background: var(--ap-fill); border-radius: var(--radius); padding: 8px; display: grid; gap: 8px; align-content: start; }
.col h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 6px; font-size: 13px; font-weight: 600; }
.col h3 .cnt { margin-left: auto; }
.dc { display: grid; gap: 3px; padding: 10px; border-radius: var(--radius-field); background: var(--panel); border: 1px solid var(--line); color: var(--ink); min-width: 0; }
.dc:hover { text-decoration: none; border-color: var(--accent); }
.dc b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc .l1, .dc .l2 { font-size: 12px; }
.dc .s14 { margin-top: 4px; grid-auto-columns: minmax(0, 1fr); }
.unkrow { margin: 0 16px 70px; }

@media (max-width: 1100px) {
  .feed3 { grid-template-columns: 220px minmax(0, 1fr); } .feed3 .card { grid-column: 1 / -1; position: static; max-height: none; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .bar2 { padding: 10px; } .bar2 .legend { margin-left: 0; } .bar2 input[type=search] { width: 100%; } .bar2 label { flex: 1 1 100%; } .bar2 select { flex: 1; max-width: none; min-width: 0; }
  .wrap2, .feed3, .deal2 { padding-left: 10px; padding-right: 10px; }
  .feed3, .deal2, .board { grid-template-columns: minmax(0, 1fr); }
  .tb .nm { width: 130px; min-width: 130px; max-width: 130px; }
  .board { padding: 0 10px 14px; } .unkrow { margin: 0 10px 70px; }
}

/* ══ Шапка в одну строку (правка Артура 10.11): вкладки стоят в той же строке,
   что название, — между названием и кнопками. Высота шапки 57 px. ══ */
:root { --header-h: 57px; }
header .top { height: 56px; gap: 14px; }
header .top .tabs { flex: 1; min-width: 0; height: 56px; padding: 0; }
header .top .tabs a { padding: 0 12px; }
header .right { margin-left: 0; }
@media (max-width: 800px) {
  /* телефон: вкладки уходят второй строкой, иначе не помещаются */
  :root { --header-h: 97px; }
  header .top { flex-wrap: wrap; height: auto; row-gap: 0; padding-top: 6px; }
  header .top h1 { flex: 1; }
  header .top .tabs { order: 3; flex: 1 1 100%; height: 44px; margin: 0 -6px; }
}

/* ══ Подсказка при наведении на клетку табеля. Лежит поверх страницы
   (position: fixed), ничего не сдвигает. Три вида: коротко, список, подробно. ══ */
.tipsw { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.tipsw .seg { width: 230px; }
.tip { position: fixed; z-index: 20; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18); font-size: 12px; color: var(--ink); pointer-events: none; }
.tip.ka { width: 230px; } .tip.kb { width: 320px; } .tip.kc { width: 400px; }
/* уже экрана подсказка не бывает: на телефоне 400 px не помещаются */
.tip { max-width: calc(100vw - 16px); }
.tipgrid .tip { position: static; box-shadow: none; pointer-events: auto; }
.tip .th { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip .tsub { color: var(--muted); margin-top: 1px; }
.tip .tsum { margin-top: 6px; font-variant-numeric: tabular-nums; }
.tip ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.tip.kb li { display: grid; grid-template-columns: 38px minmax(0, 1fr) max-content; gap: 8px; align-items: baseline; }
.tip .tt { color: var(--muted); font-variant-numeric: tabular-nums; }
.tip .ts { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip .tn { color: var(--muted); white-space: nowrap; }
.tip.kc li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 2px 8px; padding-top: 6px; border-top: 1px solid var(--ap-sep); }
.tip.kc li:first-child { border-top: 0; padding-top: 0; }
.tip.kc .tfrom, .tip.kc .tfiles { grid-column: 2; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip.kc .tfiles { white-space: normal; overflow-wrap: anywhere; }
.tip .tag { font-size: 11px; padding: 0 6px; }
.tip .tfoot { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--ap-sep); color: var(--muted); }
.tip .none { color: var(--muted); }
.tipshow { margin: 0 16px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.tipgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; padding: 16px; align-items: start; }
.tipgrid .cap { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.tipgrid .cap b { color: var(--ink); }
.tipgrid .tip { max-width: 100%; }
.wrap2 { padding-bottom: 16px; }
@media (max-width: 1100px) { .tipgrid { grid-template-columns: minmax(0, 1fr); } }

/* ══ Телефон: письма выбранного дня под табелем — карточками, а не таблицей
   в пять столбцов (та растягивала страницу до 591 px при экране 375). ══ */
@media (max-width: 800px) {
  .sel .lt, .sel .lt tbody { display: block; }
  .sel .lt tr { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 8px; padding: 8px 12px; border-bottom: 1px solid var(--ap-sep); }
  .sel .lt tr:last-child { border-bottom: 0; }
  .sel .lt td { display: block; padding: 0; border: 0; min-width: 0; max-width: none; overflow-wrap: anywhere; }
  .sel .lt td.when { grid-row: 1 / span 4; }
  .sel .lt td:not(.when) { grid-column: 2; }
}

/* Телефон уже 480 px: четыре вкладки помещаются в строку без прокрутки вбок —
   поля уже, число писем у «Письма» скрыто (красная цифра тревоги у «Ящики» остаётся). */
@media (max-width: 480px) {
  header .top .tabs { gap: 2px; }
  header .top .tabs a { padding: 0 9px; }
  header .top .tabs .cnt:not(.bad) { display: none; }
}

/* ══ «Сбор данных»: завод → склад дилера → продажи (правка Артура 10.11 — вместо
   столбцов «писем по месяцам», как в «Светофоре»). Три ряда: синий — отгрузили,
   серый — лежит на складе, зелёный — продали; порядок столбцов всегда один. ══ */
:root { --ser-ship: #007aff; --ser-stock: #8e8e93; --ser-sold: #2a9e48; }
:root[data-mode="dark"] { --ser-ship: #0a84ff; --ser-stock: #98989d; --ser-sold: #4cd964; }
.s-ship { fill: var(--ser-ship); background: var(--ser-ship); }
.s-stock { fill: var(--ser-stock); background: var(--ser-stock); }
.s-sold { fill: var(--ser-sold); background: var(--ser-sold); }
.bars .grp { cursor: pointer; outline: none; }
.bars .grp:focus-visible .bg { stroke: var(--accent); stroke-width: 2; }
.bars .nod { fill: var(--muted); }
.chain3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.chain3 > div { padding: 12px 16px; display: grid; gap: 2px; align-content: start; min-height: 104px; border-left: 1px solid var(--line); } /* место под две строки пояснения: смена месяца и дилера ничего не сдвигает */
.chain3 > div:first-child { border-left: 0; }
.chain3 .k { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.chain3 .k i { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 3px; }
.chain3 .v { font-size: 17px; line-height: 24px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.chain3 .v.none { font-weight: 500; color: var(--muted); }
.chain3 .s { font-size: 12px; color: var(--muted); min-height: 16px; }
.chain-src { margin: 0; padding: 10px 16px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.chain-src b { color: var(--ink); font-weight: 600; }
@media (max-width: 800px) {
  .chain3 { grid-template-columns: minmax(0, 1fr); }
  .chain3 > div { min-height: 122px; border-left: 0; border-top: 1px solid var(--line); } /* подпись и пояснение — до двух строк каждое */
  .chain3 > div:first-child { border-top: 0; }
}

/* ══ Вкладка «Отчёт» (Артур 13.11): отчёт по запросу — кто, что и как часто прислал. ══ */
.rq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; padding: 12px 16px 4px; }
.rq-grid label { display: grid; gap: 4px; margin: 0; font-size: 12px; color: var(--muted); }
.rq-grid select, .rq-grid input[type=date] { width: 100%; min-width: 0; padding: 7px 10px; font-size: 13px; }
.rq-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; }
.rq-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px 14px; font-size: 12px; }
.rq-go .rq-dl { margin-left: auto; font-size: 13px; }
table.rp td { vertical-align: top; }
table.rp tr.silent td { color: var(--muted); }
.rp-how { margin: 0; padding: 10px 16px 10px 34px; display: grid; gap: 4px; font-size: 13px; }
@media (max-width: 1100px) { .rq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .rq-grid { grid-template-columns: minmax(0, 1fr); } .rq-go .rq-dl { margin-left: 0; } }
@media (max-width: 480px) { header .top .tabs a { padding: 0 7px; } }

/* только копия на сервере: полоса «это макет» */
body::before { content: "Макет интерфейса: числа условные, сервис ещё не собирает почту"; display: block; padding: 6px 16px; background: var(--part-bg); color: var(--part); font-size: 12px; font-weight: 600; text-align: center; }

/* страницы на настоящих данных: своя полоса */
body.real::before { content: attr(data-banner); background: var(--ok-bg); color: var(--ok); }
.bar2 .month a, .bar2 .month b { font-size: 13px; }
