/* Блог: список и статья. Использует токены и компоненты style.css */

.nav-links a.cur {
  color: #fff;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 3px;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ac), var(--ac-2));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---- верх списка ---- */
.bl-hero {
  padding: 150px 0 0;
  text-align: center;
}
.bl-hero .h2 {
  max-width: 820px;
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}
.bl-lead {
  max-width: 540px;
  margin: 20px auto 0;
  color: var(--gray);
  font-size: 19px;
}
.filters {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 40px;
  padding: 5px;
  border-radius: 16px;
  background: var(--card);
}
.filters button {
  padding: 9px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--gray);
  font: 600 15px var(--font);
  cursor: pointer;
  transition:
    background-color 0.25s,
    color 0.25s;
}
.filters button:hover {
  color: var(--ink);
}
.filters button.on {
  background: var(--bg);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.bl-main {
  padding-top: 64px;
}
.draft {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding: 16px 20px;
  border: 1px solid color-mix(in srgb, var(--ac) 30%, transparent);
  border-radius: 16px;
  background: var(--ac-soft);
  color: var(--ink);
  font-size: 15px;
}
.draft[hidden] {
  display: none;
}
.draft button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.draft button:hover {
  background: color-mix(in srgb, var(--ac) 16%, transparent);
}
.draft button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.draft code {
  padding: 1px 7px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--ac) 16%, transparent);
  font: 500 14px ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* ---- обложка ---- */
.cover {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 80% at 15% 10%, #cfcaff, transparent 70%),
    radial-gradient(ellipse 70% 80% at 92% 100%, #d9e4ff, transparent 70%), #ebe9ff;
}
.cover.v2 {
  background:
    radial-gradient(ellipse 70% 80% at 85% 5%, #c9d3ff, transparent 70%),
    radial-gradient(ellipse 70% 80% at 5% 100%, #dcd5ff, transparent 70%), #e9ecff;
}
.cover.v3 {
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, #dcd7ff, transparent 70%),
    radial-gradient(ellipse 80% 70% at 50% 110%, #c7c9f5, transparent 70%), #efeefb;
}
:root[data-theme="dark"] .cover {
  background:
    radial-gradient(ellipse 70% 80% at 15% 10%, rgba(122, 114, 240, 0.42), transparent 70%),
    radial-gradient(ellipse 70% 80% at 92% 100%, rgba(70, 110, 220, 0.3), transparent 70%), #15142b;
}
:root[data-theme="dark"] .cover.v2 {
  background:
    radial-gradient(ellipse 70% 80% at 85% 5%, rgba(80, 100, 230, 0.4), transparent 70%),
    radial-gradient(ellipse 70% 80% at 5% 100%, rgba(122, 114, 240, 0.3), transparent 70%), #13132a;
}
:root[data-theme="dark"] .cover.v3 {
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(122, 114, 240, 0.38), transparent 70%),
    radial-gradient(ellipse 80% 70% at 50% 110%, rgba(90, 90, 200, 0.3), transparent 70%), #16162c;
}
.cover::before,
.cover::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid color-mix(in srgb, var(--ac) 28%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.9s var(--out),
    height 0.9s var(--out),
    opacity 0.6s;
}
.cover::before {
  width: 52%;
  aspect-ratio: 1;
}
.cover::after {
  width: 80%;
  aspect-ratio: 1;
  opacity: 0.6;
}
.cover .ctile {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: var(--bg);
  color: var(--ac);
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
:root[data-theme="dark"] .cover .ctile {
  background: #202026;
  color: #a9a4ff;
}
.cover .ctile .ic {
  width: 36px;
  height: 36px;
}
.cover .cat-tag {
  position: absolute;
  z-index: 2;
  left: 16px;
  top: 16px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

/* ---- главная статья ---- */
.hpost {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 44px;
  align-items: center;
  margin-bottom: 64px;
}
.hpost .cover {
  aspect-ratio: 16 / 11;
  border-radius: 28px;
}
.hpost .ctile {
  width: 96px;
  height: 96px;
  border-radius: 28px;
}
.hpost .ctile .ic {
  width: 44px;
  height: 44px;
}
.pmeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--gray);
  font-size: 15px;
}
.pmeta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray);
}
.hpost h2 {
  margin-top: 16px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
  transition: color 0.25s;
}
.hpost p.ex {
  margin-top: 14px;
  color: var(--gray);
  font-size: 18px;
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--ac);
  font-size: 16px;
  font-weight: 600;
}
.more svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--out);
}
a.post:hover .more svg {
  transform: translateX(5px);
}
a.post:hover .cover .ctile {
  transform: scale(1.14) rotate(-5deg);
}
a.post:hover .cover::before {
  width: 62%;
}
a.post:hover .cover::after {
  width: 94%;
  opacity: 0.3;
}
a.post:hover h2,
a.post:hover h3 {
  color: var(--ac);
}

