/* Внутренние страницы: «Документы» и «О платформе». Токены — в styles.css */

.doc-container { width: min(1040px, 100% - var(--gutter) * 2); margin-inline: auto; }

/* Шапка */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid #E3EAE8; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.topbar__logo img { width: 158px; height: 40px; }
.topbar__back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-600); padding: 8px 0; transition: color .2s; }
.topbar__back svg { transition: transform .2s var(--ease); }
.topbar__back:hover { color: var(--ink-900); }
.topbar__back:hover svg { transform: translateX(-3px); }

/* Шапка документа */
.doc-hero { position: relative; isolation: isolate; padding: 64px 0 56px; background:
  radial-gradient(circle 620px at -6% -20%, rgba(var(--orb-warm), .55) 0%, rgba(var(--orb-warm), .25) 45%, rgba(var(--orb-warm), 0) 100%),
  radial-gradient(circle 560px at 104% 110%, rgba(var(--orb-teal), .6) 0%, rgba(var(--orb-teal), .28) 45%, rgba(var(--orb-teal), 0) 100%),
  #fff; }
.doc-hero .kicker { margin-bottom: 12px; }
.doc-hero__title { font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -0.015em; }
.doc-hero__lead { margin-top: 12px; max-width: 840px; font-size: 18px; line-height: 28px; color: var(--ink-600); }
.doc-hero__meta { margin-top: 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: #7E8D8B; white-space: pre-wrap; }
.doc-tabs { margin-top: 32px; }
.doc-tabs__track { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-tab {
  flex: none; padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, .8); border: 1px solid #E6DAD3;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-600);
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.doc-tab:hover { background: #fff; border-color: #D9C6BB; color: var(--ink-900); box-shadow: 0 6px 16px -12px rgba(19, 36, 35, .4); }
.doc-tab.is-active { background: var(--clay-600); border-color: var(--clay-600); color: #fff; box-shadow: 0 8px 18px -10px rgba(178, 87, 58, .7); }

/* Тело */
.doc-body { padding: 56px 0 96px; background: var(--white); }
.doc-layout { display: block; }
.doc-layout--toc { display: grid; grid-template-columns: 300px minmax(0, 676px); justify-content: space-between; gap: 64px; align-items: start; }

/* Содержание */
.toc { position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow: auto; border-radius: var(--r-20); scrollbar-width: thin; }
.toc__box { background: var(--mist-50); border-radius: var(--r-20); padding: 24px; }
.toc__title { list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #7E8D8B; cursor: default; }
.toc__title::-webkit-details-marker { display: none; }
.toc__title svg { display: none; transition: transform .25s var(--ease); }
.toc__list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.toc__list a { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-600); transition: color .2s; }
.toc__list a span:first-child { color: #A3AFAD; transition: color .2s; }
.toc__list a:hover { color: var(--ink-900); }
.toc__list a.is-active, .toc__list a.is-active span:first-child { color: var(--clay-700); }

/* Текст документа */
.doc-text { min-width: 0; font-size: 16px; line-height: 24px; color: var(--ink-600); }
.doc-text p { margin-bottom: 10px; }
.doc-text p:last-child { margin-bottom: 0; }
.doc-text b { color: var(--ink-900); }
.doc-text a { color: var(--brand-700); text-decoration: underline; text-decoration-color: rgba(29, 127, 132, .35); text-underline-offset: 3px; overflow-wrap: anywhere; }
.doc-text a:hover { text-decoration-color: currentColor; }
.doc-text a.btn { color: #fff; text-decoration: none; }
.doc-section { scroll-margin-top: 104px; }
.doc-section + .doc-section { margin-top: 40px; }
.doc-h { font-size: 22px; line-height: 30px; font-weight: 600; color: var(--ink-900); margin-bottom: 12px; }
.doc-sub { font-size: 18px; line-height: 26px; font-weight: 600; color: var(--ink-900); margin: 28px 0 12px; }
.doc-intro { font-size: 18px; line-height: 28px; }

.doc-text ul, .doc-text ol { margin: 4px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.bullets > li { position: relative; padding-left: 22px; }
.bullets > li::before { content: ""; position: absolute; left: 6px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-400); }
.numbers { counter-reset: n; }
.numbers > li { position: relative; padding-left: 34px; counter-increment: n; }
.numbers > li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--mist-50); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; line-height: 1; font-weight: 600; color: var(--ink-900); }
.doc-text .sub { margin: 8px 0 2px; gap: 6px; }
.sub > li { position: relative; padding-left: 18px; }
.sub > li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 1.5px; background: var(--ink-400); }
.checks > li { display: flex; gap: 12px; align-items: flex-start; }
.ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); }

/* «О платформе»: крупный текст в одну колонку 720 */
.doc-text--about { max-width: 720px; font-size: 18px; line-height: 28px; }
.doc-text--about .doc-section + .doc-section, .doc-text--about .doc-intro + .doc-section { margin-top: 40px; }
.doc-text--about .doc-h { margin-bottom: 16px; }
.doc-text--about p { margin-bottom: 16px; }
.doc-text--about .numbers > li::before { top: 2px; }
.doc-text--about .bullets > li::before { top: 12px; }
.doc-text--about .checks > li { align-items: center; }

/* Исполнителям — карточки */
.doc-text .cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 8px; }
.cards > li { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--r-20); border: 1px solid var(--line); background: var(--white); color: var(--ink-900); font-size: 17px; line-height: 26px; font-weight: 500; transition: box-shadow .3s, transform .3s var(--ease), border-color .3s; }
.cards > li:hover { border-color: #C9D9D7; box-shadow: 0 18px 36px -26px rgba(19, 36, 35, .4); transform: translateY(-2px); }
.cards .ic { width: 40px; height: 40px; }

/* О нас — подпись */
.sign { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding: 20px 24px; border-radius: var(--r-20); background: var(--mist-50); }
.sign__avatar { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-weight: 600; font-size: 18px; }
.sign p { margin: 0 !important; display: flex; flex-direction: column; font-size: 15px; line-height: 22px; }
.sign b { font-size: 17px; line-height: 24px; }

/* Частые вопросы — пустое состояние */
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 40px; border-radius: var(--r-24); background: radial-gradient(circle 420px at 0 0, rgba(var(--orb-warm), .5), rgba(var(--orb-warm), 0) 100%), radial-gradient(circle 380px at 100% 100%, rgba(var(--orb-teal), .55), rgba(var(--orb-teal), 0) 100%), #fff; border: 1px solid var(--line); }
.empty__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #fff; color: var(--brand-700); box-shadow: 0 10px 24px -16px rgba(19, 36, 35, .35); margin-bottom: 8px; }
.empty__title { font-size: 24px; line-height: 32px; font-weight: 600; color: var(--ink-900); margin: 0 !important; }
.empty__text { margin: 0 0 12px !important; }

/* Прайс-лист */
.doc-page--wide .doc-text { max-width: none; }
.price-search { position: relative; max-width: 420px; margin-bottom: 20px; }
.price-search input {
  width: 100%; height: 52px; padding: 0 20px 0 48px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font: inherit; font-size: 15px; color: var(--ink-900); outline: none; transition: border-color .2s, box-shadow .2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2393A2A0' stroke-width='1.75' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='m14 14 3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 18px center;
}
.price-search input:focus { border-color: var(--brand-700); box-shadow: 0 0 0 4px rgba(29, 127, 132, .12); }
.price-table-wrap { border: 1px solid var(--line); border-radius: var(--r-20); overflow: hidden; }
.price-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; }
.price-table thead th { background: var(--mist-50); text-align: left; font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #7E8D8B; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.price-table td, .price-table tbody th { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.price-table tbody th { text-align: left; font-weight: 500; color: var(--ink-900); }
.price-table td { white-space: nowrap; font-weight: 600; color: var(--ink-900); width: 1%; }
.price-table tbody tr { transition: background .2s; }
.price-table tbody tr:hover { background: #FBFCFC; }
.price-table thead th:not(:first-child) { white-space: nowrap; }
.price-empty { padding: 24px 20px; text-align: center; }

/* Кнопка «Наверх» */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--ink-900); box-shadow: 0 12px 28px -14px rgba(19, 36, 35, .45); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s var(--ease), background .2s; }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top:hover { background: var(--ink-900); color: #fff; }

/* ===== Адаптив ===== */
@media (max-width: 1100px) {
  .doc-layout--toc { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 860px) {
  .doc-layout--toc { display: flex; flex-direction: column; gap: 24px; }
  .toc { position: static; max-height: none; overflow: visible; width: 100%; }
  .toc__box { padding: 0; background: var(--mist-50); }
  .toc__title { padding: 16px 20px; cursor: pointer; font-size: 13px; color: var(--ink-900); letter-spacing: .06em; }
  .toc__title svg { display: block; color: var(--ink-600); }
  .toc__box[open] .toc__title svg { transform: rotate(180deg); }
  .toc__list { margin: 0; padding: 0 20px 20px; }
}

@media (max-width: 760px) {
  .topbar__inner { height: 64px; }
  .topbar__logo img { width: 134px; height: 34px; }
  .doc-hero { padding: 32px 0 28px; }
  .doc-hero__title { font-size: 30px; line-height: 38px; }
  .doc-hero__lead { font-size: 16px; line-height: 26px; }
  .doc-tabs { margin-top: 24px; }
  .doc-tabs__track { gap: 6px; }
  .doc-tab { padding: 8px 14px; font-size: 13px; line-height: 18px; }
  .doc-body { padding: 28px 0 64px; }
  .doc-section { scroll-margin-top: 80px; }
  .doc-section + .doc-section { margin-top: 32px; }
  .doc-h { font-size: 20px; line-height: 28px; }
  .doc-text { font-size: 15px; line-height: 24px; }
  .doc-text--about { font-size: 16px; line-height: 26px; }
  .doc-intro { font-size: 16px; line-height: 26px; }
  .doc-text .cards { grid-template-columns: 1fr; gap: 12px; }
  .cards > li { flex-direction: row; align-items: center; padding: 16px; font-size: 15px; line-height: 22px; gap: 14px; }
  .cards .ic { width: 36px; height: 36px; }
  .empty { padding: 28px 22px; }
  .empty .btn { width: 100%; }
  .price-search { max-width: none; }
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table th, .price-table td { display: block; width: auto; }
  .price-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .price-table tbody tr:last-child { border-bottom: 0; }
  .price-table tbody th { grid-column: 1 / -1; padding: 0; border: 0; font-size: 15px; }
  .price-table td { padding: 0; border: 0; font-size: 15px; }
  .price-table td::before { content: attr(data-label); display: block; font-size: 12px; line-height: 16px; font-weight: 500; color: #7E8D8B; }
  .to-top { right: 16px; bottom: 16px; }
}

@media print {
  .topbar, .doc-tabs, .toc, .footer, .to-top, .skip-link, .price-search { display: none !important; }
  .doc-hero { background: none; padding: 0 0 16px; }
  .doc-body { padding: 0; }
  .doc-layout--toc { display: block; }
  .doc-text { color: #000; }
}
