/* ============================================================
   Blog article page (CheatPulse) — monochrome token-based styles
   Scope: only the article area (<main>), header/footer untouched.
   Classes use the `bp-` prefix. SSR and client fallback share it.
   ============================================================ */

.bp-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px 80px;
  color: var(--text, #e7e7ee);
  font-family: var(--font-main, 'Montserrat', system-ui, sans-serif);
}

/* ---------- Breadcrumbs (стиль как .breadcrumbs из styles.css: серые ссылки, шеврон, белая жирная текущая) ---------- */
.bp-crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted, #a3a3b2);
}
.bp-crumbs a {
  color: var(--muted, #a3a3b2);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.bp-crumbs a:visited {
  color: var(--muted, #a3a3b2);
}
.bp-crumbs a:hover,
.bp-crumbs a:focus-visible {
  color: #fff;
}
.bp-crumbs__sep {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #a3a3b2);
  flex-shrink: 0;
  user-select: none;
}
.bp-crumbs__sep::before {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  display: inline-block;
}
.bp-crumbs__current {
  color: #fff;
  font-weight: 700;
  min-width: 0;
}

/* ---------- Hero ---------- */
.bp-hero {
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.bp-eyebrow {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #a3a3b2);
}
.bp-title {
  margin: 0 0 18px;
  max-width: 900px;
  font-family: var(--font-main, 'Montserrat', system-ui, sans-serif);
  font-size: clamp(1.75rem, 1.25rem + 2.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--text, #e7e7ee);
}
.bp-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted, #a3a3b2);
}
.bp-meta > * {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.bp-meta > *:not(:first-child)::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  margin-right: 8px;
}
.bp-meta svg {
  opacity: 0.85;
}
.bp-meta a {
  color: var(--muted, #a3a3b2);
  text-decoration: none;
}
.bp-meta a:hover {
  color: #fff;
}

/* ---------- Cover ---------- */
.bp-cover {
  margin: 30px 0 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface, #0a0a0a);
}
.bp-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
}
.bp-cover--emoji {
  aspect-ratio: 21 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, 0.05), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.4));
}
.bp-cover--emoji span {
  font-size: clamp(3rem, 8vw, 5.5rem);
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.5));
}

/* ---------- Layout: content + aside ---------- */
.bp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  margin-top: 44px;
}
.bp-aside-inner {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}
.bp-aside-title {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text, #e7e7ee);
}

