:root {
  --article-ink: #17243a;
  --article-copy: #4b5a70;
  --article-muted: #718097;
  --article-line: #dfe6f0;
  --article-blue: #2f5bff;
  --article-blue-dark: #2144c7;
  --article-mint: #cfeee6;
  --article-cream: #fbf8f2;
  --article-coral: #f28b73;
  --article-surface: #ffffff;
  --article-shadow: 0 24px 70px rgba(31, 52, 91, 0.09);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #f4f7fb;
}

body.article-page {
  min-width: 320px;
  margin: 0;
  color: var(--article-ink);
  background:
    radial-gradient(circle at 8% 6%, rgba(207, 238, 230, 0.65), transparent 25rem),
    radial-gradient(circle at 92% 22%, rgba(47, 91, 255, 0.09), transparent 28rem),
    #f4f7fb;
  font: 500 17px/1.72 "Manrope", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.article-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
}

.article-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--article-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.article-brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 7px 18px rgba(47, 91, 255, 0.2);
}

.article-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(47, 91, 255, 0.22);
  border-radius: 10px;
  color: var(--article-blue-dark);
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.article-header-cta:hover {
  border-color: rgba(47, 91, 255, 0.5);
  background: #fff;
  transform: translateY(-1px);
}

.article-main {
  width: min(1120px, calc(100% - 40px));
  margin: 18px auto 80px;
}

.article-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 4px 18px;
  color: var(--article-muted);
  font-size: 13px;
  font-weight: 700;
}

.article-breadcrumbs a {
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.article-breadcrumbs a:hover { text-decoration-color: currentColor; }

.article-detail {
  overflow: hidden;
  border: 1px solid rgba(211, 221, 235, 0.9);
  border-radius: 28px;
  background: var(--article-surface);
  box-shadow: var(--article-shadow);
}

.article-hero {
  padding: clamp(28px, 5vw, 66px) clamp(24px, 6vw, 76px) 0;
  background:
    linear-gradient(135deg, rgba(244, 248, 255, 0.96), rgba(249, 252, 251, 0.96)),
    #f7f9fd;
}

.article-hero-copy {
  width: min(850px, 100%);
  margin: 0 auto clamp(28px, 4vw, 46px);
  text-align: center;
}

.article-kicker {
  margin: 0 0 12px;
  color: var(--article-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.article-hero h1,
.knowledge-hero h1 {
  margin: 0;
  font: 700 clamp(42px, 6.2vw, 76px)/0.98 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.article-lead {
  width: min(750px, 100%);
  margin: 24px auto 0;
  color: var(--article-copy);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.62;
  text-wrap: pretty;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--article-muted);
  font-size: 13px;
  font-weight: 700;
}

.article-view-count {
  white-space: nowrap;
}

.article-cover {
  position: relative;
  width: min(980px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(204, 216, 232, 0.9);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: #e9eef6;
  box-shadow: 0 -5px 35px rgba(34, 57, 99, 0.08);
}

.article-cover::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  content: "";
  pointer-events: none;
}

.article-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-content {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 88px) 0 clamp(54px, 7vw, 82px);
  counter-reset: article-section;
}

.article-content p {
  margin: 0 0 24px;
  color: var(--article-copy);
  line-height: 1.82;
  text-wrap: pretty;
}

.article-content > p:first-child {
  color: #2f3f57;
  font-size: 19px;
  line-height: 1.75;
}

.article-content h2 {
  position: relative;
  margin: 58px 0 20px;
  padding-top: 22px;
  color: var(--article-ink);
  font: 700 clamp(30px, 4vw, 42px)/1.06 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.025em;
  text-wrap: balance;
  counter-increment: article-section;
}

.article-content h2::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--article-blue);
  font: 800 11px/1 "Manrope", Arial, sans-serif;
  letter-spacing: 0.12em;
  content: "РАЗДЕЛ " counter(article-section, decimal-leading-zero);
}

.article-content h3 {
  margin: 38px 0 14px;
  font-size: 22px;
  line-height: 1.3;
}

