/* Отчёт «Карта выплат» (js/report.js). Классы с префиксом nr-.
 * Кегли — в rem от html 100 % (как style.css): текст растёт вместе с настройкой
 * «Размер шрифта» браузера (договор, раздел 1а: до 200 %). Печать — в pt.
 * Телефон: карточки, 320 px без горизонтальной прокрутки, основной текст не мельче 1rem (16 px).
 * Компьютер (от 1024 px = 64em, договор, раздел 1а): экран отчёта шире анкеты (до 1160 px),
 * над карточками — сводные таблицы, карточки в две колонки, строки текста не шире ~760 px.
 * Печать: таблица денежных выплат, а в их карточках — только то, чего нет в таблице
 * (как подать, пояснения, документы, источники); заголовки не отрываются от текста.
 * Цвета — переменные из style.css, с запасными значениями, равными значению токена (пол
 * дизайна П1; литералы — только в печати). Разбор Hallmark 28.10.2026 (§3.2 (а⁶) договора
 * каталога): рамка фокуса карточки — цвет рамки фокуса продукта (F01), цвета — токены (F05). */

.nr { margin: 8px 0 16px; overflow-wrap: break-word; word-wrap: break-word; }
.nr p { margin: 8px 0; }
/* .nr .x — сильнее, чем .screen h2 / .screen h3 из style.css. */
.nr .nr-title { font-size: 1.5rem; line-height: 1.25; margin: 0 0 12px; }

