/* Pravka · цвета продукта и оформление результата: лист договора в режиме исправлений + поля с выносками. */
:root {
  --brand: #1d2f62; --brand-2: #35539f; --brand-ink: #17264f; --brand-soft: #eaeef7; --brand-line: #cfd7ea;
  --accent: #b8873b; --accent-soft: #f6eedf; --accent-ink: #77531d;
  --pv-hi: #d23c3c; --pv-mid: #e2a400; --pv-del: #c3312b; --pv-ins: #2c56b8;
  --pv-mw: 318px;
  --pv-serif: "Times New Roman", "Liberation Serif", Times, "DejaVu Serif", serif;
}
.pv { display: flex; flex-direction: column; gap: 10px; }
.pv-head { display: flex; flex-wrap: wrap; gap: 6px; min-height: 31px; }
.pv-chip { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-ink);
  font-size: 14px; font-weight: 600; border: 1px solid var(--brand-line); white-space: nowrap; }
.pv-chip.c2 { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* документ: слева лист, справа поля с выносками, как «Все исправления» в Word */
.pv-doc { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--pv-mw); align-items: start; padding: 10px 0 8px;
  border: 1px solid #d8dde7; border-radius: 6px; overflow: hidden;
  background: linear-gradient(90deg, #fff calc(100% - var(--pv-mw) - 1px), #dde2ec 0 calc(100% - var(--pv-mw)), #f4f6fa 0);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 14px 30px -16px rgba(29, 47, 98, .35); }
.pv-c { position: relative; align-self: stretch; padding: 2px 22px 2px 32px; min-width: 0; }
.pv-top { padding-top: 2px; padding-bottom: 5px; }
.pv-title { font: 700 15px/1.25 var(--pv-serif); letter-spacing: .05em; text-transform: uppercase; color: #121417; margin-bottom: 4px; }
.pv-p { position: relative; margin: 0; font: 15px/1.4 var(--pv-serif); color: #1b1f24; }
.pv-fold { display: flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1.3; color: #6b7685; }
.pv-fold::after { content: ""; flex: 1; min-width: 12px; border-top: 1px dashed #d3d9e3; }
.pv-ok { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--good); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pv-f { padding-top: 4px; padding-bottom: 4px; }

/* риск: подсветка абзаца и полоса на левом поле */
.pv-tint { position: absolute; inset: 0 10px 0 16px; border-radius: 4px; background: rgba(210, 60, 60, .075); box-shadow: inset 3px 0 0 var(--pv-hi); }
.pv-e.mid .pv-tint { background: rgba(240, 182, 0, .13); box-shadow: inset 3px 0 0 var(--pv-mid); }
.pv-e.w-flash { animation: none; }
.pv-e.w-flash .pv-tint { animation: pv-glow 1.4s var(--ease); }
@keyframes pv-glow { 0%, 35% { box-shadow: inset 3px 0 0 var(--pv-hi), 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); } }

/* правки: зачёркнутое красным (линия прорисовывается), вписанное синим с подчёркиванием */
.pv-del.w-h, .pv-ins.w-h { opacity: 1; transform: none; }
.pv-del { text-decoration: none; color: inherit; background: linear-gradient(var(--pv-del), var(--pv-del)) no-repeat 0 62% / 0 1.6px;
  transition: background-size .45s cubic-bezier(.45, .05, .35, 1), color .3s; }
.pv-del.in { color: var(--pv-del); background-size: 100% 1.6px; }
.pv-ins { color: var(--pv-ins); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2.5px; }
.pv-ins:not(.in) { display: none; }
.pv-del + .pv-ins { margin-left: .28em; }
.pv-e.hero .pv-ins { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); border-radius: 2px; font-weight: 700; }
.pv-miss { display: none; font: 600 13px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--accent-ink);
  border: 1.5px dashed var(--pv-mid); border-radius: 6px; padding: 3px 10px; background: rgba(255, 255, 255, .75); }
.pv-miss.on { display: inline-block; }

/* поля: выноски с нормой, правилом компании и причиной */
.pv-m { position: relative; min-width: 0; padding: 1px 12px 1px 14px; display: flex; align-items: flex-start; }
.pv-cm { position: relative; flex: 1; min-width: 0; background: #fff; border: 1px solid #dde2ea; border-left: 3px solid var(--pv-mid); border-radius: 7px;
  padding: 4px 9px 5px; box-shadow: 0 1px 3px rgba(17, 24, 39, .07); }
.pv-cm.hi { border-left-color: var(--pv-hi); }
.pv-cm::before { content: ""; position: absolute; right: calc(100% + 3px); top: 11px; width: 38px; border-top: 1.5px dashed color-mix(in srgb, var(--pv-mid) 70%, transparent); }
.pv-cm.hi::before { border-top-color: color-mix(in srgb, var(--pv-hi) 55%, transparent); }
.pv-cm-h { display: flex; align-items: center; gap: 7px; font-size: 14px; line-height: 1.15; }
.pv-cm-h b { font-weight: 750; color: var(--ink); white-space: nowrap; }
.pv-av { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center;
  font: 700 12px/1 var(--pv-serif); font-style: normal; }
.pv-tag { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); border-radius: 5px; padding: 0 7px; white-space: nowrap; }
.pv-cm-t { font-size: 13.5px; line-height: 1.2; color: var(--ink-2); margin-top: 2px; }
.pv-ask { display: inline-block; margin-right: 6px; font-size: 13px; line-height: 1.15; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 5px; padding: 0 6px; }
.pv-cm-ok { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 13.5px; line-height: 1.2; font-weight: 700; color: var(--good-ink); }
.pv-cm-ok .pv-ok { width: 14px; height: 14px; }
.pv-n { font-weight: 800; font-variant-numeric: tabular-nums; }
.pv-cm.hero { border-color: color-mix(in srgb, var(--accent) 50%, #dde2ea); border-left-color: var(--pv-hi);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 4px 12px -4px rgba(119, 83, 29, .3); }
.pv-cm.hero .pv-cm-h b { font-size: 15.5px; }
.pv-cm.hero .pv-cm-t { color: var(--ink); }

/* счётчик правок над полями */
.pv-mh { flex-direction: column; align-items: stretch; gap: 3px; padding-top: 0; }
.pv-cnt { display: flex; align-items: baseline; gap: 7px; }
.pv-cn { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--brand); line-height: 1; font-variant-numeric: tabular-nums; }
.pv-cw { font-size: 16px; font-weight: 700; color: var(--ink); }
.pv-rk { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; line-height: 1.3; color: var(--ink-2); }
.pv-rk span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pv-rk i { width: 10px; height: 10px; border-radius: 3px; background: var(--pv-hi); }
.pv-rk .mid i { background: var(--pv-mid); }
.pv-rk b { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

/* печать на первом листе */
.pv-stamp { position: absolute; z-index: 2; top: 5px; right: calc(var(--pv-mw) + 18px); --rot: -5deg; display: flex; flex-direction: column; align-items: center;
  gap: 1px; padding: 4px 14px 5px; border: 2.5px solid var(--accent); border-radius: 8px; color: var(--accent-ink); background: rgba(255, 255, 255, .92);
  text-transform: uppercase; box-shadow: inset 0 0 0 2px rgba(184, 135, 59, .2); pointer-events: none; }
.pv-stamp b { font-size: 16px; letter-spacing: .09em; font-weight: 850; line-height: 1.15; }
.pv-stamp span { font-size: 13px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.pv-doc .w-scan { right: var(--pv-mw); --scan-h: 400px; z-index: 1; }

/* переписка: письмо с вложением, черновик ответа */
.pv-mail { display: flex; flex-direction: column; gap: 3px; white-space: normal; }
.pv-mail > b { font-size: 14.5px; }
.pv-att.w-file { min-width: 0; margin-top: 7px; padding-top: 9px; border-top: 1px solid var(--line-2); }
.pv-dr { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pv-dr-h { font-size: 12px; font-weight: 700; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .05em; }
.pv-dr-to { font-size: 13px; color: var(--muted); }
.pv-dr-t { font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.pv-dr-f { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 9px; background: var(--page); font-size: 13.5px; min-width: 0; }
.pv-dr-f b { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-dr-f small { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.pv-fi { flex: none; width: 20px; height: 24px; border-radius: 4px; background: #2b579a; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; }

/* ноутбук 1280: поля уже, лист шире */
@container (max-width: 860px) {
  .pv-doc { --pv-mw: 276px; }
  .pv-c { padding-left: 26px; padding-right: 16px; }
  .pv-tint { left: 12px; right: 6px; }
  .pv-m { padding-left: 10px; padding-right: 10px; }
  .pv-cm::before { width: 22px; }
}
@container (max-width: 700px) {
  .pv-doc { grid-template-columns: minmax(0, 1fr); background: #fff; padding-top: 12px; }
  .pv-c { padding: 4px 12px 4px 24px; }
  .pv-tint { left: 8px; right: 4px; }
  .pv-m { padding: 2px 10px 8px 24px; }
  .pv-m:empty { display: none; }
  .pv-mh { padding-bottom: 10px; }
  .pv-cm::before { display: none; }
  .pv-p { font-size: 15.5px; }
  .pv-stamp { position: static; justify-self: center; margin: 12px 0 4px; }
  .pv-doc .w-scan { right: 0; }
}
