/* НайсСофт: фирменный слой поверх локального Bootstrap 5.3.8. */
:root {
  --bs-primary: #aa2d28;
  --bs-primary-rgb: 170, 45, 40;
  --bs-link-color: #9d2b26;
  --bs-link-hover-color: #75201c;
  --bs-body-color: #17191c;
  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --bs-border-color: #dce0e2;
  --bs-border-radius: .25rem;
  --bs-focus-ring-color: rgba(170, 45, 40, .28);
}

body { font-family: var(--bs-body-font-family); -webkit-font-smoothing: antialiased; }
.wrap.container-xxl { padding-inline: 0; }
.header { --bs-navbar-padding-y: 0; box-shadow: 0 1px 0 rgba(18, 27, 33, .025); }
.header-inner { gap: clamp(1rem, 2.2vw, 2.5rem); }
.header .navbar-brand { margin-right: 0; color: var(--ink); }
.header .navbar-brand:hover, .header .navbar-brand:focus { color: var(--ink); }
.brand-mark { border-radius: 2px; }
.header nav.navbar-collapse { flex-grow: 0; align-items: center; }
.header nav .nav-link { color: #343b42; padding: .55rem 0; border-bottom: 2px solid transparent; transition: color .18s, border-color .18s; }
.header nav .nav-link:hover { color: var(--red); }
.header nav .nav-link[aria-current="page"], .header nav .nav-link[data-section-current="true"] { border-bottom-color: var(--red); color: var(--ink); font-weight: 650; }
.header-contact { font-weight: 600; }
.menu-toggle.navbar-toggler { border-radius: 3px; color: var(--ink); border-color: var(--line); box-shadow: none; }
.menu-toggle.navbar-toggler:focus-visible { outline: 3px solid #df7669; outline-offset: 2px; }

.button.btn.btn-primary {
  --bs-btn-bg: #ad2d28;
  --bs-btn-border-color: #ad2d28;
  --bs-btn-hover-bg: #91231f;
  --bs-btn-hover-border-color: #91231f;
  --bs-btn-active-bg: #7d1b18;
  --bs-btn-active-border-color: #7d1b18;
  --bs-btn-focus-shadow-rgb: 173, 45, 40;
  border-radius: 3px;
  min-height: 52px;
  line-height: 1.35;
  text-align: left;
  letter-spacing: .005em;
  box-shadow: none;
}
.button.btn.btn-primary:hover { transform: translateY(-1px); }
.button.btn.btn-primary:focus-visible { outline: 3px solid #df7669; outline-offset: 3px; }

.hero, .article-hero { background: linear-gradient(135deg, #17191c 0%, #20262b 100%); }
.article-lead, .hero-lead { line-height: 1.7; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  align-items: center;
  gap: clamp(32px, 5vw, 84px);
  padding: clamp(44px, 5vw, 78px) 0 clamp(44px, 5vw, 68px);
}
.hero-grid > * { min-width: 0; }
.hero-copy h1 { font-size: clamp(3.25rem, 5.15vw, 5.65rem); line-height: 1.045; letter-spacing: -.055em; max-width: 760px; }
.hero-copy .hero-lead { max-width: 610px; font-size: clamp(1.05rem, 1.45vw, 1.21rem); }
.hero-grid .architecture { width: 100%; max-width: 510px; margin: 0; justify-self: end; }
.hero-grid .hero-actions { flex-wrap: wrap; }
.reading-grid.row { display: flex; gap: 0; margin-top: 28px; }
.reading-grid.row > .col { display: flex; min-width: 0; }
.reading-grid.row .reading-card { width: 100%; }
.reading-grid.row .reading-card h3 { min-height: 2.6em; }
.breadcrumbs { align-items: center; }
.reading-card { border-radius: 3px; transition: border-color .18s, box-shadow .18s, transform .18s; }
.reading-card:hover { box-shadow: 0 12px 30px rgba(22, 30, 38, .075); transform: translateY(-2px); }
.process-figure, .editorial-photo { border-radius: 3px; overflow: hidden; }
.prose-section { scroll-margin-top: 105px; }
.toc nav a:focus-visible, .header nav a:focus-visible { outline-offset: 2px; }
.footer-links a:hover, .footer-bottom a:hover { color: var(--bright); }

@media (max-width: 1199.98px) {
  .header-inner { height: 72px; }
  .menu-toggle.navbar-toggler { display: inline-flex; align-items: center; gap: 14px; margin-left: auto; padding: 9px 14px; background: #fff; }
  .menu-toggle span { font-size: 1.2rem; line-height: 1; }
  .header nav.navbar-collapse { position: absolute; top: 72px; left: 0; right: 0; z-index: 21; background: #fff; padding: 14px max(20px, calc((100vw - 1280px) / 2)) 18px; border-bottom: 1px solid var(--line); box-shadow: 0 16px 28px rgba(22, 30, 38, .12); max-height: calc(100dvh - 72px); overflow-y: auto; }
  .header nav.collapse:not(.show) { display: none; }
  .header nav.show, .header nav.collapsing { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .header nav .nav-link { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .header nav .nav-link[aria-current="page"], .header nav .nav-link[data-section-current="true"] { border-bottom-color: var(--line); border-left: 3px solid var(--red); padding-left: 13px; }
}
@media (max-width: 991.98px) {
  .hero-grid { grid-template-columns: 1fr; gap: 38px; padding: 38px 0 42px; }
  .hero-grid .architecture { max-width: 680px; justify-self: start; }
}
@media (max-width: 800px) {
  .button.btn.btn-primary { width: auto; max-width: 100%; }
}
@media (max-width: 575.98px) {
  .hero-copy h1 { font-size: clamp(2.65rem, 11vw, 4rem); }
  .hero-grid .hero-actions { align-items: stretch; gap: 15px; }
  .hero-grid .button.btn.btn-primary { width: 100%; }
  .hero-grid .architecture { padding-top: 4px; }
  .reading-grid.row .reading-card h3 { min-height: 0; }
  .header .brand { font-size: .98rem; }
  .header .brand-mark { width: 37px; height: 37px; }
}

@media (prefers-reduced-motion: reduce) {
  .button.btn.btn-primary, .reading-card, .header nav a { transition: none; }
  .button.btn.btn-primary:hover, .reading-card:hover { transform: none; }
}

/* Единая редакционная система для главной и всех внутренних страниц. */
:root {
  --ink: #192026;
  --red: #a82f2a;
  --bright: #f07869;
  --line: #dce1e4;
  --subtle: #f5f6f5;
  --paper: #fff;
}
html { scroll-behavior: smooth; }
body { color: var(--ink); background: #fff; }
main, .wrap, .prose, .prose-section { min-width: 0; }
img, svg, iframe { max-width: 100%; }
p, li, h1, h2, h3, figcaption, a { overflow-wrap: break-word; }
h1, h2, h3 { letter-spacing: -.025em; }
a { text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #df7669;
  outline-offset: 3px;
}
.wrap.container-xxl { max-width: 1280px; }
.header { background: rgba(255,255,255,.98); box-shadow: 0 5px 24px rgba(17,25,32,.04); }
.header-inner { min-width: 0; }
.brand, .brand-product { letter-spacing: -.01em; }
.brand-mark { box-shadow: 0 3px 10px rgba(125, 32, 28, .13); }
.header nav .nav-link { font-weight: 540; }
.hero, .article-hero {
  background-color: #192026;
  background-image: radial-gradient(circle at 86% 9%, rgba(92,105,108,.2), transparent 42%),
                    linear-gradient(125deg, #192026 0%, #222a2f 100%);
}
.hero { padding-top: clamp(34px, 4vw, 58px); }
.hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); }
.hero-lead, .article-lead { color: #d3d8da; }
.architecture figcaption { flex-wrap: wrap; }
.boundary { border-color: #728087; background: rgba(19,26,30,.52); }
.diagram-studio { box-shadow: 0 18px 50px rgba(0,0,0,.13); }
.hero-bottom { padding-block: 24px 28px; }
.hero-bottom p { max-width: 820px; margin: 0; line-height: 1.6; }
.section { padding-block: clamp(64px, 7vw, 106px); }
.section-heading { column-gap: clamp(36px, 6vw, 92px); }
.section-heading h2 { max-width: 820px; }
.section-number, .article-index { letter-spacing: .1em; }
.evidence-grid { gap: clamp(20px, 3vw, 42px); }
.evidence-card { padding-top: 26px; }
.evidence-card .evidence-response { line-height: 1.5; }
.photo-interlude { background: #20292e; }
.photo-interlude-inner img { max-height: 520px; }
.release-teaser, .related-section { border-block: 1px solid var(--line); }
.reading-card {
  min-width: 0;
  padding: clamp(23px, 2.5vw, 32px);
  border-color: #dce1e4;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17,25,32,.025);
}
.reading-card h3 { line-height: 1.22; }
.reading-card p { line-height: 1.62; }
.reading-card .card-link { border-top: 1px solid #e6e9e9; padding-top: 15px; }
.reading-grid.row .reading-card h3 { min-height: 0; }
.privacy-grid article { min-width: 0; }
.privacy-grid article > p { min-height: 0; }
.integration-row > * { min-width: 0; }
.article-hero { padding: 28px 0 clamp(56px, 6vw, 88px); }
.article-hero h1 { max-width: 1080px; line-height: 1.12; letter-spacing: -.045em; }
.article-hero .breadcrumbs { margin-bottom: clamp(34px, 4vw, 58px); }
.article-lead { max-width: 850px; font-size: clamp(1.08rem, 1.7vw, 1.27rem); }
.article-layout {
  grid-template-columns: minmax(200px, 240px) minmax(0, 790px);
  gap: clamp(42px, 6vw, 90px);
  padding-block: clamp(54px, 6vw, 92px);
}
.article-wide.article-layout { display: block; }
.toc {
  top: 112px;
  padding: 20px 18px 22px;
  border: 1px solid var(--line);
  background: #fbfcfb;
}
.toc nav { max-height: min(67vh, 620px); overflow-y: auto; }
.toc nav a { transition: color .16s, background .16s; }
.toc nav a:hover { background: #f0f2f1; }
.article-wide .toc {
  padding: 20px 0 30px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.article-wide .toc nav { max-height: none; overflow: visible; }
.prose-section { margin-bottom: clamp(48px, 5vw, 74px); padding-bottom: clamp(46px, 5vw, 70px); }
.prose h2 { line-height: 1.2; }
.prose p { max-width: 75ch; }
.prose li { max-width: 80ch; }
.prose blockquote {
  padding: 20px 26px;
  background: #f7f8f7;
  border-left-width: 4px;
}
.prose .outcome {
  max-width: 800px;
  padding: 22px 26px;
  background: #f5f6f5;
  border-left-width: 4px;
}
.prose .outcome > b { font-size: .8rem; text-transform: uppercase; }
.process-figure, .editorial-photo {
  border-color: var(--line);
  box-shadow: 0 8px 30px rgba(18,27,33,.06);
}
.process-figure img { object-fit: contain; background: #f7f8f8; }
.editorial-photo img { max-height: none; aspect-ratio: 16 / 9; object-fit: cover; }
.process-figure figcaption, .editorial-photo figcaption { background: #fff; padding: 15px 20px; }
.comparison-scroll, .access-table { box-shadow: 0 8px 25px rgba(18,27,33,.04); }
.comparison-scroll:focus-visible { outline-offset: 3px; }
.comparison-matrix td, .comparison-matrix th { overflow-wrap: break-word; }
.action-disclosure summary { min-height: 62px; line-height: 1.45; }
.action-disclosure[open] summary { color: var(--red); }
.source-scope { background: #fbfcfb; }
.agent-workspace { box-shadow: 0 12px 35px rgba(18,27,33,.06); }
.legal-block { border-left-width: 4px; }
.contact-section { border-top: 1px solid var(--line); background: #f7f8f7; }
.contact-grid { gap: clamp(35px, 6vw, 90px); }
.contact-copy { padding-top: 0; }
footer { background: #fff; }
.footer-links { gap: clamp(26px, 3vw, 44px); }
.footer-links a { line-height: 1.5; }

@media (max-width: 1199.98px) {
  .header nav.navbar-collapse { padding-inline: 32px; }
}
@media (max-width: 1099.98px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-grid .architecture { justify-self: start; }
  .hero-copy h1 { max-width: 810px; }
}
@media (max-width: 991.98px) {
  .article-layout { grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 800px) {
  .header nav.navbar-collapse { padding-inline: 20px; }
  .article-layout { grid-template-columns: 1fr; padding-top: 44px; }
  .toc { position: static; padding: 18px; }
  .toc nav { max-height: none; }
  .section-heading { gap: 16px; }
  .editorial-photo img { aspect-ratio: auto; }
  .contact-grid { gap: 24px; }
}
@media (max-width: 575.98px) {
  .hero-grid { gap: 24px; padding-block: 34px; }
  .hero-copy h1 { font-size: clamp(2.6rem, 11.5vw, 3.6rem); }
  .hero-grid .architecture { max-width: 100%; }
  .boundary { padding: 0 16px 20px; }
  .boundary-title { margin-inline: -16px; padding-inline: 16px; }
  .hero-bottom { gap: 12px; }
  .article-hero { padding-bottom: 54px; }
  .article-hero h1 { font-size: clamp(2.25rem, 10vw, 3.1rem); }
  .reading-card { padding: 23px; }
  .prose blockquote { padding: 17px 19px; }
  .prose .outcome { padding: 19px; }
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 390px) {
  .hero-copy h1 { font-size: 2.45rem; }
  .brand { font-size: .91rem; }
  .header .brand-mark { width: 33px; height: 33px; }
  .menu-toggle.navbar-toggler { padding: 8px; }
  .footer-links { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toc nav a { transition: none; }
}

/* Открытый центр документов: без регистрации и внешних ресурсов. */
.documentation-home { background: #f5f6f5; border-top: 1px solid var(--line); }
.doc-home-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 32px; }
.doc-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding: 28px; margin: 0 0 30px; background: #20292e; color: #fff;
}
.doc-banner > div { min-width: 0; }
.doc-banner b { font-size: 1.15rem; font-weight: 650; }
.prose .doc-banner p { color: #d4dcdf; font-size: .96rem; line-height: 1.6; margin: 10px 0 0; max-width: 650px; }
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 28px 0 12px; }
.doc-card {
  display: flex; flex-direction: column; min-width: 0; padding: 25px;
  border: 1px solid #d9e0e3; background: #fff; scroll-margin-top: 110px;
}
.doc-card-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; color: #5a666d; font-size: .8rem; }
.doc-card-meta > span:first-child { color: #a82f2a; font-weight: 700; letter-spacing: .08em; }
.prose .doc-card h3 { margin: 0 0 15px; font-size: 1.25rem; line-height: 1.3; }
.prose .doc-card p { font-size: .95rem; line-height: 1.65; margin: 0 0 15px; color: #46535c; }
.prose .doc-card .doc-audience { font-size: .85rem; color: #626f76; }
.prose .doc-details { margin: 0 0 22px; padding: 14px 0; border-top: 1px solid #e2e7e8; border-bottom: 1px solid #e2e7e8; }
.doc-details summary { font-size: .88rem; line-height: 1.5; font-weight: 600; cursor: pointer; }
.prose .doc-details ul { padding-left: 19px; margin-block: 14px; }
.prose .doc-details li { font-size: .88rem; line-height: 1.6; margin-block: 8px; }
.prose .doc-card .doc-code { font-size: .82rem; color: #5a666d; }
.prose .doc-card .doc-checksum { margin: 0; font-size: .75rem; }
.doc-checksum b { display: block; margin-bottom: 8px; }
.doc-checksum code { display: block; color: #5b666e; overflow-wrap: anywhere; word-break: break-all; line-height: 1.55; }
.doc-card-actions { display: flex; flex-wrap: wrap; gap: 15px 24px; margin-top: auto; align-items: center; }
.prose .doc-card a.doc-open { font-size: .9rem; text-decoration: none; font-weight: 650; }
.prose .doc-card a.doc-open:hover { text-decoration: underline; }
.doc-download { display: inline-flex; justify-content: center; align-items: center; padding: 10px 15px; border: 1px solid #d3dade; font-size: .87rem; font-weight: 600; background: #f7f8f7; }
.prose .doc-card a.doc-download { color: #25333b; text-decoration: none; }
.prose .doc-card a.doc-download:hover { border-color: #a82f2a; }
.prose .doc-banner a.doc-download { color: #fff; background: #a82f2a; border-color: #a82f2a; text-decoration: none; flex-shrink: 0; }
.prose .doc-banner a.doc-download:hover { background: #8c2622; }
.doc-route-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.prose .doc-route-grid a.doc-route {
  color: #192026; text-decoration: none; padding: 27px; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 15px; background: #fff;
}
.doc-route:hover { border-color: #a82f2a; box-shadow: 0 8px 25px rgba(18,27,33,.05); }
.doc-route .section-number { color: #a82f2a; font-size: .68rem; }
.prose .doc-route h3 { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.prose .doc-route p { margin: 0; font-size: .96rem; line-height: 1.6; }
.doc-route > span:last-child { margin-top: auto; padding-top: 8px; color: #a82f2a; font-size: .85rem; }
.doc-table-scroll { overflow-x: auto; max-width: 100%; margin: 25px 0; border: 1px solid #d5dfe2; scrollbar-color: #7a858c #edf0f1; }
.doc-table { width: 100%; min-width: 590px; border-collapse: collapse; font-size: .95rem; line-height: 1.65; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 17px 20px; border-bottom: 1px solid #dce3e5; }
.doc-table thead th { color: #fff; background: #20292e; font-weight: 600; font-size: .85rem; }
.doc-table tbody th { width: 28%; font-weight: 600; background: #f7f8f7; }
.doc-table tbody tr:last-child > * { border-bottom: 0; }
.doc-formula { padding: 23px 26px; margin: 26px 0; background: #f5f6f5; border-left: 3px solid #a82f2a; }
.doc-formula b { display: block; font-size: .8rem; color: #a82f2a; letter-spacing: .03em; }
.prose .doc-formula p { color: #192026; font-size: clamp(1.4rem, 2.5vw, 2rem); margin: 14px 0; letter-spacing: -.02em; }
.doc-formula span { font-size: .9rem; line-height: 1.7; color: #52616a; display: block; }
@media (min-width: 1100px) { .article-wide .doc-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 991.98px) {
  .doc-grid { grid-template-columns: 1fr; }
  .article-wide .doc-grid, .doc-route-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .doc-banner { flex-direction: column; align-items: flex-start; gap: 20px; }
}
@media (max-width: 575.98px) {
  .article-wide .doc-grid, .doc-route-grid { grid-template-columns: 1fr; }
  .doc-banner, .doc-card, .prose .doc-route-grid a.doc-route { padding: 22px; }
  .doc-home-links { align-items: flex-start; flex-direction: column; }
  .doc-formula { padding: 20px; }
}
