/* Общие стили служебных страниц: Документация, Стоимость */
:root {
  --milk: #f7f5f0;
  --paper: #fdfcf9;
  --ink: #1c1f23;
  --ink-2: #3a3e44;
  --muted: #747880;
  --line: #e3dfd6;
  --line-2: #d4cfc4;
  --accent: #2f5bd3;
  --accent-ink: #1f45ad;
  --accent-soft: #e8edfa;
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1240px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--milk); color: var(--ink);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* шапка */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--milk) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 30px; }
.brand span { font-weight: 600; font-size: 20px; letter-spacing: .14em; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a[aria-current] { box-shadow: inset 0 -1px 0 var(--accent); padding-bottom: 2px; }
.btn { display: inline-flex; align-items: center; gap: 12px; background: var(--ink); color: var(--paper) !important;
  text-decoration: none; font-weight: 500; font-size: 16px; padding: 14px 24px; border-radius: 999px; transition: background .25s var(--ease); }
.btn:hover { background: var(--accent); }

/* заголовок страницы */
.page-head { padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: 14px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; margin: 0 0 28px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(38px, 5.6vw, 72px); line-height: 1.04; letter-spacing: -0.035em; max-width: 18ch; }
.page-head .lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 52ch; margin: 28px 0 0; }

/* паспорт ПО */
.passport { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper); margin-top: 48px; overflow: hidden; }
.passport div { padding: 20px 24px; border-left: 1px solid var(--line); }
.passport div:first-child { border-left: 0; }
.passport dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.passport dd { margin: 0; font-weight: 500; font-size: 17px; line-height: 1.35; }

/* документ с оглавлением */
.doc { display: grid; grid-template-columns: 260px 1fr; gap: clamp(40px, 6vw, 96px); padding-top: 64px; padding-bottom: 120px; }
.toc { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 128px); overflow: auto; font-size: 14px; }
.toc p { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px 14px; border-left: 1px solid var(--line); color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--line-2); }
.toc a.active { color: var(--ink); border-left-color: var(--accent); }
.toc ol ol a { padding-left: 28px; font-size: 13px; color: var(--muted); }

.content { min-width: 0; max-width: 760px; }
.content > section { padding-bottom: 72px; margin-bottom: 72px; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.content > section:last-child { border-bottom: 0; margin-bottom: 0; }
.content h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; margin-bottom: 28px; }
.content h2 .n { color: var(--accent); font-size: .5em; vertical-align: .55em; margin-right: 12px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.content h3 { font-size: 22px; line-height: 1.25; margin: 48px 0 14px; scroll-margin-top: 96px; }
.content h4 { font-size: 17px; font-weight: 600; letter-spacing: 0; margin: 28px 0 8px; }
.content p, .content ul, .content ol { margin: 0 0 16px; color: var(--ink-2); }
.content ul, .content ol { padding-left: 22px; }
.content li { margin-bottom: 6px; }
.content li::marker { color: var(--muted); }
.content strong { color: var(--ink); font-weight: 600; }
.ui { font-weight: 500; color: var(--ink); background: var(--accent-soft); padding: 1px 7px; border-radius: 6px; font-size: .94em; white-space: nowrap; }
.path { color: var(--ink); font-weight: 500; }

.callout { background: var(--paper); border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 0 12px 12px 0;
  padding: 20px 24px; margin: 24px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout b { color: var(--ink); }

.kv { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 16px; }
.kv th, .kv td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-top: 1px solid var(--line); }
.kv th { font-weight: 500; color: var(--ink); width: 34%; }
.kv td { color: var(--ink-2); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 1px solid var(--line); }

.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 20px; }
.status-row span { font-size: 14px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--paper); }
.status-row i { color: var(--muted); font-style: normal; }

/* незаполненные данные — бросаются в глаза, чтобы не уйти в публикацию */
.todo { background: #fff3cd; color: #7a5a00; border: 1px dashed #d9b24c; padding: 1px 8px; border-radius: 6px; font-weight: 500; }

/* подвал */
.foot { background: var(--ink); color: #8a8e95; font-size: 14px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 24px; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; align-items: center; }
.foot a { color: #c9ccd1; text-decoration: none; }
.foot a:hover { color: #fff; }
.foot .links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot .brand span { color: var(--milk); font-size: 16px; }
.foot .brand svg { width: 22px; height: 22px; }

@media (max-width: 980px) {
  .nav .hide-md { display: none; }
  .doc { grid-template-columns: 1fr; padding-top: 40px; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: var(--paper); }
  .passport { grid-template-columns: 1fr 1fr; }
  .passport div:nth-child(3) { border-left: 0; }
  .passport div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .top .wrap { height: 64px; }
  .nav { gap: 18px; }
  .nav .btn { display: none; }
  .passport { grid-template-columns: 1fr; }
  .passport div { border-left: 0; border-top: 1px solid var(--line); }
  .passport div:first-child { border-top: 0; }
  .kv th, .kv td { display: block; width: 100%; padding: 0; border: 0; }
  .kv th { padding-top: 14px; border-top: 1px solid var(--line); }
  .kv td { padding: 4px 0 14px; }
  .kv tr:last-child td { border-bottom: 1px solid var(--line); }
  .kv tr:last-child th { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .top, .toc, .foot { display: none; }
  body { background: #fff; }
  .doc { display: block; padding: 0; }
  .content > section { break-inside: auto; }
}
