/* Внутренние страницы: шапка страницы, новости, загрузка, длинные тексты, 404 */

/* ---------- шапка страницы ---------- */
.page-head { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--edge-soft); }
.page-head::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 11, 24, .95) 0%, rgba(5, 11, 24, .75) 55%, rgba(5, 11, 24, .45) 100%),
    linear-gradient(180deg, rgba(5, 11, 24, .2) 0%, var(--night) 100%),
    image-set(url('../assets/bg_main.jpg') 1x, url('../assets/bg_main@2x.jpg') 2x) center 35% / cover no-repeat;
}
.page-head .wrap { padding-top: 48px; padding-bottom: 40px; }
.page-head h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem); max-width: 22ch; }
.page-head .lead { margin-top: 14px; color: #D6E2EE; font-size: var(--t-l); max-width: 60ch; }
.crumbs { margin-bottom: 14px; font-size: var(--t-s); color: var(--frost); }
.crumbs a { color: var(--frost); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
@media (min-width: 720px) { .page-head .wrap { padding-top: 72px; padding-bottom: 56px; } }

.page-body { padding-top: 48px; }
.state-msg {
  padding: 28px 24px; border: 1px dashed var(--edge); border-radius: var(--r-s);
  color: var(--frost); max-width: 60ch;
}
.state-msg strong { display: block; color: var(--text); font-size: var(--t-l); margin-bottom: 6px; }
.state-msg .btn { margin-top: 18px; }

/* ---------- список новостей ---------- */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 960px; }
.news-row {
  position: relative;
  display: grid; gap: 16px 28px;
  grid-template-columns: minmax(0, 1fr);
  padding: 24px 0;
  border-top: 1px solid var(--edge-soft);
}
.news-row:first-child { border-top: 0; padding-top: 0; }
.news-row .pic {
  aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-s);
  background: var(--glass) url('../assets/news_placeholder.jpg') center / cover;
  border: 1px solid var(--edge-soft);
}
.news-row .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-row time { color: var(--frost); font-size: var(--t-s); }
.news-row h2, .news-row h3 { font-size: var(--t-xl); margin-top: 6px; }
.news-row h2 a, .news-row h3 a { color: var(--text); text-decoration: none; }
.news-row h2 a::after, .news-row h3 a::after { content: ''; position: absolute; inset: 0; }
.news-row p { margin-top: 10px; color: var(--frost); max-width: 60ch; }
.news-row:hover :is(h2, h3) a { color: var(--ice); }
.news-row:hover .pic img { transform: scale(1.03); }
.news-row:focus-within { outline: 2px solid var(--ice); outline-offset: 6px; border-radius: 2px; }
.news-row a:focus-visible { outline: none; }
@media (min-width: 720px) {
  .news-row { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
}
.news-row.is-skeleton .pic, .news-row.is-skeleton .line {
  background: linear-gradient(100deg, var(--glass) 30%, #0D1C38 50%, var(--glass) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.news-row.is-skeleton .line { height: 14px; border-radius: 3px; margin-top: 12px; }
.news-row.is-skeleton .line.w1 { width: 30%; margin-top: 0; }
.news-row.is-skeleton .line.w2 { width: 70%; height: 22px; }
.news-row.is-skeleton .line.w3 { width: 90%; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- новость ---------- */
.article { max-width: 760px; }
.article-pic {
  margin: 0 0 32px; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--r-s); border: 1px solid var(--edge-soft); background: var(--glass);
}
.article-pic img { width: 100%; height: 100%; object-fit: cover; }
.article-text { font-size: var(--t-l); line-height: 1.7; color: #DCE6F0; }
.article-text p + p { margin-top: 1em; }
.article-back { margin-top: 40px; }
.more-news { margin-top: 72px; }
.more-news h2 { font-size: var(--t-2); margin-bottom: 8px; }

/* ---------- загрузка ---------- */
.dl-hero { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .dl-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; } }
.dl-card {
  --c: var(--cut);
  padding: 28px 26px;
  background: var(--glass-a);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  box-shadow: inset 0 0 0 1px var(--edge);
}
.dl-card .btn { width: 100%; }
.dl-file { margin-top: 16px; display: grid; gap: 4px; font-size: var(--t-s); color: var(--frost); }
.dl-file b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.dl-facts { list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--edge-soft); display: grid; gap: 10px; }
.dl-facts li { display: flex; justify-content: space-between; gap: 16px; font-size: var(--t-s); color: var(--frost); }
.dl-facts li span:last-child { color: var(--text); font-weight: 600; text-align: right; }

.section { margin-top: 80px; }
.page-body > .section:first-child { margin-top: 0; }
.section > h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); margin-bottom: 24px; }
.section > .sub { color: var(--frost); margin: -12px 0 24px; max-width: 62ch; }

