/* NetWeb · app/css/b1.css — экраны агента B1: «Сегодня» (+ «По одному»), «Люди» и поиск, карточка человека.
   Поверх tokens.css и core.css: только раскладка живых экранов, цвета и размеры — токены. */

/* ================================================================ Общие элементы этих экранов (действует во всём приложении)
   Зона касания 44 (DESIGN §9) — прозрачным ::after поверх вида, вёрстка и вид не меняются.
   Отступы зон выбраны так, чтобы не залезать на соседние кнопки: под заголовком секции 9 / 7 px, над ним 22 / 18. */
/* Ссылка заголовка секции («По одному», «Все», «Очистить», «по городу»): текст 22 px → 44 */
.nw-app .nw-section-head > .nw-link { position: relative; }
.nw-app .nw-section-head > .nw-link::after { content: ""; position: absolute; top: -13px; bottom: -9px; left: min(-4px, calc(50% - 22px)); right: min(-4px, calc(50% - 22px)); }
.nw-app .nw-section-head--sm > .nw-link::after { top: -18px; bottom: -7px; }
/* Чипы 34 уже несут ::after на 44 (tokens.css), но лента с прокруткой обрезала его по своей высоте:
   даём ленте по 5 px сверху и снизу и возвращаем её на место — чипы стоят там же, соседи тоже.
   Где зазор тесный (заголовок «Города» в 7 px над чипами), зона чипов главнее зоны ссылки — z-index: 1 */
.nw-app .nw-chip-row:not(.nw-chip-row--wrap) { position: relative; z-index: 1; top: -5px; padding-top: 5px; padding-bottom: 5px; margin-bottom: -10px; }
/* Сегменты 30 / 34 → 44 по высоте */
.nw-app .nw-segmented > * { position: relative; }
.nw-app .nw-segmented > *::after { content: ""; position: absolute; left: 0; right: 0; top: min(0px, calc(50% - 22px)); bottom: min(0px, calc(50% - 22px)); }
/* «×» токена в поле поиска: его зона 44 обрезалась строкой токенов высотой 28 — строка на всю высоту поля */
.nw-app .nw-search__q { align-self: stretch; }
/* «Отмена» листа (44) выходит за шапку на 3 px, и первый блок листа перекрывал её низ — шапка над телом листа */
.nw-app .nw-sheet__head { position: relative; z-index: 1; }

/* Строка человека: имя не обрезается раньше срока (DESIGN §11 #2 — обрезается только компания).
   Не помещаются вместе — срок уходит строкой ниже; имя длиннее всей строки — переносится, а не «Олег Пет…» */
.nw-app .nw-person__top { flex-wrap: wrap; row-gap: 0; }
.nw-app .nw-person__top > .nw-row__title { flex: 1 0 auto; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

/* ================================================================ «Сегодня» */
.nw-b1-today .nw-swipe { overflow: hidden; }
.nw-b1-line { --nw-sep-inset: 72px; }
.nw-b1-line .nw-pill { flex: none; }
/* Простая строка (дни рождения, «на связи»): справа срок или «Поздравить» — имя и «Дубай · сегодня» переносятся, а не режутся */
.nw-b1-line .nw-row__title, .nw-b1-line .nw-row__sub { white-space: normal; overflow-wrap: anywhere; }
.nw-b1-promise { --nw-sep-inset: 52px; align-items: center; }
.nw-b1-promise .nw-row__body { cursor: pointer; }
.nw-b1-promise .nw-person__l3 { margin: 0; }
.nw-b1-finished .nw-empty__actions { margin-top: 2px; }

/* «По одному» — лист */
.nw-run { display: grid; gap: 10px; }
.nw-run__undo { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--nw-card); font-size: var(--nw-fs-foot); line-height: var(--nw-lh-foot); color: var(--nw-text-2); }
.nw-run__undo .nw-ic { color: var(--nw-accent-ink); flex: none; }
.nw-run__undo span { flex: 1; min-width: 0; color: var(--nw-text); }
.nw-run__undo .nw-link { min-height: var(--nw-hit); }
.nw-run__card { display: grid; gap: 12px; padding: 14px 14px 16px; }
.nw-run__who { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.nw-run__who > .nw-avatar { margin-top: 2px; }
.nw-run__who .nw-person__l3 { margin-top: 2px; }
.nw-run__label { font-size: var(--nw-fs-foot); line-height: var(--nw-lh-foot); color: var(--nw-text-2); margin: 2px 2px -6px; }
.nw-run__draft { width: 100%; min-height: 104px; resize: vertical; border: 0; border-radius: 12px; padding: 10px 12px; background: var(--nw-fill);
  font: inherit; font-size: 1rem; line-height: 1.375rem; color: var(--nw-text); caret-color: var(--nw-link); }
.nw-app .nw-run__draft:focus-visible { outline: none; }
.nw-run__tones .nw-segmented { width: 100%; }
.nw-run__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.nw-run__snooze { display: grid; gap: 10px; }
.nw-run__pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--nw-fs-sub); color: var(--nw-text-2); }