/* ---------- Table of contents ---------- */
.bp-toc {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 20px;
}
.bp-toc ol {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  counter-reset: bp-toc;
  display: flex;
  flex-direction: column;
}
.bp-toc li {
  counter-increment: bp-toc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.bp-toc li:last-child {
  border-bottom: 0;
}
.bp-toc a {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  font-size: 0.87rem;
  line-height: 1.45;
  color: var(--muted, #a3a3b2);
  text-decoration: none;
  transition: color 0.2s ease;
}
.bp-toc a::before {
  content: counter(bp-toc);
  min-width: 1.4em;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
}
.bp-toc a:hover,
.bp-toc a:focus-visible,
.bp-toc a.is-active {
  color: #fff;
}

/* ---------- Aside: related reads ---------- */
.bp-aside-reads ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bp-aside-reads li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.bp-aside-reads li:last-child {
  border-bottom: 0;
}
.bp-side-read {
  display: block;
  padding: 14px 0;
  text-decoration: none;
}
.bp-side-read__title {
  display: block;
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text, #e7e7ee);
  transition: color 0.2s ease;
}
.bp-side-read:hover .bp-side-read__title,
.bp-side-read:focus-visible .bp-side-read__title {
  color: rgba(255, 255, 255, 0.75);
}
.bp-side-read__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--muted, #a3a3b2);
}
.bp-side-read__tag {
  color: var(--muted, #a3a3b2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.72rem;
}
.bp-aside-note {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--muted, #a3a3b2);
}

/* ---------- Aside: products ---------- */
.bp-aside-products ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bp-side-product {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.bp-side-product:hover,
.bp-side-product:focus-visible {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.bp-side-product__img {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.5));
  overflow: hidden;
}
.bp-side-product__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(9, 9, 11, 0.82));
}
.bp-side-product__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bp-side-product__overlay {
  position: absolute;
  inset: auto 12px 12px;
  z-index: 1;
}
.bp-side-product__overlay .bp-side-product__name {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.bp-side-product__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}
.bp-side-product__name-flat {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-side-product__price {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--text, #e7e7ee);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}
.bp-side-product__price small {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted, #a3a3b2);
}
.bp-side-product__arrow {
  flex-shrink: 0;
  color: var(--muted, #a3a3b2);
  transition: color 0.2s ease, transform 0.2s ease;
}
.bp-side-product:hover .bp-side-product__arrow,
.bp-side-product:focus-visible .bp-side-product__arrow {
  color: #fff;
  transform: translateX(2px);
}
/* Product status reuses the global .status-badge classes */
.bp-side-product .status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}
.bp-aside-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted, #a3a3b2);
  text-decoration: none;
  transition: color 0.2s ease;
}
.bp-aside-link:hover,
.bp-aside-link:focus-visible {
  color: #fff;
}

/* ---------- Article body typography ---------- */
.bp-body {
  min-width: 0;
}
.bp-content {
  font-size: 0.97rem;
  line-height: 1.72;
  color: var(--muted, #a3a3b2);
}
.bp-block {
  margin: 0 0 2.2em;
}
.bp-block:last-child {
  margin-bottom: 0;
}
.bp-block__body {
  max-width: none;
}
.bp-block__figure {
  margin: 0 0 1.2em;
  width: 100%;
}
.bp-block__figure img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: block;
}
.bp-block__caption {
  margin-top: 8px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.42);
}
.bp-content h2,
.bp-block__body h2 {
  margin: 1.6em 0 0.6em;
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text, #e7e7ee);
  scroll-margin-top: 96px;
}
.bp-content > h2:first-child,
.bp-block__body > h2:first-child {
  margin-top: 0.2em;
}
.bp-content h3,
.bp-block__body h3 {
  margin: 1.45em 0 0.5em;
  font-size: 1.13rem;
  font-weight: 700;
  color: var(--text, #e7e7ee);
  scroll-margin-top: 96px;
}
.bp-content p,
.bp-block__body p {
  margin: 0.9em 0;
}
.bp-content strong,
.bp-content b,
.bp-block__body strong,
.bp-block__body b {
  color: var(--text, #e7e7ee);
  font-weight: 700;
}
.bp-content a,
.bp-block__body a {
  color: var(--text, #e7e7ee);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.bp-content a:hover,
.bp-block__body a:hover {
  text-decoration-color: rgba(255, 255, 255, 0.9);
}
.bp-content ul,
.bp-content ol,
.bp-block__body ul,
.bp-block__body ol {
  padding-left: 1.5em;
  margin: 0.9em 0;
}
.bp-content li,
.bp-block__body li {
  margin: 0.45em 0;
}
.bp-content li::marker,
.bp-block__body li::marker {
  color: rgba(255, 255, 255, 0.4);
}
.bp-content blockquote,
.bp-block__body blockquote {
  margin: 1.3em 0;
  padding: 14px 18px;
  border-left: 3px solid rgba(255, 255, 255, 0.28);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #e7e7ee);
}
.bp-content img,
.bp-block__body img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  margin: 1.3em auto;
}
.bp-content code,
.bp-block__body code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: var(--text, #e7e7ee);
}
.bp-content pre,
.bp-block__body pre {
  position: relative;
  margin: 1.3em 0;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface, #0a0a0a);
  overflow-x: auto;
}
.bp-content pre code,
.bp-block__body pre code {
  background: transparent;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text, #e7e7ee);
}
.bp-codecopy {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(9, 9, 11, 0.85);
  color: var(--muted, #a3a3b2);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.bp-content pre:hover .bp-codecopy,
.bp-content pre:focus-within .bp-codecopy,
.bp-block__body pre:hover .bp-codecopy,
.bp-block__body pre:focus-within .bp-codecopy,
.bp-codecopy:focus-visible {
  opacity: 1;
}
.bp-codecopy:hover {
  color: #fff;
}
.bp-codecopy.is-copied {
  color: #fff;
  opacity: 1;
}

/* Tables */
.bp-tablewrap {
  margin: 1.3em 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.bp-tablewrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.bp-tablewrap th {
  padding: 12px 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #e7e7ee);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
}
.bp-tablewrap td {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: top;
  color: var(--muted, #a3a3b2);
}
.bp-tablewrap td strong,
.bp-tablewrap td b {
  color: var(--text, #e7e7ee);
}

/* FAQ accordion (client-side enhancement) */
.bp-faq-item {
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.bp-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--text, #e7e7ee);
  font-size: 0.95rem;
}
.bp-faq-item summary::-webkit-details-marker {
  display: none;
}
.bp-faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted, #a3a3b2);
  border-bottom: 1.5px solid var(--muted, #a3a3b2);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-left: auto;
}
.bp-faq-item[open] summary::after {
  transform: rotate(-135deg);
}
.bp-faq-item summary:hover {
  color: #fff;
}
.bp-faq-item__body {
  padding: 2px 18px 16px;
  color: var(--muted, #a3a3b2);
  font-size: 0.92rem;
}
.bp-faq-item__body > :first-child {
  margin-top: 0;
}
.bp-faq-item__body > :last-child {
  margin-bottom: 0;
}

/* Чужие фоны из Word/Google Docs в сохранённом контенте */
.bp-content p,
.bp-content h2,
.bp-content h3,
.bp-content h4,
.bp-content li,
.bp-content span,
.bp-content div,
.bp-content strong,
.bp-content em,
.bp-content u,
.bp-content b,
.bp-content i,
.bp-block__body p,
.bp-block__body h2,
.bp-block__body h3,
.bp-block__body h4,
.bp-block__body li,
.bp-block__body span,
.bp-block__body div,
.bp-block__body strong,
.bp-block__body em,
.bp-block__body u,
.bp-block__body b,
.bp-block__body i {
  background: transparent !important;
  background-color: transparent !important;
}

/* ---------- States ---------- */
.bp-loading,
.bp-error {
  text-align: center;
  padding: 90px 20px;
  color: var(--muted, #a3a3b2);
}
.bp-error h1 {
  color: var(--text, #e7e7ee);
  margin-bottom: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .bp-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .bp-aside-inner {
    position: static;
  }
  /* On tablets/mobile the aside moves under the content */
  .bp-body {
    order: 1;
  }
  .bp-aside {
    order: 2;
  }
}
@media (max-width: 600px) {
  .bp-shell {
    padding: 0 14px 60px;
  }
  .bp-crumbs {
    padding: 12px 0 16px;
  }
  .bp-title {
    font-size: clamp(1.5rem, 1.1rem + 2.4vw, 1.9rem);
  }
  .bp-meta {
    font-size: 0.76rem;
  }
  .bp-cover {
    margin-top: 22px;
    border-radius: 14px;
  }
  .bp-cover--emoji {
    aspect-ratio: 16 / 9;
  }
  .bp-layout {
    margin-top: 32px;
  }
  .bp-tablewrap {
    margin: 1.1em -4px;
    border-radius: 12px;
  }
}