.nr-banner { margin: 8px 0; padding: 8px 12px; border-radius: 6px; font-size: 1rem; line-height: 1.45; }
.nr-notgov { background: var(--notgov-bg, #e6e9ef); color: var(--muted, #4e5868); }
.nr-internal { background: var(--internal-bg, #8a1c14); color: var(--internal-text, #ffffff); font-weight: 700; text-align: center; }
.nr-draft {
  background: var(--warn-bg, #fff4d6);
  border: 2px solid var(--bad, #a3221b);
  color: var(--bad, #a3221b);
  font-size: 1.125rem;
  font-weight: 700;
}
/* «Лично вам доли нет» — пояснение под итогом. */
.nr-none-for-you {
  background: var(--warn-bg, #fff4d6);
  border: 1px solid var(--warn-line, #d9a93a);
  color: var(--text, #1b2130);
  padding: 10px 14px;
}
.nr .nr-none-for-you p { margin: 0; }
.nr .nr-none-for-you p + p { margin-top: 6px; }

/* Бесплатный отчёт «Куда обращаться» (ctx.limited): пояснение под заголовком. */
.nr-limited-note { color: var(--muted, #4e5868); font-size: 1rem; line-height: 1.45; }
.nr-is-limited .nr-info { margin-top: 12px; }

.nr-summary-box { margin: 12px 0; }
/* Рамка сводки: итоги (dl.nr-summary-list) и под ними, в той же рамке, «+ N выплат,
 * сумма уточняется». Верхний ряд «Сохраните карту» ui.js ставит после рамки. */
.nr-summary { margin: 0; padding: 4px 12px; background: var(--card, #ffffff); border: 1px solid var(--line, #c9ced8); border-radius: 8px; }
/* «сумма уточняется» вместо 0,00 ₽ и строка «+ N выплат, сумма уточняется» (как на предпросмотре). */
.nr-is-unknown dd { color: var(--muted, #4e5868); font-weight: 600; }
.nr .nr-unknown-line { margin: 0; padding: 6px 0; border-top: 1px solid var(--line-soft, #e3e6ec); color: var(--muted, #4e5868); font-size: 1rem; font-weight: 600; }
.nr-share-note { font-style: normal; }

.nr-section { margin: 24px 0 0; }
.nr .nr-section-title { font-size: 1.25rem; line-height: 1.3; margin: 0 0 10px; }

.nr-card {
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #c9ced8);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 12px;
}
.nr .nr-pay-title, .nr .nr-flag-title { font-size: 1.125rem; line-height: 1.3; margin: 0 0 6px; color: var(--text, #1b2130); }
/* Карточка получает фокус после перехода из таблицы. Рамка — обычная рамка фокуса продукта
 * (--focus-ring, как в style.css): жёлтая #f0a400 давала к фону страницы 1,92:1 при норме 3:1
 * (пол П4, разбор Hallmark F01); тёмно-синяя — 10,2:1 к #f4f5f7. Переход (scrollIntoView) ставит
 * карточку к верху окна с запасом 16 px: рамка 3 px с зазором 2 px видна целиком, верхняя линия
 * не уходит за край (разбор UI1-CARD-RING-TOP; где scroll-margin не знают — карточка у самого края,
 * как раньше). */
.nr-card:focus { outline: 3px solid var(--focus-ring, #0b3a75); outline-offset: 2px; }
.nr-card[tabindex] { scroll-margin-top: 16px; }

/* «Подпись — значение»: суммы в строку, длинный текст — под подписью. */
.nr-facts, .nr-summary, .nr-summary-list { margin-top: 0; margin-bottom: 0; }
.nr-fact {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft, #e3e6ec);
}
.nr-fact:first-child { border-top: 0; }
.nr-fact[hidden] { display: none; }
.nr-fact dt { color: var(--muted, #4e5868); font-size: 1rem; margin: 0 8px 0 0; min-width: 0; }
.nr-fact dd { margin: 0; min-width: 0; text-align: right; }
/* Суммы переносятся только между группами разрядов (<wbr> в report.js). */
.nr-money dd { font-weight: 700; }
.nr-fact-text { display: block; }
.nr-fact-text dd { text-align: left; margin-top: 2px; }
.nr-mine {
  background: var(--chosen-bg, #e8f0fb);
  border-top: 0;
  border-radius: 6px;
  padding: 8px;
  margin: 4px 0;
}
.nr-mine dt { color: var(--text, #1b2130); font-weight: 700; }

.nr-note { color: var(--muted, #4e5868); font-size: 1rem; line-height: 1.45; }
.nr-label { margin: 10px 0 4px; color: var(--muted, #4e5868); font-size: 1rem; font-weight: 700; }

.nr-list { margin: 4px 0 0; padding-left: 20px; }
.nr-list li { margin: 4px 0; }
.nr-mark {
  display: inline-block;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.nr-have .nr-mark, .nr-mark-have { background: var(--ok-mark-bg, #e3f1e7); color: var(--ok, #1d6f37); }
.nr-need .nr-mark, .nr-mark-need { background: var(--bad-mark-bg, #fbe9e7); color: var(--bad, #a3221b); }
/* Документ, о котором анкета не спрашивала (have = null): нейтрально, без красного. */
.nr-maybe .nr-mark, .nr-mark-maybe { background: var(--neutral-bg, #eef1f5); color: var(--muted, #4e5868); font-weight: 400; white-space: normal; }
.nr-sources-list { font-size: 1rem; }

.nr-cal { list-style: none; padding-left: 0; }
.nr-cal li { padding: 6px 0; border-top: 1px solid var(--line-soft, #e3e6ec); }
.nr-cal li:first-child { border-top: 0; }
.nr-date { display: inline-block; min-width: 6em; font-weight: 700; }

.nr-flag { border-left: 4px solid var(--warn-line, #d9a93a); }
.nr-crm-row { margin: 12px 0; }

/* Контакт адвокатского бюро в флаге action "bureau" — как на стоп-экране. */
.nr-bureau { margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line-soft, #e3e6ec); }
.nr .nr-bureau p { margin: 6px 0; }
.nr-bureau-name { font-weight: 700; }

/* Контакт бюро крупно — первым блоком отчёта при флагах criminal_unknown и death_docs_unknown
 * (решение владельца 23.10.2026), как блок .bureau-alert на предпросмотре (style.css). */
.nr-bureau-alert {
  margin: 12px 0 16px;
  padding: 14px 16px;
  background: var(--warn-bg, #fff4d6);
  border: 2px solid var(--warn-line, #d9a93a);
  border-left-width: 8px;
  border-radius: 12px;
  color: var(--text, #1b2130);
}
.nr .nr-bureau-alert-title { font-size: 1.25rem; line-height: 1.3; margin: 0 0 8px; }
.nr .nr-bureau-alert-text { font-size: 1.0625rem; line-height: 1.45; }
.nr-bureau-alert .nr-bureau { margin-top: 8px; padding-top: 0; border-top: 0; }
.nr .nr-bureau-call { font-size: 1.125rem; font-weight: 700; }
/* «Вы изменили ответ…» — только на экране; на печати — обычный текст блока. */
.nr-print-only { display: none; }

.nr-disclaimer { color: var(--muted, #4e5868); font-size: 1rem; line-height: 1.45; }
/* Подвал — служебные строки (версии, ООО): мельче основного текста. */
.nr-foot { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line, #c9ced8); color: var(--muted, #4e5868); font-size: 0.875rem; }
.nr-foot p { margin: 4px 0; }
.nr-foot-small { font-size: 0.8125rem; }
.nr-foot-draft { color: var(--bad, #a3221b); font-size: 1.125rem; font-weight: 700; }

/* Скрыто с экрана, но читается экранным диктором (подпись таблицы, пояснение кнопки). */
.nr-vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- сводная таблица */

.nr-table-wrap { display: none; margin: 0 0 16px; }
.nr-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #c9ced8);
  font-size: 1rem;
  line-height: 1.4;
}
.nr-table th, .nr-table td { padding: 10px 12px; text-align: left; vertical-align: top; }
.nr-table thead th {
  background: var(--neutral-bg, #eef1f5);
  color: var(--muted, #4e5868);
  font-weight: 700;
  border-bottom: 1px solid var(--line, #c9ced8);
}
.nr-table .nr-tgroup { border-top: 1px solid var(--line, #c9ced8); }
.nr-table tbody th { font-weight: 400; }
.nr-table .nr-tdetail td { padding-top: 0; color: var(--text, #1b2130); }
.nr-tlabel { font-weight: 700; }
.nr-tsub { display: block; color: var(--muted, #4e5868); margin-top: 2px; }
.nr-tmoney { display: block; font-weight: 700; white-space: nowrap; }
.nr-table .nr-tmine { background: var(--chosen-bg, #e8f0fb); font-weight: 700; white-space: nowrap; }
.nr-table .nr-tunknown { color: var(--muted, #4e5868); font-weight: 600; }
/* Строка во всю ширину таблицы (длинный срок): сам текст — не шире ~760 px. */
.nr-tdetail-text { max-width: 760px; }
.nr-c-docs .nr-mark { margin: 0 4px 4px 0; }
.nr-c-pay { width: 26%; }
.nr-c-total { width: 16%; }
.nr-c-mine { width: 13%; }
.nr-c-where { width: 25%; }
.nr-c-docs { width: 12%; }
.nr-c-deadline { width: 14%; }
.nr-table-nodeadline .nr-c-where { width: 30%; }
.nr-table-nodeadline .nr-c-docs { width: 15%; }

/* Название выплаты — кнопка перехода к её карточке. */
.nr-jump {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent, #1f4e8c);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}
.nr-jump:hover { color: var(--accent-dark, #173c6c); text-decoration-thickness: 2px; }

/* ---------------------------------------------------------------- компьютер и большой планшет */

/* Порог в em (64em = 1024 px при обычном шрифте): медиазапрос в em считается от размера
 * шрифта, заданного в браузере. При «очень крупном шрифте» (32 px) широкая раскладка
 * включается с 2048 px, а на 1280 px остаются карточки одной колонкой, без таблицы,
 * которая с крупными суммами не влезла бы по ширине (горизонтальная прокрутка). */
@media screen and (min-width: 64em) {
  /* Только экран отчёта: анкета остаётся в колонке .wrap (720 px). Без min() — как на планшете.
   * 72,5rem = 1160 px при обычном шрифте; с крупным шрифтом экран шире — до полей окна.
   * 100vw здесь остаётся (разбор Hallmark F06 не сделан в этой части, §3.2 (а⁶)): способы без него
   * либо отвязывают ширину колонки анкеты от .wrap (проба check:build «колонка анкеты во всю ширину
   * компьютера»), либо опираются на атрибут body или :has(), которых нет у стенда check:report и в
   * старых WebView. Цена 100vw — при классической полосе прокрутки 15 px на 1024–1239 px поля
   * 24,5 px вместо 32, выхода за край нет. */
  .screen-report {
    width: min(72.5rem, 100vw - 64px);
    margin-left: calc(50% - min(36.25rem, 50vw - 32px));
  }
  .screen-report > .report-tools, .screen-report > .status, .screen-report > .report-rate, .screen-report > .actions { max-width: 760px; }

  .nr-table-wrap { display: block; }
  .nr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 16px;
    gap: 16px;
    align-items: start;
  }
  .nr-grid > .nr-card { margin: 0; }
  .nr-section .nr-grid { margin-bottom: 4px; }
  .nr-cl-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 0 24px; gap: 0 24px; }

  /* Строки текста — не шире ~760 px. Пояснение бесплатного отчёта выводит ui.js над
   * контейнером отчёта (p.hint.limited-note), поэтому оно здесь отдельно. */
  .nr-summary, .nr-none-for-you, .nr-limited-note, .nr-cal, .nr-next-text, .nr-disclaimer, .nr-bureau-alert,
  .nr-none, .nr-crm-row, .nr-foot, .nr-draft, .nr-internal, .nr-notgov, .nr-unknown-line, .nr-tdetail-text,
  .screen-report > .limited-note { max-width: 760px; }
}

/* ---------------------------------------------------------------- печать */

@media print {
  .nr-table-wrap { display: block; margin-bottom: 10pt; }
  .nr-table { font-size: 10pt; line-height: 1.3; border-color: #999999; }
  .nr-table th, .nr-table td { padding: 4pt 6pt; }
  .nr-table thead { display: table-header-group; }
  .nr-table thead th { background: none; color: #000000; border-bottom: 1px solid #999999; }
  .nr-table .nr-tgroup { border-top: 1px solid #999999; break-inside: avoid; page-break-inside: avoid; }
  .nr-tsub { color: #333333; }
  .nr-jump { min-height: 0; color: #000000; text-decoration: none; }

  /* Высокие карточки разрываются, заголовки остаются с текстом под ними. */
  .nr-card { break-inside: auto; page-break-inside: auto; }
  .nr-section-title, .nr-pay-title, .nr-flag-title, .nr-label, .nr-title {
    break-after: avoid;
    page-break-after: avoid;
  }
  .nr-bureau-alert { background: none; border: 2pt solid #000000; }
  .nr .nr-print-only { display: block !important; }
  .nr .nr-screen-only { display: none !important; }
  .nr-fact, .nr-summary, .nr-banner, .nr-list li, .nr-cal li, .nr-bureau, .nr-bureau-alert {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .nr-crm-row { display: none; }

  /* Денежные выплаты на бумаге — таблицей; в их карточках скрыто то, что уже есть в
   * таблице (суммы и доли, ведомство, адресат, срок): остаются «Как подать», пояснения
   * (в том числе к сумме, которой нет: в таблице на него ссылка), документы и источники.
   * Справки (info) печатаются целиком. */
  .nr-pay-once .nr-money, .nr-pay-once .nr-f-agency, .nr-pay-once .nr-f-where, .nr-pay-once .nr-f-deadline,
  .nr-pay-monthly .nr-money, .nr-pay-monthly .nr-f-agency, .nr-pay-monthly .nr-f-where, .nr-pay-monthly .nr-f-deadline {
    display: none;
  }
  .nr-pay .nr-fact { border-top: 0; padding: 2pt 0; }
  .nr-section .nr-grid .nr-pay-once, .nr-section .nr-grid .nr-pay-monthly { padding: 6pt 8pt; margin: 0 0 6pt; }
  .nr .nr-pay-title { font-size: 12pt; }
  .nr-label { margin: 4pt 0 2pt; }
  /* Остаток карточки денежной выплаты — пояснения к строке таблицы: 10 pt, источники 8,5 pt
   * (как строки во всю ширину под выплатой в PDF). */
  .nr-pay-once .nr-fact dt, .nr-pay-monthly .nr-fact dt, .nr-pay-once .nr-note, .nr-pay-monthly .nr-note,
  .nr-pay-once .nr-label, .nr-pay-monthly .nr-label, .nr-pay-once .nr-docs-list, .nr-pay-monthly .nr-docs-list,
  .nr-pay-once .nr-fact dd, .nr-pay-monthly .nr-fact dd { font-size: 10pt; line-height: 1.3; }
  .nr-pay .nr-sources-list { font-size: 8.5pt; line-height: 1.3; }
  .nr-pay .nr-mark { font-size: 8.5pt; }
  .nr-pay .nr-list li { margin: 1pt 0; }
  .nr-sources-list a::after { content: " (" attr(href) ")"; font-size: 8pt; overflow-wrap: anywhere; }
  /* Контакт бюро на бумаге — текстом (style.css прячет .btn при печати). */
  .nr .nr-bureau-link {
    display: inline !important;
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #000000;
    font-weight: 700;
    text-decoration: none;
  }
  .nr .nr-bureau-site::after { content: " — " attr(href); font-weight: 400; }
  .nr-mine, .nr-draft, .nr-internal, .nr-none-for-you, .nr-tmine { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