/* ================================================================ «Люди» и поиск */
.nw-b1-people { padding-top: 8px; }
/* Поле сверху и строка уточнений (когда клавиатура спрятана) — липкая шапка экрана.
   top: 0 — липкость считается от края отступа прокрутки (у .nw-view это уже --nw-top-inset) */
.nw-b1-bar { position: sticky; top: 0; z-index: var(--nw-z-sticky); margin: -8px calc(-1 * var(--nw-gutter)) 0; padding: 8px var(--nw-gutter) 8px; background: var(--nw-page); }
.nw-b1-bar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--nw-top-inset); background: var(--nw-page); }
.nw-b1-bar .nw-search__cancel { min-height: var(--nw-hit); }
/* Строка уточнений: без клавиатуры — обычный ряд под полем, с клавиатурой — над ней (DESIGN §4.8) */
.nw-b1-dock { position: static; padding: 10px 0 0; background: none; box-shadow: none; }
.nw-b1-kb .nw-b1-dock { position: fixed; z-index: var(--nw-z-dock); left: 0; right: 0; bottom: var(--nw-kb-h); padding: 8px var(--nw-gutter); background: var(--nw-page); box-shadow: 0 -.5px 0 var(--nw-sep); }
.nw-b1-kb .nw-b1-people { padding-bottom: calc(var(--nw-kb-h) + 70px); }
:not(.nw-b1-kb) > .nw-b1-people .nw-b1-dock--kbonly { display: none; }
.nw-b1-body > .nw-count:first-child { margin-top: 2px; }
.nw-b1-dym { color: var(--nw-link-ink); font-weight: var(--nw-w-medium); position: relative; }
.nw-b1-dym::after { content: ""; position: absolute; top: calc(50% - 22px); bottom: calc(50% - 22px); left: min(-4px, calc(50% - 22px)); right: min(-4px, calc(50% - 22px)); }
.nw-b1-sugg { margin-top: 10px; }
.nw-b1-more { min-height: 48px; }
.nw-b1-more .nw-row__title { color: var(--nw-link-ink); font-weight: var(--nw-w-medium); }
.nw-b1-addlist { margin-top: 12px; }
.nw-b1-add { min-height: 50px; }
.nw-b1-add .nw-row__title { color: var(--nw-link-ink); font-weight: var(--nw-w-semibold); }
.nw-b1-nothing { margin-top: 12px; }
.nw-b1-nothing h3 { overflow-wrap: anywhere; }
/* Недавние */
.nw-b1-recent { --nw-sep-inset: 52px; min-height: 46px; padding-top: 0; padding-bottom: 0; padding-right: 4px; }
.nw-b1-recent__x { width: var(--nw-hit); height: var(--nw-hit); display: grid; place-items: center; color: var(--nw-text-2); flex: none; }
.nw-b1-hint { display: block; width: 100%; text-align: left; margin-top: 14px; position: relative; }
/* подсказка-кнопка 18 px → 44: вверх 9 (над ней чипы со своей зоной 5 в зазоре 14), вниз 17 (до заголовка 22) */
.nw-b1-hint::after { content: ""; position: absolute; left: 0; right: 0; top: -9px; bottom: -17px; }
/* Все люди: липкие заголовки групп под шапкой экрана */
.nw-b1-allhead { margin-top: 22px; }
.nw-b1-group > .nw-list { margin-bottom: 4px; }
.nw-b1-ghead { position: sticky; top: var(--b1-bar-h, 60px); z-index: 3; margin: 0 calc(-1 * var(--nw-gutter)); padding: 12px calc(var(--nw-gutter) + 4px) 7px; background: var(--nw-page); }
.nw-b1-ghead__t { font-size: var(--nw-fs-foot); color: var(--nw-text-2); font-variant-numeric: tabular-nums; }
.nw-b1-sentinel { height: 1px; }

