.hero {
  background: linear-gradient(160deg, #1950df 0%, #315ff0 56%, #6386f0 100%);
  color: var(--white);
}

.hero__inner {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 18px 32px 46px;
}

.category-toggle {
  display: none;
}

.category-strip {
  position: relative;
  z-index: 70;
  min-height: 96px;
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 18px;
  align-items: start;
}

.category-item {
  position: relative;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .88);
  min-height: 86px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.28;
  font-weight: 400;
  white-space: pre-line;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.category-item:hover,
.category-item:focus-visible,
.category-item.is-active {
  color: var(--blue);
  background: #fff;
  border-radius: 8px 8px 0 0;
  transform: translateY(0);
  outline: none;
}

.category-item.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
  background: #fff;
}

.category-icon {
  width: 31px;
  height: 31px;
  stroke: currentColor;
  fill: none;
  opacity: .58;
  stroke-width: 2.2;
  transition: opacity .18s ease;
}

.category-item:hover .category-icon,
.category-item:focus-visible .category-icon,
.category-item.is-active .category-icon {
  opacity: .88;
}

.category-menu {
  position: absolute;
  z-index: 90;
  top: 96px;
  left: 32px;
  right: 32px;
  margin: 0;
  max-width: none;
  max-height: min(540px, calc(100vh - 200px));
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 22px 46px rgba(4, 28, 89, .18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.category-menu[hidden] {
  display: none;
}

.category-menu__head {
  min-height: 56px;
  padding: 12px 20px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e7eef8;
}

.category-menu__head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.category-menu__icon {
  width: 29px;
  height: 29px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 2.2;
  flex: 0 0 auto;
}

.category-menu h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 400;
}

.category-menu__close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.category-menu__close:hover,
.category-menu__close:focus-visible {
  background: #e1ebff;
  outline: none;
}

.category-menu__grid {
  padding: 8px 18px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
  flex: 1 1 auto;
  overflow: auto;
}

.category-service {
  display: block;
  min-width: 0;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background .16s ease;
}

.category-service:hover,
.category-service:focus-visible {
  background: #f2f6ff;
  outline: none;
}

.category-service strong {
  display: block;
  color: var(--blue);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 400;
  margin-bottom: 3px;
}

.category-service span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.32;
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr);
  gap: 0;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
}

.assistant-visual {
  position: relative;
  justify-self: end;
  margin-right: 18px;
  width: 143px;
  height: 164px;
}

.assistant-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 22px rgba(7, 36, 108, .24));
}

.search-panel {
  position: relative;
  z-index: 30;
  grid-column: 2;
  justify-self: stretch;
  min-width: 0;
  width: 100%;
  max-width: 760px;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.quick-links a {
  min-height: 66px;
  border-radius: 8px;
  padding: 12px 38px 12px 16px;
  background: rgba(255,255,255,.18);
  color: var(--white);
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  font-size: 16px;
  line-height: 1.32;
  font-weight: 400;
  position: relative;
  transition: background .18s ease, transform .18s ease;
}

.quick-links a:hover,
.quick-links a:focus-visible {
  background: rgba(255,255,255,.28);
  transform: translateY(-1px);
  outline: none;
}

.quick-links a::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: translateY(-50%) rotate(-45deg);
}

.quick-links svg {
  width: 29px;
  height: 29px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  opacity: .95;
}