.article-content ul {
  display: grid;
  gap: 11px;
  margin: 2px 0 28px;
  padding: 0;
  list-style: none;
}

.article-content li {
  position: relative;
  padding-left: 28px;
  color: var(--article-copy);
  line-height: 1.68;
}

.article-content li::before {
  position: absolute;
  top: 0.68em;
  left: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--article-blue);
  border-radius: 50%;
  content: "";
}

.article-content blockquote {
  margin: 34px 0;
  padding: 22px 24px;
  border: 0;
  border-left: 4px solid var(--article-blue);
  border-radius: 0 14px 14px 0;
  color: #34445e;
  background: #f0f4ff;
}

.article-content a {
  color: var(--article-blue-dark);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-inline-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 34px auto;
  border-radius: 16px;
}

.article-color-blue { color: #2857ce; }
.article-color-purple { color: #7550b8; }
.article-color-teal { color: #087d73; }
.article-color-rose { color: #b74762; }

.article-related {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(24px, 5vw, 56px);
  padding: clamp(34px, 5vw, 60px) clamp(24px, 6vw, 76px);
  border-top: 1px solid var(--article-line);
  background: #fbfcfe;
}

.article-related h2,
.article-next-step h2,
.knowledge-cta h2 {
  margin: 0;
  font: 700 clamp(30px, 4vw, 42px)/1.05 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.article-related-grid {
  display: grid;
  gap: 10px;
}

.article-related-grid a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 18px;
  padding: 16px 18px;
  border: 1px solid var(--article-line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.article-related-grid a:hover {
  border-color: #b7c8eb;
  box-shadow: 0 8px 24px rgba(31, 52, 91, 0.07);
  transform: translateY(-1px);
}

.article-related-grid span {
  color: var(--article-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.article-related-grid strong { grid-column: 1; font-size: 14px; line-height: 1.45; }
.article-related-grid i { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--article-blue); font-style: normal; font-size: 20px; }

.article-next-step {
  display: grid;
  grid-template-columns: minmax(180px, 0.6fr) minmax(0, 1.4fr);
  align-items: center;
  gap: clamp(30px, 6vw, 76px);
  padding: clamp(42px, 7vw, 82px) clamp(24px, 7vw, 86px);
  color: #fff;
  background:
    radial-gradient(circle at 12% 18%, rgba(103, 214, 186, 0.3), transparent 18rem),
    linear-gradient(130deg, #152849, #233f7d 58%, #2d55b8);
}

.article-next-step .article-kicker { color: #9ee2d1; }
.article-next-step-copy > p:not(.article-kicker) { margin: 18px 0 0; color: #dbe6f7; }
.article-next-step small { display: block; margin-top: 18px; color: #b9c8df; font-size: 12px; }

.article-next-step-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 42% 58% 54% 46%;
  background: rgba(255, 255, 255, 0.07);
}

.article-next-step-mark span { font: 700 clamp(70px, 10vw, 118px)/1 "Cormorant Garamond", serif; }
.article-next-step-mark i,
.article-next-step-mark b { position: absolute; border-radius: 50%; content: ""; }
.article-next-step-mark i { top: 16%; right: 9%; width: 18px; height: 18px; background: var(--article-coral); }
.article-next-step-mark b { bottom: 13%; left: 4%; width: 30px; height: 30px; background: #78d9bf; }

.article-next-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.article-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.article-button:hover { transform: translateY(-1px); }
.article-button.primary { color: #fff; background: var(--article-blue); }
.article-button.primary:hover { background: var(--article-blue-dark); }
.article-button.secondary { border-color: rgba(255, 255, 255, 0.28); color: #fff; background: rgba(255, 255, 255, 0.06); }
.article-button.secondary:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.12); }

.knowledge-main { margin-top: 36px; }

.knowledge-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: end;
  gap: clamp(32px, 6vw, 82px);
  padding: clamp(34px, 6vw, 78px) clamp(24px, 6vw, 70px);
  border: 1px solid rgba(211, 221, 235, 0.9);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 10%, rgba(242, 139, 115, 0.19), transparent 15rem),
    linear-gradient(135deg, #fff, #f4f8ff);
  box-shadow: var(--article-shadow);
}

.knowledge-hero p:last-child {
  margin: 0 0 5px;
  color: var(--article-copy);
  line-height: 1.75;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.knowledge-card {
  overflow: hidden;
  border: 1px solid rgba(211, 221, 235, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 15px 42px rgba(31, 52, 91, 0.06);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.knowledge-card:hover {
  border-color: #b9c9e9;
  box-shadow: 0 24px 58px rgba(31, 52, 91, 0.11);
  transform: translateY(-3px);
}

.knowledge-card figure {
  margin: 0;
  overflow: hidden;
  background: #e8eef7;
}

.knowledge-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 400ms ease;
}

.knowledge-card:hover img { transform: scale(1.025); }

.knowledge-card > div { padding: clamp(22px, 4vw, 34px); }
.knowledge-card span { color: var(--article-blue); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; }
.knowledge-card h2 { margin: 10px 0 12px; font: 700 clamp(27px, 3.2vw, 38px)/1.05 "Cormorant Garamond", Georgia, serif; letter-spacing: -0.02em; text-wrap: balance; }
.knowledge-card p { margin: 0; color: var(--article-copy); font-size: 14px; line-height: 1.68; }
.knowledge-card > div > strong { display: inline-flex; gap: 8px; margin-top: 22px; color: var(--article-blue-dark); font-size: 12px; }
.knowledge-card i { font-style: normal; transition: transform 160ms ease; }
.knowledge-card:hover i { transform: translateX(3px); }

.knowledge-empty {
  grid-column: 1 / -1;
  padding: 50px;
  border: 1px solid var(--article-line);
  border-radius: 20px;
  background: #fff;
  text-align: center;
}

.knowledge-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  margin-top: 20px;
  padding: clamp(30px, 5vw, 52px);
  border-radius: 22px;
  background: var(--article-cream);
}

.knowledge-cta > div { max-width: 720px; }
.knowledge-cta > div > p:last-child { margin: 14px 0 0; color: var(--article-copy); }
.knowledge-cta .article-button { flex: 0 0 auto; }

.article-site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 34px;
  border-top: 1px solid #d8e1ed;
  color: var(--article-muted);
  font-size: 12px;
  font-weight: 700;
}

.article-site-footer a { text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid rgba(47, 91, 255, 0.3);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .article-main { width: min(100% - 24px, 1120px); margin-top: 8px; }
  .article-site-header { width: min(100% - 28px, 1180px); }
  .article-detail,
  .knowledge-hero { border-radius: 20px; }
  .article-hero { padding-inline: 20px; }
  .article-related,
  .article-next-step,
  .knowledge-hero { grid-template-columns: 1fr; }
  .article-next-step-mark { width: 150px; margin: 0; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .knowledge-cta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  body.article-page { font-size: 16px; }
  .article-site-header { min-height: 72px; }
  .article-brand span { max-width: 178px; font-size: 11px; }
  .article-header-cta { min-height: 38px; padding: 8px 12px; font-size: 11px; }
  .article-breadcrumbs { margin-bottom: 12px; }
  .article-hero h1,
  .knowledge-hero h1 { font-size: clamp(38px, 12vw, 52px); }
  .article-lead { margin-top: 18px; font-size: 16px; }
  .article-content { width: calc(100% - 36px); }
  .article-content > p:first-child { font-size: 17px; }
  .article-content h2 { margin-top: 48px; font-size: 32px; }
  .article-related,
  .article-next-step { padding-inline: 18px; }
  .article-next-step-actions { flex-direction: column; }
  .article-button { width: 100%; }
  .knowledge-main { margin-top: 10px; }
  .knowledge-hero { padding: 34px 22px; }
  .knowledge-card { border-radius: 18px; }
  .knowledge-cta { padding: 30px 22px; }
  .article-site-footer { align-items: flex-start; flex-direction: column; width: calc(100% - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