/* требования: таблица в две колонки */
.req { width: 100%; max-width: 860px; border-collapse: collapse; font-size: var(--t-m); }
.req caption { text-align: left; color: var(--frost); font-size: var(--t-s); padding-bottom: 12px; }
.req th, .req td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--edge-soft); vertical-align: top; }
.req thead th { color: var(--frost); font-weight: 500; font-size: var(--t-s); border-bottom-color: var(--edge); }
.req tbody th { font-weight: 600; color: var(--text); width: 30%; }
.req td { color: #D6E2EE; }
@media (max-width: 600px) {
  .req thead { display: none; }
  .req, .req tbody, .req tr, .req th, .req td { display: block; width: 100%; }
  .req tr { padding: 14px 0; border-bottom: 1px solid var(--edge-soft); }
  .req th, .req td { border: 0; padding: 2px 0; }
  .req td::before { content: attr(data-label) ': '; color: var(--frost); }
}

/* пошаговая установка: вертикальный маршрут */
.steps { list-style: none; margin: 0; padding: 0; max-width: 760px; counter-reset: s; }
.steps li { position: relative; padding: 0 0 32px 64px; counter-increment: s; }
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font: var(--head-weight) var(--t-l)/1 var(--f-head);
  background: var(--night); border: 2px solid var(--neon); box-shadow: 0 0 0 5px rgba(30, 155, 255, .12);
}
.steps li::after {
  content: ''; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--neon), var(--deep));
}
.steps li:last-child::after { display: none; }
.steps h3 { font-size: var(--t-xl); padding-top: 8px; }
.steps p { margin-top: 8px; color: var(--frost); max-width: 60ch; }
.steps p b { color: var(--text); font-weight: 600; }

/* частые проблемы: раскрывающиеся ответы */
.faq { max-width: 860px; border-top: 1px solid var(--edge-soft); }
.faq details { border-bottom: 1px solid var(--edge-soft); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 4px; font-weight: 600; font-size: var(--t-l);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 10px; height: 10px;
  border-right: 2px solid var(--ice); border-bottom: 2px solid var(--ice);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq summary:hover { color: var(--ice); }
.faq .ans { padding: 0 4px 20px; color: #D6E2EE; max-width: 66ch; }
.faq .ans p + p, .faq .ans p + ol, .faq .ans ol + p { margin-top: 10px; }
.faq .ans ol { margin: 10px 0 0; padding-left: 22px; }
.faq .ans li + li { margin-top: 4px; }

/* ---------- длинные тексты: оглавление + текст ---------- */
.doc { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .doc { grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; } }
.toc {
  padding: 20px; background: var(--glass); border: 1px solid var(--edge-soft); border-radius: var(--r-s);
  font-size: var(--t-s);
}
@media (min-width: 960px) { .toc { position: sticky; top: 88px; max-height: calc(100vh - 112px); overflow: auto; } }
.toc h2 { font: 600 var(--t-s)/1.3 var(--f-body); color: var(--frost); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover, .toc a.active { color: var(--ice); }
.toc a.active { font-weight: 600; }

.prose { max-width: 72ch; color: #DCE6F0; }
.prose .updated { color: var(--frost); font-size: var(--t-s); margin-bottom: 24px; }
.prose .draft {
  padding: 14px 16px; margin-bottom: 32px;
  border-left: 3px solid var(--warn); background: rgba(255, 184, 77, .08); color: #FFE2B5; font-size: var(--t-s);
}
.prose h2 { font-size: var(--t-2); margin: 48px 0 16px; scroll-margin-top: 88px; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: var(--t-l); margin: 28px 0 10px; font-family: var(--f-body); font-weight: 600; letter-spacing: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 6px; }
.prose mark.fill { background: rgba(255, 184, 77, .16); color: #FFE2B5; padding: 0 4px; border-radius: 3px; }
.prose p[id] { scroll-margin-top: 88px; }
.prose .num { color: var(--ice); font-weight: 600; margin-right: 6px; font-variant-numeric: tabular-nums; }

/* ---------- 404 ---------- */
.nf { min-height: calc(100vh - 64px - 200px); display: grid; align-items: center; }
.nf .wrap { padding-top: 64px; padding-bottom: 32px; display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .nf .wrap { grid-template-columns: auto minmax(0, 1fr); gap: 72px; } }
.nf-sign {
  display: inline-grid; justify-items: center;
  padding: 18px 34px 20px;
  background: #1450B4;
  border: 3px solid #fff; border-radius: 6px;
  box-shadow: 0 0 0 4px #1450B4, 0 18px 50px rgba(0, 0, 0, .5);
  font-family: var(--f-body); font-weight: 600; color: #fff; text-align: center;
  justify-self: start;
}
.nf-sign b { font: 700 clamp(3.5rem, 2.5rem + 5vw, 6rem)/1 var(--f-head); letter-spacing: .02em; }
.nf-sign span { font-size: var(--t-l); margin-top: 4px; }
.nf h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); }
.nf p { margin-top: 14px; color: var(--frost); max-width: 52ch; font-size: var(--t-l); }
.nf-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