.service-search {
  height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.service-search input {
  border: 0;
  min-width: 0;
  padding: 0 16px;
  font-size: 20px;
  color: var(--text);
  outline: none;
}

.service-search input::placeholder {
  color: #7a8697;
  opacity: 1;
}

.service-search button {
  border: 0;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.service-search__icon {
  width: 34px;
  height: 34px;
  overflow: visible;
  stroke: var(--blue);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke .18s ease, transform .18s ease;
}

.service-search button:hover .service-search__icon,
.service-search button:focus-visible .service-search__icon {
  stroke: var(--blue-dark);
  transform: scale(1.04);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.chips button {
  border: 0;
  border-radius: 20px;
  padding: 9px 15px;
  background: #0b49c7;
  color: #fff;
  font-size: 15.5px;
  font-weight: 400;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.chips button:hover,
.chips button:focus-visible {
  background: #073fad;
  transform: translateY(-1px);
  outline: none;
}

.search-results {
  position: absolute;
  z-index: 40;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  max-height: 430px;
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  border: 1px solid rgba(214, 226, 244, .95);
  overflow: auto;
  box-shadow: 0 20px 44px rgba(16, 39, 92, .22);
}

.search-results[hidden] {
  display: none;
}

.search-result {
  display: block;
  padding: 14px 18px;
  border-bottom: 1px solid #edf1f7;
}

.search-result:hover {
  background: #f5f8ff;
}

.search-result strong {
  display: block;
  margin-bottom: 5px;
  font-weight: 400;
}

.search-result span {
  display: -webkit-box;
  color: var(--muted);
  overflow: hidden;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.section {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 62px 32px 0;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section h1,
.section h2 {
  margin: 0 0 28px;
  font-size: 36px;
  line-height: 1.1;
  font-weight: 900;
}

.section-arrows {
  display: flex;
  gap: 14px;
}

.section-arrows button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #e8efff;
  color: #2f60dd;
  font-size: 24px;
  line-height: 0;
  cursor: pointer;
}

.section-arrows button:hover {
  background: #dce8ff;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 22px;
}

.news-card {
  min-height: 226px;
  border-radius: 8px;
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  font-size: 17px;
  line-height: 1.34;
  font-weight: 400;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .58);
  transition: transform .18s ease, box-shadow .18s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(23, 48, 99, .11);
}

.news-card--green { background: linear-gradient(140deg, #def7ea 0%, #e6efff 100%); }
.news-card--blue { background: linear-gradient(140deg, #dcecff 0%, #e6ecff 100%); }
.news-card--violet { background: linear-gradient(140deg, #e6e6ff 0%, #f4e7ff 100%); }
.news-card--pink { background: linear-gradient(140deg, #ffe8f3 0%, #ebefff 100%); }
.news-card--cyan { background: linear-gradient(140deg, #d9f7ff 0%, #e7efff 100%); }

.news-card__image-frame {
  position: relative;
  width: 184px;
  height: 124px;
  margin: 0 auto 2px;
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
}

.news-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 0 rgba(255, 255, 255, .28));
  transform: scale(var(--news-card-image-scale, 1));
  transform-origin: center;
}

.news-card--image-compact {
  --news-card-image-scale: .88;
}

.news-card--image-expanded {
  --news-card-image-scale: 1.18;
}

.news-card strong {
  font-weight: 400;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 58px;
}

.catalog-card {
  min-height: 176px;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  border: 1px solid #e2e9f5;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.catalog-card:hover {
  border-color: #cbd9ef;
  box-shadow: 0 14px 30px rgba(24, 46, 88, .07);
}

.catalog-card__icon {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 2.1;
}

.catalog-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.22;
  font-weight: 400;
}

.catalog-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.catalog-card a {
  color: var(--blue);
  font-size: 15px;
  font-weight: 400;
}

.catalog-card a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.category-strip[hidden],
.section--catalog[hidden] {
  display: none;
}

.mvp-version-toggle {
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #6f7a86;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.mvp-version-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mvp-version-toggle__track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #c9d0d8;
  box-shadow: inset 0 0 0 1px rgba(95, 108, 121, .18);
  transition: background .18s ease, box-shadow .18s ease;
}

.mvp-version-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(38, 48, 58, .25);
  transition: transform .18s ease;
}

.mvp-version-toggle input:checked + .mvp-version-toggle__track {
  background: #8b96a3;
  box-shadow: inset 0 0 0 1px rgba(71, 82, 94, .22);
}

.mvp-version-toggle input:checked + .mvp-version-toggle__track .mvp-version-toggle__thumb {
  transform: translateX(20px);
}

.mvp-version-toggle input:focus-visible + .mvp-version-toggle__track {
  outline: 3px solid rgba(111, 122, 134, .28);
  outline-offset: 3px;
}

.mvp-version-toggle:hover {
  color: #4d5965;
}

.service-shell {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 38px 32px 70px;
}

.back-link {
  display: inline-flex;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 22px;
}

.back-link:hover {
  color: var(--blue-dark);
}

.service-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.service-aside,
.service-workspace,
.run-panel {
  background: #fff;
  border: 1px solid #e2e9f5;
  border-radius: 8px;
}

.service-aside {
  padding: 28px;
}

.service-aside__label {
  color: var(--blue);
  font-weight: 900;
  margin-bottom: 16px;
}

.service-aside h1 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 900;
}

.service-aside p {
  color: var(--muted);
  line-height: 1.45;
}

.service-workspace {
  padding: 28px;
}

.form-grid {
  display: grid;
  gap: 16px;
  max-width: none;
}

.form-grid label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  border: 1px solid #cdd8ea;
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  font-weight: 400;
  outline: none;
}

/* 3.3: выбор вида итогового акта в форме услуги */
.form-grid select {
  background: #fff;
}

.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13, 76, 211, .12);
}

.form-grid textarea {
  min-height: 150px;
  resize: vertical;
}

/* Фильтры поиска НПА (1.2): сворачиваемый блок под строкой поиска. */
.npa-filters {
  border: 1px solid #e1e8f4;
  border-radius: 10px;
  padding: 0 16px;
}

.npa-filters > summary {
  padding: 12px 0;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.npa-filters[open] > summary {
  border-bottom: 1px solid #eef2f9;
  margin-bottom: 14px;
}

.npa-filters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 16px;
  padding-bottom: 16px;
}

.npa-filters__grid label {
  font-weight: 600;
  font-size: 14px;
}

.npa-filters__grid select {
  width: 100%;
  border: 1px solid #cdd8ea;
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  font-weight: 400;
  background: #fff;
  outline: none;
}

.npa-filters__grid select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13, 76, 211, .12);
}

.file-field {
  display: grid;
  gap: 9px;
}

.file-field__label {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.file-field__hint {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.file-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  border: 2px dashed #cbd7e9;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fbfcff;
}

.file-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-picker__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #cbd7e9;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 18px;
  font-weight: 700;
}

.file-picker__name {
  color: var(--text);
  font-weight: 700;
  word-break: break-word;
}

.form-error {
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff1f2;
  color: #b4233b;
  border: 1px solid #ffd4dc;
}

.npa-demo-warning {
  color: #b4233b;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.primary-button {
  justify-self: start;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 13px 22px;
  font-weight: 900;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.primary-button--wide {
  justify-self: stretch;
  min-height: 54px;
  font-size: 18px;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--blue-dark);
  transform: translateY(-1px);
  outline: none;
}

.primary-button:disabled,
.primary-button:disabled:hover,
.primary-button:disabled:focus-visible {
  background: #9aa9bd;
  cursor: default;
  transform: none;
}

.form-grid--disabled {
  opacity: .82;
}

.run-panel {
  grid-column: 1 / -1;
  overflow: hidden;
  margin-top: 0;
  padding: 0;
}

.run-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 12px 14px;
  border-bottom: 1px solid #dbe4f2;
  background: #fbfcff;
}

.run-panel--mvp .run-tabs {
  grid-template-columns: minmax(0, 1fr) auto;
}

.run-tablist {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.run-current-stage {
  display: none;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.run-panel--mvp .run-current-stage {
  display: inline-flex;
}

.run-panel--mvp .run-tablist,
.run-panel--mvp .run-model-pill {
  display: none;
}

.run-current-stage__label {
  flex: 0 0 auto;
  color: var(--text);
  font-weight: 700;
}

.run-current-stage__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

.run-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.run-tab:disabled {
  cursor: default;
  opacity: .55;
}

.run-tab--active {
  background: #fff;
  color: #5b4bd8;
  box-shadow: 0 4px 16px rgba(24, 43, 79, .08);
}

.run-tab__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aabbd;
}

.run-tab--active .run-tab__dot {
  background: #6b5cff;
  box-shadow: 0 0 0 5px #ebe8ff;
}

.run-tab__count {
  min-width: 26px;
  min-height: 24px;
  border-radius: 999px;
  background: #eef2ff;
  color: #5b4bd8;
  padding: 2px 8px;
  text-align: center;
}

.run-model-pill,
.run-timer {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  border: 1px solid #cbd4ff;
  border-radius: 999px;
  background: #f7f6ff;
  color: #5b4bd8;
  padding: 8px 16px;
  font-weight: 700;
}

.run-model-pill {
  justify-self: center;
  gap: 8px;
  max-width: min(520px, 42vw);
  min-height: 34px;
  padding: 7px 14px;
}

.run-model-pill::before,
.run-timer::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.run-model-pill__label {
  display: inline-flex;
  align-items: center;
  color: #6c7a90;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.run-model-pill__value {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
}

.run-model-pill.is-loading {
  border-style: dashed;
  color: #6c7a90;
}

.run-model-pill.is-unavailable {
  border-color: #dbe4f2;
  background: #fff;
  color: #6c7a90;
}

.run-timer {
  justify-self: end;
  gap: 8px;
  min-width: 148px;
  justify-content: center;
}

.run-timer.is-idle {
  border-color: #dbe4f2;
  background: #fff;
  color: #6c7a90;
}

.run-timer.is-running {
  border-color: #cbd4ff;
  background: #f7f6ff;
  color: #5b4bd8;
}

.run-timer.is-running::before {
  animation: run-timer-pulse 1.1s ease-in-out infinite;
}

.run-timer.is-done {
  border-color: #bfe7cf;
  background: #f1fbf5;
  color: #148a46;
}

.run-timer.is-error {
  border-color: #ffc9d4;
  background: #fff1f3;
  color: #c01840;
}

.run-timer__value {
  font-variant-numeric: tabular-nums;
}

.run-timer__status {
  opacity: .85;
}

@keyframes run-timer-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(91, 75, 216, .45);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(91, 75, 216, 0);
  }
}

.run-pane {
  padding: 12px 14px 18px;
}

.run-feed {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.run-event {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-radius: 8px;
  padding: 12px 14px;
}

.run-event:nth-child(odd) {
  background: #f8faff;
}

.run-event__icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 900;
}

.run-event--model .run-event__icon {
  background: #f4e8ff;
  color: #8d57d9;
}

.run-event--tool .run-event__icon {
  background: #edf6ff;
  color: #2c72ce;
}

.run-event--warning .run-event__icon {
  background: #fff5da;
  color: #b06d00;
}

.run-event--error .run-event__icon {
  background: #ffe8ee;
  color: #c01840;
}

.run-event--done .run-event__icon {
  background: #e9f8ef;
  color: #148a46;
}

.run-event__body {
  display: grid;
  gap: 4px;
}

.run-event strong {
  color: var(--text);
  font-weight: 700;
}

.run-event__body > span {
  color: var(--muted);
}

.run-event time {
  color: #9aa9bd;
  white-space: nowrap;
}

.result-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

/* Строка действий карточки результата поиска (1.5) */
.result-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.result-card__actions .result-link { margin-top: 0; }

/* Кнопка «Открыть карточку» — заливная пилюля бренда */
.result-link--card {
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--primary, #4032fe);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(64, 50, 254, .22);
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.result-link--card::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: var(--ic-card) center / contain no-repeat;
  mask: var(--ic-card) center / contain no-repeat;
}
.result-link--card:hover,
.result-link--card:focus-visible {
  background: var(--primary-hover, #3526d6);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(64, 50, 254, .3);
  outline: none;
}
.result-link--card:active { transform: translateY(0); box-shadow: 0 3px 9px rgba(64, 50, 254, .22); }

:root {
  --ic-card: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='3' width='16' height='18' rx='2'/><path d='M8 8h8M8 12h8M8 16h5'/></svg>");
  --ic-download: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3v12M7 10l5 5 5-5M5 21h14'/></svg>");
}

/* «Скачать DOCX» рядом с карточкой — вторичная контурная пилюля */
.result-card__actions .result-link:not(.result-link--card):not(.result-link--collect) {
  align-items: center;
  gap: 7px;
  margin-top: 0;
  padding: 9px 16px;
  border: 1px solid #cdd8ea;
  border-radius: 10px;
  background: #fff;
  color: var(--primary, #4032fe);
  font-size: 14px;
  font-weight: 700;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.result-card__actions .result-link:not(.result-link--card):not(.result-link--collect)::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: var(--ic-download) center / contain no-repeat;
  mask: var(--ic-download) center / contain no-repeat;
}
.result-card__actions .result-link:not(.result-link--card):not(.result-link--collect):hover,
.result-card__actions .result-link:not(.result-link--card):not(.result-link--collect):focus-visible {
  background: #f1f3ff;
  border-color: var(--primary, #4032fe);
  transform: translateY(-1px);
  outline: none;
}
.result-card__actions .result-link:not(.result-link--card):not(.result-link--collect):active { transform: translateY(0); }

.result-view {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.result-state {
  border: 1px solid #dbe7f6;
  border-radius: 8px;
  padding: 18px 20px;
  background: #f7fbff;
}

.result-state--success {
  border-color: #bfe7cf;
  background: #f1fbf5;
}

.result-state--warning {
  border-color: #f6d59b;
  background: #fff8ec;
}

.result-state--error {
  border-color: #ffc9d4;
  background: #fff1f3;
}

.result-state--info {
  border-color: #cdd8ea;
  background: #f7fbff;
}

.result-state strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.result-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.result-section h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.25;
}

.result-list {
  display: grid;
  gap: 12px;
}

.result-card {
  position: relative;
  min-height: 58px;
  border: 1px solid #e2e9f5;
  border-radius: 8px;
  background: #fff;
  padding: 15px 16px 15px 54px;
}

.result-card--plain {
  padding-left: 16px;
}

.result-card__number {
  position: absolute;
  left: 16px;
  top: 15px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.result-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.3;
}

.result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.result-card mark {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(79, 59, 252, .14);
  color: var(--primary);
  font-weight: 600;
}

.result-meta {
  display: block;
  margin: -2px 0 8px;
  color: #71829a;
  font-size: 14px;
  line-height: 1.4;
}

.result-editions {
  margin-top: 14px;
  border-top: 1px solid #e7edf6;
  padding-top: 12px;
}

.result-editions summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

.result-editions__list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.result-edition {
  border-left: 3px solid #dbe7f6;
  padding-left: 12px;
}

.result-edition strong {
  font-size: 15px;
}

.result-card--issue-critical {
  border-color: #ffc5d0;
  background: #fff4f6;
}

.result-card--issue-major {
  border-color: #f7d58d;
  background: #fff8e7;
}

.result-card--issue-minor,
.result-card--issue-review {
  background: #fff;
}

.issue-severity {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 900;
  white-space: nowrap;
  vertical-align: baseline;
}

.issue-severity--critical {
  border-color: #ffb8c6;
  background: #ffe7ec;
  color: #b91539;
}

.issue-severity--major {
  border-color: #f3cd7e;
  background: #fff0c7;
  color: #956000;
}

.issue-severity--minor {
  border-color: #dbe7f6;
  background: #f4f8ff;
  color: #5b6d86;
}

.issue-severity--review {
  border-color: #d7dde8;
  background: #fff;
  color: #6c7a90;
}

/* Норма-основание обязательного требования — откуда взято (5.5) */
.req-basis {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 2px 8px;
  border: 1px solid #cdd3f2;
  border-radius: 5px;
  background: #eef1ff;
  color: #4032fe;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: baseline;
}

/* Адресат обязательного требования — кого затрагивает (5.2) */
.req-audience {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 2px 8px;
  border: 1px solid #bfe3d0;
  border-radius: 5px;
  background: #e9f7ef;
  color: #1c7a4d;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: baseline;
}

/* Риск обязательного требования (5.3) */
.req-risk {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 2px 8px;
  border: 1px solid #f3cd7e;
  border-radius: 5px;
  background: #fff3d6;
  color: #9a5b00;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: baseline;
}

/* Ссылка на нарушенное правило Приказа № 222 (2.1) */
.issue-rule {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 2px 8px;
  border: 1px solid #cdd3f2;
  border-radius: 5px;
  background: #eef1ff;
  color: #4032fe;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: baseline;
}

.result-empty {
  margin: 0;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f7f9fd;
  color: var(--muted);
}

/* 4.2: покомандный список правок «Применить изменения» */
.amd-ops { display: flex; flex-direction: column; gap: 10px; }
.amd-op {
  border: 1px solid #e2e6f3;
  border-left: 3px solid #cbd2ec;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fbfcff;
}
.amd-op--ok { border-left-color: #1f9d55; }
.amd-op--err { border-left-color: #d64545; background: #fef7f7; }
.amd-op--off { border-left-color: #b7bdd0; background: #f5f6fa; opacity: .8; }
.amd-op--chg { border-left-color: #4032fe; }
.amd-op__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.amd-op__status {
  display: inline-flex; padding: 2px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.amd-op__status--ok { background: #e6f6ec; color: #1f7a45; }
.amd-op__status--err { background: #fbe4e4; color: #b02a2a; }
.amd-op__status--off { background: #e9ebf2; color: #6a7186; }
.amd-op__status--chg { background: #eef1ff; color: #4032fe; }
.amd-op__kind { font-size: 12px; font-weight: 600; color: var(--muted); }
.amd-op__reason { font-size: 12px; color: #b02a2a; }
.amd-op__comment { margin: 8px 0 0; font-size: 13px; color: var(--text); }
.amd-op__diff { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.amd-old { text-decoration: line-through; color: #b02a2a; background: #fbe4e4; padding: 1px 6px; border-radius: 4px; }
.amd-neo { color: #1f7a45; background: #e6f6ec; padding: 1px 6px; border-radius: 4px; }
.amd-op__rollback {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 12px; color: var(--muted); cursor: pointer;
}
.amd-op__rollback input { cursor: pointer; }
.amd-regen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.amd-regen__hint { font-size: 12px; color: var(--muted); }
[data-amd-regenerate]:disabled,
[data-chg-regenerate]:disabled { opacity: .5; cursor: not-allowed; }

/* 3.4: предпросмотр «Было/Стало» по изменению и выбор изменений для проекта */
.chg-ba {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px; margin-top: 10px;
}
.chg-ba__side { display: grid; gap: 4px; align-content: start; }
.chg-ba__label {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.chg-ba__text {
  border-radius: 6px; padding: 8px 10px; font-size: 13px; line-height: 1.45;
  max-height: 220px; overflow-y: auto;
}
.chg-ba__text p { margin: 0; }
.chg-ba__text p + p { margin-top: 6px; }
.chg-ba__text--old { background: #fbe4e4; color: #7d2020; }
.chg-ba__text--neo { background: #e6f6ec; color: #175c34; }
.chg-pick {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 12px; color: var(--muted); cursor: pointer;
}
.chg-pick input { cursor: pointer; }
.amd-op--off { opacity: .55; }
/* 4.3: конфликты */
.amd-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
  border-radius: 10px; background: #fbe4e4; color: #b02a2a;
  font-size: 12px; font-weight: 700; vertical-align: middle;
}
.amd-conflicts__hint { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.amd-count--ok { background: #e6f6ec; color: #1f7a45; }

/* 2.2: автоисправления оформления */
.fix-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.fix-row {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid #e2e6f3; border-radius: 8px; padding: 10px 12px;
  background: #fbfcff; cursor: pointer;
}
.fix-row input { margin-top: 3px; cursor: pointer; }
.fix-row__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fix-row__label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.fix-result { margin-top: 12px; }
.fix-cmp { margin-top: 14px; }
.fix-cmp__h { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--text); }

/* 3.2: предпросмотр текста изменяющего акта */
.draft-preview {
  max-height: 480px; overflow-y: auto;
  border: 1px solid #e2e6f3; border-radius: 10px;
  padding: 20px 24px; background: #fff;
}
.draft-line { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--text); white-space: pre-wrap; }
.draft-line:last-child { margin-bottom: 0; }
.draft-line--head { text-align: center; font-weight: 700; text-transform: none; margin: 12px 0; }

/* 4.4: выбор источника исходного акта (загрузка / из базы НПА) */
.source-mode__tabs { display: inline-flex; gap: 4px; margin-bottom: 10px; padding: 3px; border-radius: 9px; background: #eef1f8; }
.source-mode__tab {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.source-mode__tab.is-active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20, 22, 45, .12); }
.corpus-picker { display: flex; flex-direction: column; gap: 8px; }
.corpus-picker__search {
  padding: 10px 12px; border: 1px solid #d7dcec; border-radius: 8px; font-size: 14px;
}
.corpus-picker__search:focus { outline: none; border-color: #4032fe; box-shadow: 0 0 0 3px rgba(64, 50, 254, .12); }
.corpus-picker__results {
  display: flex; flex-direction: column; max-height: 260px; overflow-y: auto;
  border: 1px solid #e2e6f3; border-radius: 8px; background: #fff;
}
.corpus-picker__item {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  border: 0; border-bottom: 1px solid #eef1f8; background: transparent;
  padding: 9px 12px; text-align: left; cursor: pointer; width: 100%;
}
.corpus-picker__item:last-child { border-bottom: 0; }
.corpus-picker__item:hover { background: #f4f6fd; }
.corpus-picker__item-title { font-size: 13px; color: var(--text); line-height: 1.35; }
.corpus-picker__item-meta { font-size: 12px; color: var(--muted); }
.corpus-picker__empty { margin: 0; padding: 12px; font-size: 13px; color: var(--muted); }
.corpus-picker__chosen {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 10px 12px; border: 1px solid #cbd9c8; border-radius: 8px; background: #f2f9f0;
}
.corpus-picker__chosen-title { font-size: 13px; color: var(--text); }
.corpus-picker__clear {
  border: 0; background: transparent; color: #4032fe; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.result-link--download {
  margin-top: 0;
  border-radius: 8px;
  padding: 12px 16px;
  background: var(--blue-soft);
}

.result-link--download:hover,
.result-link--download:focus-visible {
  color: var(--blue-dark);
  background: #e2ecff;
  outline: none;
}

@media (max-width: 1180px) {
  .category-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-menu { top: 200px; }
  .hero__content {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 28px;
  }
  .assistant-visual {
    justify-self: center;
    margin-right: 0;
  }
  .search-panel { grid-column: auto; }
  .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .hero__content { grid-template-columns: 1fr; }
  .assistant-visual { display: none; }
  .quick-links { grid-template-columns: 1fr; }
  .category-menu__grid { grid-template-columns: 1fr; }
  .news-grid,
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .hero__inner,
  .section,
  .service-shell { padding-left: 16px; padding-right: 16px; }

  .category-toggle {
    position: relative;
    z-index: 80;
    width: 100%;
    min-height: 56px;
    border: 1px solid rgba(255, 255, 255, .36);
    border-radius: 8px;
    padding: 0 16px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 18px;
    line-height: 1.2;
    cursor: pointer;
  }

  .category-toggle:hover,
  .category-toggle:focus-visible {
    background: rgba(255, 255, 255, .24);
    outline: none;
  }

  .category-toggle__icon {
    width: 26px;
    height: 20px;
    display: grid;
    gap: 5px;
    flex: 0 0 auto;
  }

  .category-toggle__icon span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .category-toggle > span:last-child {
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
  }

  .category-strip {
    position: absolute;
    z-index: 90;
    top: 84px;
    left: 16px;
    right: 16px;
    min-height: 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 6px;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 22px 46px rgba(4, 28, 89, .18);
  }

  .category-strip.is-open {
    display: grid;
  }

  .category-item {
    min-height: 56px;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--text);
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    align-content: center;
    gap: 12px;
    font-size: 16px;
    line-height: 1.25;
    text-align: left;
    white-space: normal;
  }

  .category-item:hover,
  .category-item:focus-visible,
  .category-item.is-active {
    color: var(--blue);
    background: #f2f6ff;
    border-radius: 6px;
  }

  .category-item.is-active::after {
    display: none;
  }

  .category-icon {
    width: 28px;
    height: 28px;
  }

  .category-menu__head { padding: 16px; }
  .category-menu h2 { font-size: 22px; }
  .category-menu {
    z-index: 100;
    top: 84px;
    left: 16px;
    right: 16px;
    max-height: calc(100vh - 112px);
  }
  .section h1,
  .section h2 { font-size: 34px; }
  .news-grid,
  .catalog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .mvp-version-toggle {
    margin: 0;
  }
}

/* Карточка документа НПА (1.5) */
.npa-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 1cm;
  background: rgba(15, 22, 41, .5);
}

.npa-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.npa-card__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid #eef2f9;
}

.npa-card__titles { flex: 1; min-width: 0; }
.npa-card__titles h2 { margin: 8px 0 0; font-size: 18px; line-height: 1.3; }

.npa-card__close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #e1e8f4;
  border-radius: 8px;
  background: #fff;
  color: #71829a;
  font-size: 14px;
  cursor: pointer;
}
.npa-card__close:hover { background: #f2f4fb; }

.npa-card__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 22px; }
.npa-card__sec { padding: 16px 0; border-bottom: 1px solid #f1f4fa; }
.npa-card__sec:last-child { border-bottom: 0; }
.npa-card__sec h3 {
  margin: 0 0 10px;
  color: #71829a;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.npa-req { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 20px; margin: 0; }
.npa-req dt { color: #71829a; font-size: 13px; }
.npa-req dd { margin: 2px 0 0; font-weight: 600; }

.npa-eds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.npa-ed { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #eef2f9; border-radius: 10px; }
.npa-ed--current { border-color: #bfe3d0; background: #f3fbf6; }
.npa-ed__when { font-weight: 600; }
.npa-ed__sp { flex: 1; }
.npa-ed__here { color: #71829a; font-size: 13px; }
.npa-ed__open, .npa-ed__dl {
  border: 1px solid #cdd8ea;
  border-radius: 8px;
  padding: 5px 10px;
  background: #fff;
  color: var(--primary, #4032fe);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.npa-badge { display: inline-flex; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.npa-badge--status { background: #eef1ff; color: #4032fe; }
.npa-badge--ok { background: #e9f7ef; color: #1c7a4d; }

.npa-card__muted { margin: 0; color: #71829a; }
.npa-card__body { max-height: 300px; overflow-y: auto; white-space: pre-wrap; line-height: 1.5; color: #2a2c3c; font-size: 14px; }
.npa-card__actions { padding: 16px 22px; border-top: 1px solid #eef2f9; }

/* Подборка НПА (1.6) */
.npa-search-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.secondary-button {
  border: 1px solid #cdd8ea;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  padding: 13px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.secondary-button:hover,
.secondary-button:focus-visible {
  background: #f1f4ff;
  border-color: var(--blue);
  transform: translateY(-1px);
  outline: none;
}

/* Кнопка «В подборку» — контурная пилюля, при добавлении зелёная */
.result-link--collect {
  align-items: center;
  gap: 7px;
  margin-top: 0;
  padding: 9px 16px;
  border: 1px solid #cdd8ea;
  border-radius: 10px;
  background: #fff;
  color: var(--primary, #4032fe);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.result-link--collect::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: var(--ic-bookmark) center / contain no-repeat;
  mask: var(--ic-bookmark) center / contain no-repeat;
}
.result-link--collect:hover,
.result-link--collect:focus-visible {
  background: #f1f3ff;
  border-color: var(--primary, #4032fe);
  transform: translateY(-1px);
  outline: none;
}
.result-link--collect.is-active {
  background: #e9f7ef;
  border-color: #bfe3d0;
  color: #1c7a4d;
}

:root {
  --ic-bookmark: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 3h12v18l-6-4-6 4z'/></svg>");
}

/* Список документов в модалке «Моя подборка» */
.npa-eds--collection .npa-ed { flex-wrap: wrap; }
.npa-eds--collection .npa-ed__when { flex: 1 1 100%; }
.npa-ed__meta { color: #71829a; font-size: 13px; }
.npa-ed__rm {
  border: 1px solid #e2c4c4;
  border-radius: 8px;
  padding: 5px 10px;
  background: #fff;
  color: #c0392b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.npa-ed__rm:hover { background: #fbdede; }

/* Счётчик документов в пункте меню «Мои документы» (1.6) */
.nav-count {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.sidebar-collapsed .nav-count { display: none; }

/* Секция «Мои документы» в сайдбаре (1.6): элементы-кнопки как в «Недавнем» */
button.recent-item {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.recent-item--doc svg { color: #9fd0ff; opacity: 1; }
.sidebar__count {
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.sidebar__count[hidden] { display: none; }

/* Страница «Мои документы» (1.6): строки как в «Истории» + действия справа */
.doc-row { flex-wrap: wrap; align-items: flex-start; }
.doc-row .history-item__body { flex: 1; }
/* Заголовок документа показываем целиком (не в одну строку с обрезкой) */
.doc-row .history-item__body strong { white-space: normal; overflow: visible; }
/* Кнопки — на отдельной строке, прижаты к правому краю */
.doc-row .doc-actions { flex-basis: 100%; margin: 10px 0 0; justify-content: flex-end; flex-wrap: wrap; }
.doc-remove {
  align-items: center;
  border: 1px solid #e2c4c4;
  border-radius: 10px;
  padding: 9px 14px;
  background: #fff;
  color: #c0392b;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease;
}
.doc-remove:hover { background: #fbdede; }

/* Шапка страницы «Мои документы» с кнопкой выгрузки (1.7) */
.history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.history__head .history__title { margin: 4px 0 18px; }
.history__head .result-link--download { margin: 0 0 14px; }

/* Выбор документов подборки для выгрузки в ZIP (1.7) */
.doc-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.doc-tools .primary-button, .doc-tools .secondary-button { padding: 10px 16px; }
.doc-selall { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; cursor: pointer; }
.doc-check { width: 18px; height: 18px; flex: 0 0 18px; margin-right: 4px; accent-color: var(--blue); cursor: pointer; }
.doc-selall input { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; }

/* Связанные акты (1.8) и текст по абзацам с подсветкой найденного (1.9) */
.npa-card__body { white-space: normal; max-height: none; overflow: visible; }
.npa-para { margin: 0 0 8px; }
.npa-para--hit {
  background: #fff3d6;
  border-left: 3px solid #f0a500;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0 -10px 8px;
  scroll-margin: 24px;
  animation: npaFlash 1.6s ease;
}
@keyframes npaFlash {
  0% { background: #ffe08a; }
  30% { background: #ffd254; }
  100% { background: #fff3d6; }
}
.npa-para mark, .npa-para--hit mark { background: #ffe08a; padding: 0 1px; border-radius: 2px; }
.npa-related { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.npa-related li { display: flex; align-items: baseline; gap: 8px; }
.npa-rel__kind { flex: 0 0 auto; color: #71829a; font-size: 12px; }
.npa-rel__link { border: 0; background: transparent; padding: 0; text-align: left; color: var(--primary, #4032fe); font: inherit; font-weight: 600; cursor: pointer; }
.npa-rel__link:hover { text-decoration: underline; }

/* Число совпадений запроса в тексте документа (карточка результата поиска) */
.result-hits {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 3px 10px;
  border: 1px solid #cdd3f2;
  border-radius: 20px;
  background: #eef1ff;
  color: #4032fe;
  font-size: 13px;
  font-weight: 700;
}