/* ================================================================ Карточка */
.nw-b1-cardstrip { margin: 6px 0 8px; }
.nw-b1-hero { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.nw-b1-hero h1.nw-hero__name { margin: 0; overflow-wrap: anywhere; }
.nw-b1-hero .nw-link--quiet { font: inherit; }
/* Текстовые ссылки карточки («Город не указан», «откуда это» / «свернуть») — зона 44; у «откуда это» снизу только
   12 px поля карточки (дальше её край обрезает), поэтому вверх 14, вниз 12 */
.nw-b1-hero .nw-link--quiet, .nw-b1-src { position: relative; }
.nw-b1-hero .nw-link--quiet::after, .nw-b1-src::after { content: ""; position: absolute; top: calc(50% - 22px); bottom: calc(50% - 22px); left: min(-4px, calc(50% - 22px)); right: min(-4px, calc(50% - 22px)); }
.nw-b1-src::after { top: -14px; bottom: -12px; }
.nw-facts .nw-fact { cursor: pointer; position: relative; }
.nw-facts .nw-fact:active { background: color-mix(in srgb, var(--nw-hint) 14%, transparent); }
/* чипы-факты 30 → зона 44 (DESIGN §3.5, §9); до плиток каналов 12 px — зона берёт 7 */
.nw-facts .nw-fact::after { content: ""; position: absolute; inset: -7px 0; }
.nw-b1-morebtn { margin-left: auto; width: 38px; padding: 0; justify-content: center; color: var(--nw-text-2); position: relative; }
.nw-facts .nw-b1-morebtn::after { inset: -7px -3px; }
.nw-tiles .nw-tile { transition: transform var(--nw-dur-fast, .12s) var(--nw-ease, ease); min-width: 0; padding: 0 2px; }
.nw-tiles .nw-tile span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-tiles .nw-tile:active { transform: scale(.96); }
.nw-b1-tiles--none { grid-template-columns: 1fr; }
.nw-b1-cell { cursor: pointer; border-radius: 12px; }
.nw-b1-cell:active { background: color-mix(in srgb, var(--nw-hint) 12%, var(--nw-card)); }
.nw-app .nw-b1-cell:focus-visible { outline: 2px solid var(--nw-accent); outline-offset: -3px; }
.nw-status__line .nw-pill { flex: none; }
/* Ячейки полосы статуса при крупном тексте растут в высоту, а не режутся («Раз в м…», «открыто сей…»): DESIGN §9.
   Сначала card.js чуть уменьшает кегль значения (не ниже 13/16), не хватает — перенос полным кеглем */
.nw-b1-status .nw-status__cells :is(small, b, em) { white-space: normal; overflow-wrap: anywhere; }
.nw-b1-status .nw-status__cells small { hyphens: auto; } /* «Последний» при 200 % — одно слово шире ячейки */
.nw-b1-status.is-flash { animation: nw-b1-flash 1.4s var(--nw-ease, ease) 1; }
@keyframes nw-b1-flash { 0% { box-shadow: 0 0 0 2px var(--nw-accent); } 100% { box-shadow: 0 0 0 2px transparent; } }
@media (prefers-reduced-motion: reduce) { .nw-b1-status.is-flash { animation: none; } }
/* «Коротко» — источники */
.nw-b1-src { font: inherit; }
.nw-b1-sources { margin-top: 10px; padding-top: 8px; box-shadow: inset 0 .5px 0 var(--nw-sep); display: grid; gap: 4px; }
.nw-b1-srcitem { display: flex; gap: 10px; font-size: var(--nw-fs-foot); line-height: var(--nw-lh-foot); color: var(--nw-text-2); }
.nw-b1-srcitem > span:first-child { width: 46px; flex: none; font-weight: var(--nw-w-medium); }
.nw-b1-srcitem > span:last-child { color: var(--nw-text); min-width: 0; }
.nw-b1-srcnote { font-size: var(--nw-fs-foot); line-height: var(--nw-lh-foot); color: var(--nw-text-2); margin-top: 4px; }
/* «Оценки» */
.nw-b1-scores { display: block; padding: 0; margin-top: 12px; }
.nw-b1-scores__head { display: flex; align-items: center; gap: 12px; padding: 11px 14px 11px 16px; }
.nw-b1-scores__head .nw-link { min-height: var(--nw-hit); font-size: var(--nw-fs-body); }
.nw-b1-scores__head + .nw-b1-field { box-shadow: inset 0 .5px 0 var(--nw-sep); }
.nw-b1-scores .nw-scores__blur { -webkit-user-select: none; user-select: none; }
/* Хронология и заметка */
.nw-b1-note { margin: 0; }
.nw-b1-note input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--nw-text); caret-color: var(--nw-link); padding: 6px 0; }
.nw-b1-note input::placeholder { color: var(--nw-text-2); }
.nw-app .nw-b1-note input:focus-visible { outline: none; }
.nw-b1-note .nw-pill { flex: none; }
/* «Надиктовать» — круг 34 (tokens.css), его ::after давал 38 → 44 */
.nw-b1-note .nw-channel::after { inset: -5px; }
.nw-b1-tl .nw-timeline { box-shadow: inset 0 .5px 0 var(--nw-sep); }
.nw-tl-item[data-tl] { cursor: pointer; }
.nw-tl-item[data-tl]:active { background: color-mix(in srgb, var(--nw-hint) 12%, var(--nw-card)); }
/* Поля таблицы */
.nw-b1-field { --nw-sep-inset: 16px; min-height: 48px; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.nw-b1-field__k { flex: 0 1 auto; max-width: 52%; font-size: var(--nw-fs-sub); line-height: var(--nw-lh-sub); color: var(--nw-text); }
.nw-b1-field__v { flex: 1 1 0; min-width: 0; text-align: right; font-size: var(--nw-fs-sub); line-height: var(--nw-lh-sub); color: var(--nw-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-b1-field__v--empty { color: var(--nw-text-3); }
.nw-b1-field__v--link { color: var(--nw-link-ink); }
.nw-b1-field .nw-row__chev { width: 16px; height: 16px; }
.nw-b1-blurval { filter: blur(5px); opacity: .8; -webkit-user-select: none; user-select: none; }
.nw-b1-foot { margin-bottom: 8px; }
/* Лист правки поля */
.nw-b1-edit__ctl { display: grid; gap: 10px; }
.nw-b1-inputrow { display: flex; align-items: center; gap: 8px; padding: 0 14px 0 16px; min-height: 50px; }
.nw-b1-input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; font: inherit; font-size: 1.0625rem; color: var(--nw-text); caret-color: var(--nw-link); padding: 12px 0; }
.nw-b1-input--area { min-height: 120px; resize: none; line-height: 1.375rem; }
.nw-b1-input::placeholder { color: var(--nw-text-2); }
.nw-app .nw-b1-input:focus-visible, .nw-app .nw-b1-bday select:focus-visible { outline: none; }
.nw-b1-at { color: var(--nw-text-2); font-size: 1.0625rem; }
.nw-b1-bday { gap: 10px; padding: 8px 12px; }
.nw-b1-bday select { flex: 1; min-width: 0; font: inherit; font-size: 1.0625rem; color: var(--nw-text); background: var(--nw-fill); border: 0; border-radius: 10px; padding: 9px 10px; }
.nw-b1-edit .nw-segmented { width: 100%; }
.nw-b1-edit .nw-segmented > * { height: 34px; font-size: var(--nw-fs-sub); }
.nw-b1-radio { visibility: hidden; display: grid; place-items: center; }
[aria-checked="true"] > .nw-b1-radio { visibility: visible; }
