/* Частное этого приложения: диаграммы, сетки, карточки предложений. */
.chart { display: block; overflow: visible; }
.chart__label { font: 400 12px/1 var(--font, sans-serif); fill: var(--text-muted, #6b7280); }
.chart__value { font: 500 12px/1 var(--font, sans-serif); fill: var(--text, #111827); }
.chart__bar { fill: var(--accent, #2563eb); opacity: 0.85; }
.chart__bar--alt { fill: var(--text-muted, #9ca3af); opacity: 0.55; }
td.is-max { font-weight: 600; color: var(--accent, #2563eb); }
td.is-bad { color: var(--danger, #b42318); font-weight: 600; }
td.is-good { color: var(--success, #067647); }
tr.is-muted td { opacity: 0.55; }
td.is-empty-cell { color: var(--text-muted, #9ca3af); }
td.is-tpl { background: color-mix(in srgb, var(--accent, #2563eb) 12%, transparent); font-weight: 600; }
table.grid { font-size: 12px; }
table.grid td, table.grid th { padding: 4px 8px; white-space: nowrap; }
.inline-form { display: inline; }
.inline-form button { padding: 2px 8px; font-size: 12px; }
pre.code { overflow-x: auto; padding: 12px; background: var(--surface-alt, #f6f7f9); border-radius: 8px; font-size: 12px; }
.toolbar a { margin-right: 8px; }
textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; }
.proposal { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.proposal--soft { border-left: 4px solid var(--success, #067647); }
.proposal__head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.proposal__kind { font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.proposal__coverage { margin-left: auto; color: var(--text-muted, #6b7280); }
.proposal__title { margin: 6px 0 4px; font-size: 15px; }
.proposal__detail { margin: 0; font-size: 13px; line-height: 1.5; }
.lead { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.described, .steps { margin: 0; padding-left: 20px; line-height: 1.6; }
.described li, .steps li { margin-bottom: 6px; }

.rp { display: flex; flex-direction: column; gap: 16px; }
.rp-variant { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; }
.rp-variant__form { display: flex; align-items: flex-end; gap: 10px; flex: 0 0 auto; }
.rp-variant__field { min-width: 260px; }
.rp-variant__note { flex: 1 1 320px; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-soft, #555); }
.rp-head__lead { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-muted, #4b5563); }
.rp-top { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 16px; align-items: start; }
@media (max-width: 1240px) { .rp-top { grid-template-columns: minmax(0, 1fr); } }
.rp-card { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 14px 16px; background: var(--surface, #fff); }
.rp-title { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.rp-verdict { margin: 0 0 10px; font-size: 13px; line-height: 1.5; font-weight: 500; }
.rp-note { margin: 0 0 10px; font-size: 12px; line-height: 1.5; color: var(--text-muted, #6b7280); }
.rp-note--tail { margin: 8px 0 0; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rp-table caption { caption-side: top; text-align: left; font-size: 11px; line-height: 1.45; color: var(--text-muted, #6b7280); padding-bottom: 6px; }
.rp-table th, .rp-table td { padding: 5px 6px; border-bottom: 1px solid var(--border, #eef0f3); text-align: left; vertical-align: top; }
.rp-table thead th { font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-muted, #6b7280); white-space: nowrap; }
.rp-table tbody th { font-weight: 500; white-space: nowrap; }
.rp-table tfoot th, .rp-table tfoot td { font-weight: 600; border-top: 2px solid var(--border, #e5e7eb); }
.rp-table--gap { margin-top: 14px; }
.rp-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-bad { color: var(--danger, #b42318); font-weight: 600; }
.rp-good { color: var(--success, #067647); font-weight: 600; }
.rp-muted { color: var(--text-muted, #9ca3af); }
.rp-zone { white-space: normal !important; }
.rp-floors { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-blocks { font-size: 11px; color: var(--text-muted, #4b5563); white-space: normal; min-width: 84px; }
.rp-route { white-space: nowrap; }
.rp-arrow { font-size: 14px; line-height: 1; margin-right: 3px; }
.rp-arrow--up { color: var(--success, #067647); }
.rp-arrow--down { color: var(--accent, #2563eb); }
.rp-arrow--flat { color: var(--text-muted, #6b7280); }
.rp-floor { font-variant-numeric: tabular-nums; }
.rp-plan { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 14px 16px; background: var(--surface, #fff); }
.rp-plan__scroll { overflow-x: visible; }
.rp-plan__table { border-collapse: separate; border-spacing: 3px; font-size: 12px; width: 100%; table-layout: fixed; }
.rp-plan__table th { font-weight: 500; }
.rp-col-floor { width: 92px; }
/* Базовый слой красит th фоном и делает их липкими: в схеме это давало
   полосу поверх подписей. Подписи читаются основным цветом текста. */
.rp-plan__table .rp-floorhead, .rp-plan__table .rp-blockhead { position: static; background: transparent; }
.rp-floorhead { width: 92px; text-align: right; padding: 4px 6px 4px 0; color: var(--text); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none; }
.rp-blockhead { text-align: center; padding: 2px 2px 8px; }
.rp-blockhead__name { display: block; font-weight: 700; font-size: 13px; color: var(--text); }
.rp-blockhead__flow { display: block; font-size: 10px; line-height: 1.25; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-soft, #555); overflow-wrap: anywhere; }
/* Пустой столбец между корпусами: воздух, а не ячейка. Базовый слой красит
   th фоном — разделитель его не наследует, иначе между корпусами висела полоса. */
.rp-plan__table .rp-gap { width: 16px; padding: 0; border: 0; background: transparent; }
.rp-col-gap { width: 16px; }
.rp-cell { position: relative; text-align: center; border-radius: 8px; padding: 7px 2px; background: var(--surface-alt, #f6f7f9); transition: box-shadow 0.15s ease; }
.rp-cell:hover { box-shadow: 0 0 0 2px var(--accent, #2563eb); }
.rp-cell__flow { display: block; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px; letter-spacing: -0.01em; }
.rp-cell__marks { display: flex; gap: 4px; justify-content: center; margin-top: 3px; min-height: 14px; }
.rp-mark { font-size: 10px; font-weight: 700; padding: 0 4px; border-radius: 4px; border: 1px solid currentColor; opacity: 0.95; }
/* Палитра «низкая — синяя, максимум — красная». Цвет текста и меток задан
   вместе с заливкой: наследование от темы давало белый текст на светлой
   клетке, и цифры пропадали. */
.rp-cell[data-heat="0"] { color: var(--text-muted, #b0b6bf); }
.rp-cell[data-heat="1"] { background: #dbe9fa; color: #17395c; }
.rp-cell[data-heat="2"] { background: #b3d0ef; color: #12304d; }
.rp-cell[data-heat="3"] { background: #ece4d7; color: #4a3b2c; }
.rp-cell[data-heat="4"] { background: #eda878; color: #6d2c05; }
.rp-cell[data-heat="5"] { background: #c0362e; color: #ffffff; }
.rp-cell[data-heat="1"] .rp-mark--supply, .rp-cell[data-heat="2"] .rp-mark--supply { color: #1d4f7c; }
.rp-cell[data-heat="3"] .rp-mark--supply, .rp-cell[data-heat="4"] .rp-mark--supply { color: #4a3b2c; }
.rp-cell[data-heat="5"] .rp-mark--supply { color: #ffe1de; }
.rp-cell[data-heat="1"] .rp-mark--exhaust, .rp-cell[data-heat="2"] .rp-mark--exhaust { color: #8a4a00; }
.rp-cell[data-heat="3"] .rp-mark--exhaust, .rp-cell[data-heat="4"] .rp-mark--exhaust { color: #6d2c05; }
.rp-cell[data-heat="5"] .rp-mark--exhaust { color: #ffd9b0; }
/* Подвал идёт одной плитой: ячейка перекрывает пустой столбец-разделитель. */
.rp-cell--solid { border-radius: 8px; }
/* Режим сравнения: цвет говорит о направлении сдвига нагрузки, не о величине. */
.rp-cell--delta .rp-cell__marks { font-size: 9px; opacity: 0.85; font-variant-numeric: tabular-nums; }
.rp-cell--delta .rp-cell__flow { font-size: 11.5px; letter-spacing: 0; }
.rp-delta--up { background: #f6d2cd; color: #7d241c; }
.rp-delta--down { background: #cfe4d8; color: #14503a; }
.rp-delta--flat { background: var(--surface-alt, #f6f7f9); color: var(--text-muted, #8a8a8a); }
.rp-cell--delta[title] { cursor: help; }
.rp-legend__title { font-weight: 600; color: var(--text); margin-right: 2px; }
.rp-legend__note { font-size: 11px; color: var(--text-muted, #8a8a8a); margin-left: auto; }
.rp-compare { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; }
.rp-compare__form { display: flex; align-items: flex-end; gap: 10px; }
.rp-compare__field { min-width: 240px; }
.rp-band { text-align: left; font-size: 11px; padding: 5px 7px; }
.rp-band--legend { color: var(--text-muted, #6b7280); font-size: 10px; }
.rp-share { display: inline-block; margin: 0 12px 2px 0; font-variant-numeric: tabular-nums; line-height: 1.3; }
.rp-share__label { color: var(--text-muted, #6b7280); font-size: 11px; margin-right: 3px; }
.rp-share__supply { color: var(--accent, #2563eb); font-weight: 600; }
.rp-share__exhaust { color: #a15c00; font-weight: 600; }
.rp-share__sep { color: var(--text-muted, #9ca3af); margin: 0 2px; }
.rp-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; font-size: 11px; color: var(--text-muted, #4b5563); }
.rp-legend__item { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border, #e5e7eb); }
.rp-legend__item[data-heat="1"] { background: #dbe9fa; color: #17395c; border-color: #b6d2f2; }
.rp-legend__item[data-heat="2"] { background: #b3d0ef; color: #12304d; border-color: #8fb8e0; }
.rp-legend__item[data-heat="3"] { background: #ece4d7; color: #4a3b2c; border-color: #d8ccb8; }
.rp-legend__item[data-heat="4"] { background: #eda878; color: #6d2c05; border-color: #dd9260; }
.rp-legend__item[data-heat="5"] { background: #c0362e; color: #fff; border-color: #a82c25; }
@media print {
  .rp-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rp-plan__scroll { overflow: visible; }
  .rp-cell { break-inside: avoid; }
  .rp-table { font-size: 10px; }
}