/* ---- сетка ---- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 24px;
}
.pcard {
  display: block;
}
.pcard[hidden],
.hpost[hidden] {
  display: none;
}
.pcard h3 {
  margin-top: 18px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.03em;
  transition: color 0.25s;
}
.pcard p.ex {
  margin-top: 8px;
  color: var(--gray);
  font-size: 16px;
  line-height: 1.55;
}
.pcard .pmeta {
  margin-top: 14px;
}
.bl-empty {
  padding: 56px 24px;
  border-radius: 24px;
  background: var(--card);
  color: var(--gray);
  text-align: center;
}
.bl-empty[hidden] {
  display: none;
}

/* ---- блок призыва ---- */
.bl-cta {
  padding-top: 110px;
}
.cta-card {
  padding: 72px 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  text-align: center;
}
.cta-card img {
  width: 68px;
  height: 68px;
  margin: 0 auto 24px;
  border-radius: 19px;
}
.cta-card .h2 {
  max-width: 600px;
}
.cta-card p {
  margin-top: 14px;
  color: var(--gray);
  font-size: 18px;
}
.cta-card .cta {
  margin-top: 30px;
}

/* ---- статья ---- */
.ar-head {
  padding: 140px 0 0;
  text-align: center;
}
.crumbs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gray);
  font-size: 15px;
}
.crumbs a {
  transition: color 0.2s;
}
.crumbs a:hover {
  color: var(--ink);
}
.ar-head .h2 {
  max-width: 860px;
  margin-top: 22px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.07;
  letter-spacing: -0.045em;
}
.ar-head .pmeta {
  justify-content: center;
  margin-top: 22px;
}
.ar-cover {
  margin-top: 44px;
}
.ar-cover .cover {
  aspect-ratio: 21 / 9;
  border-radius: 28px;
}
.ar-cover .ctile {
  width: 104px;
  height: 104px;
  border-radius: 30px;
}
.ar-cover .ctile .ic {
  width: 48px;
  height: 48px;
}

.ar-main {
  padding-top: 64px;
}
.ar-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  justify-content: center;
  gap: 64px;
  align-items: start;
}
.ar-toc {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-h {
  margin: 0 0 10px 14px;
  color: var(--gray);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ar-toc a {
  padding: 8px 14px;
  border-radius: 12px;
  color: var(--gray);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  transition:
    color 0.2s,
    background-color 0.2s;
}
.ar-toc a:hover,
.ar-toc a.on {
  background: var(--card);
  color: var(--ink);
}

.prose {
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.75;
}
.prose > * + * {
  margin-top: 20px;
}
.prose h2 {
  margin-top: 48px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.04em;
  scroll-margin-top: 100px;
}
.prose ul,
.prose ol {
  display: grid;
  gap: 10px;
  list-style: none;
  counter-reset: n;
}
.prose li {
  position: relative;
  padding-left: 30px;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.75em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ac);
}
.prose ol li {
  counter-increment: n;
}
.prose ol li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--ac-soft);
  color: var(--ac);
  font-size: 14px;
  font-weight: 700;
}
.prose .tip,
.prose blockquote {
  margin-inline: 0;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--ac-soft);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
}
.prose blockquote {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 56px;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--card);
}
.share span {
  color: var(--ink-2);
  font-size: 16px;
  font-weight: 600;
}
.share div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related {
  padding-top: 110px;
}
.related .h2 {
  margin-bottom: 44px;
}

.notfound {
  padding: 200px 0 100px;
  text-align: center;
}
.notfound p {
  margin: 14px 0 28px;
  color: var(--gray);
  font-size: 18px;
}

@media (max-width: 960px) {
  .hpost {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .pgrid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ar-layout {
    grid-template-columns: minmax(0, 720px);
  }
  .ar-toc {
    display: none;
  }
}
@media (max-width: 640px) {
  .bl-hero {
    padding-top: 118px;
  }
  .bl-lead {
    font-size: 17px;
  }
  .pgrid {
    grid-template-columns: 1fr;
  }
  .ar-head {
    padding-top: 118px;
  }
  .ar-cover .cover {
    aspect-ratio: 16 / 10;
  }
  .prose {
    font-size: 17px;
  }
  .prose h2 {
    font-size: 24px;
  }
  .cta-card {
    padding: 48px 20px;
  }
}
@media print {
  .nav,
  .progress,
  .ar-toc,
  .share,
  .related,
  .bl-cta,
  .foot,
  .totop,
  .ck {
    display: none !important;
  }
}
