/* ==========================================================================
   Capitan — Blog article single (editorial / cinematic / RTL)
   Brand: indigo + accent red · Yekan · responsive shell
   ========================================================================== */

.article-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 90;
  height: 3px;
  pointer-events: none;
  background: transparent;
}

.article-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  box-shadow: 0 0 14px var(--color-accent-glow);
  transition: width 70ms linear;
}

/* ---- Page ---- */
.blog-article-page {
  position: relative;
  max-width: none;
  padding: 0;
  margin: 0;
}

body[data-page="article"] .app-main {
  padding-block: 0;
}

/* ---- Cover / Hero ---- */
.article-cover {
  position: relative;
  isolation: isolate;
  min-height: clamp(340px, 58vw, 520px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: #0B1220;
  overflow: hidden;
}

.article-cover--plain {
  min-height: auto;
  color: var(--color-text);
  background:
    radial-gradient(ellipse 80% 60% at 90% 0%, rgba(99, 102, 241, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(220, 38, 38, 0.08), transparent 50%),
    var(--color-bg);
  padding-block: clamp(28px, 5vw, 56px) clamp(20px, 3vw, 36px);
}

.article-cover__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.article-cover__media picture,
.article-cover__img,
.article-cover__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.02);
  animation: article-cover- ken 18s ease-out forwards;
}

@keyframes article-cover-ken {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

.article-cover__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(11, 18, 32, 0.25) 0%, rgba(11, 18, 32, 0.55) 42%, rgba(11, 18, 32, 0.92) 100%),
    linear-gradient(90deg, rgba(99, 102, 241, 0.18) 0%, transparent 45%);
  pointer-events: none;
}

.article-cover__inner {
  position: relative;
  z-index: 2;
  width: min(100% - 2rem, 1080px);
  margin-inline: auto;
  padding-block: clamp(72px, 12vw, 120px) clamp(28px, 4vw, 44px);
}

.article-cover--plain .article-cover__inner {
  padding-block: 0;
}

.article-cover .breadcrumb {
  margin-bottom: 16px;
}

.article-cover:not(.article-cover--plain) .breadcrumb,
.article-cover:not(.article-cover--plain) .breadcrumb a,
.article-cover:not(.article-cover--plain) .breadcrumb span,
.article-cover:not(.article-cover--plain) .breadcrumb__current,
.article-cover:not(.article-cover--plain) .breadcrumb__link,
.article-cover:not(.article-cover--plain) .breadcrumb__sep {
  color: #ffffff;
}

.article-cover:not(.article-cover--plain) .breadcrumb a:hover,
.article-cover:not(.article-cover--plain) .breadcrumb__link:hover {
  color: #fff;
}

.article-cover__cat {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius-full);
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.article-cover__cat:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.45);
}

.article-cover--plain .article-cover__cat {
  background: var(--gradient-cta);
}

.article-cover__title {
  color: #fff;
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.8vw, 3rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-wrap: balance;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.article-cover__title,
.article-cover__title span,
.article-cover__title a,
.article-cover__title * {
  color: #fff !important;
}

.article-cover--plain .article-cover__title,
.article-cover--plain .article-cover__title span,
.article-cover--plain .article-cover__title a,
.article-cover--plain .article-cover__title * {
  text-shadow: none;
  color: var(--color-text) !important;
}

.article-cover__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

.article-cover--plain .article-cover__meta {
  color: var(--color-text-muted);
}

.article-cover__meta > * + * {
  position: relative;
  padding-inline-start: 16px;
}

.article-cover__meta > * + *::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: currentColor;
  opacity: 0.45;
}

.article-cover__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  padding-inline-start: 0 !important;
}

.article-cover__author::before {
  display: none !important;
}

.article-cover__author:hover {
  color: #fff;
}

.article-cover--plain .article-cover__author:hover {
  color: var(--color-primary);
}

.article-cover__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.article-cover__avatar--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.article-cover__avatar--icon i {
  width: 16px;
  height: 16px;
}

.article-cover--plain .article-cover__avatar {
  border-color: var(--surface-border);
  background: var(--color-gray-soft);
  color: var(--color-primary);
}

/* ---- Shell: rail + main ---- */
.article-shell {
  width: min(100% - 2rem, 1080px);
  margin-inline: auto;
  padding-block: clamp(28px, 4vw, 48px) clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 48px);
}

@media (min-width: 1024px) {
  .article-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }

  .article-shell:has(.article-rail) {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

.article-rail {
  display: none;
}

@media (min-width: 1024px) {
  .article-rail {
    display: block;
    position: sticky;
    top: calc(var(--header-height, 64px) + 24px);
    max-height: calc(100vh - var(--header-height, 64px) - 48px);
    overflow: auto;
    padding-inline-end: 8px;
    scrollbar-width: thin;
  }
}

.article-rail__label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.article-rail__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-inline-start: 2px solid var(--color-border);
}

.article-rail__list a {
  display: block;
  padding: 8px 0 8px 14px;
  margin-inline-start: -2px;
  border-inline-start: 2px solid transparent;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.article-rail__list a:hover {
  color: var(--color-text);
}

.article-rail__list a.is-active {
  color: var(--color-primary);
  border-inline-start-color: var(--color-primary);
  font-weight: 700;
}

.article-main {
  min-width: 0;
  max-width: 720px;
}

.article-shell:not(:has(.article-rail)) .article-main {
  max-width: 760px;
  margin-inline: auto;
  width: 100%;
}

/* ---- Mobile TOC ---- */
.article-toc--mobile {
  display: block;
  margin-bottom: 28px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .article-toc--mobile {
    display: none;
  }
}

.article-toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  user-select: none;
}

.article-toc__summary::-webkit-details-marker {
  display: none;
}

.article-toc__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.article-toc__icon,
.article-toc__chevron {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.article-toc__chevron {
  color: var(--color-text-muted);
  transition: transform 180ms ease;
}

.article-toc[open] .article-toc__chevron {
  transform: rotate(180deg);
}

.article-toc__list {
  margin: 0;
  padding: 4px 8px 12px;
  list-style: none;
  border-top: 1px solid var(--color-border);
  counter-reset: toc;
}

.article-toc__item {
  counter-increment: toc;
}

.article-toc__item a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: background 160ms ease, color 160ms ease;
}

.article-toc__item a::before {
  content: counter(toc, persian);
  flex-shrink: 0;
  min-width: 1.4em;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  opacity: 0.8;
}

.article-toc__item a:hover {
  color: var(--color-text);
  background: var(--color-gray-soft);
}

/* ---- Body typography ---- */
.article-body {
  padding: 0;
  line-height: 1.92;
  font-size: clamp(1.05rem, 0.35vw + 1rem, 1.15rem);
  color: var(--color-text);
}

.article-body > p:first-of-type {
  font-size: 1.12em;
  line-height: 1.85;
  color: var(--color-text);
  margin-bottom: 1.4em;
}

.article-body h2 {
  margin-top: clamp(2.2rem, 4.5vw, 3rem);
  margin-bottom: 0.9rem;
  padding-block-end: 0.6rem;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 80%, transparent);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--color-text);
  scroll-margin-top: 100px;
  position: relative;
}

.article-body h2::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: -1px;
  width: 48px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-primary);
}

.article-body h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 700;
  color: var(--color-text);
  scroll-margin-top: 100px;
}

.article-body h4 {
  scroll-margin-top: 100px;
  font-family: var(--font-display);
  font-weight: 700;
}

.article-body p,
.article-body li {
  color: var(--color-text-muted);
  margin-bottom: 1.15em;
}

.article-body p:last-child,
.article-body li:last-child {
  margin-bottom: 0;
}

.article-body ul,
.article-body ol {
  padding-inline-start: 1.2em;
  margin-bottom: 1.3em;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: persian;
}

.article-body li::marker {
  color: var(--color-primary);
}

/* Mid-article sales CTA — chic, minimal, on-brand */
.article-sales-cta {
  --cta-ink: var(--color-text, #0f172a);
  --cta-muted: var(--color-text-muted, #64748b);
  position: relative;
  isolation: isolate;
  margin: clamp(1.75rem, 4vw, 2.75rem) 0;
  padding: clamp(1.15rem, 3vw, 1.55rem) clamp(1.1rem, 3vw, 1.65rem);
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--surface-border, #e2e8f0));
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--color-primary) 12%, transparent), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--color-accent, #DC2626) 10%, transparent), transparent 50%),
    color-mix(in srgb, var(--color-white, #fff) 88%, var(--color-gray-soft, #f8fafc));
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 70%, transparent) inset,
    0 14px 36px color-mix(in srgb, var(--color-primary) 10%, transparent);
  overflow: hidden;
}

.article-sales-cta::before {
  content: "";
  position: absolute;
  inset-block: 14px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 999px;
  background: var(--gradient-primary, linear-gradient(180deg, #6366F1, #DC2626));
}

.article-sales-cta__badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.55rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--gradient-primary, linear-gradient(135deg, #6366F1 0%, #DC2626 100%));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.article-sales-cta__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary);
}

.article-sales-cta__text {
  margin: 0 0 1rem;
  font-size: clamp(0.98rem, 2.4vw, 1.08rem);
  font-weight: 700;
  line-height: 1.7;
  color: var(--cta-ink);
}

.article-sales-cta__phones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.article-sales-cta__phone {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.65rem 0.85rem !important;
  margin: 0 !important;
  border-radius: 12px !important;
  font-size: 0.95rem;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--gradient-primary, linear-gradient(135deg, #6366F1 0%, #DC2626 100%)) !important;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--color-primary) 24%, transparent) !important;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease !important;
}

.article-sales-cta__phone::after {
  display: none !important;
  content: none !important;
}

.article-sales-cta__phone--alt {
  color: var(--color-primary) !important;
  background:
    color-mix(in srgb, var(--color-primary) 8%, var(--color-white, #fff)) !important;
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, transparent);
  box-shadow: none !important;
}

.article-sales-cta__phone i,
.article-sales-cta__phone svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.article-sales-cta__phone:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  color: #fff !important;
  background: var(--gradient-primary, linear-gradient(135deg, #6366F1 0%, #DC2626 100%)) !important;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--color-primary) 30%, transparent) !important;
}

.article-sales-cta__phone--alt:hover {
  color: #fff !important;
}

.article-sales-cta__phone:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.article-sales-cta__actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.article-sales-cta__shop,
.article-sales-cta__wa {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.85rem !important;
  margin: 0 !important;
  border-radius: 12px !important;
  font-size: 0.9rem;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.article-sales-cta__shop::after,
.article-sales-cta__wa::after {
  display: none !important;
  content: none !important;
}

.article-sales-cta__shop {
  color: #fff !important;
  background: var(--gradient-primary, linear-gradient(135deg, #6366F1 0%, #DC2626 100%)) !important;
}

.article-sales-cta__wa {
  color: #fff !important;
  background: #128c7e !important;
}

@media (max-width: 767px) {
  .article-sales-cta__actions {
    grid-template-columns: 1fr;
  }
}

/* Inline links — noticeable, modern, tap-friendly */
.article-body a:not(.article-tags__item):not(.article-sales-cta__phone):not(.article-sales-cta__shop):not(.article-sales-cta__wa):not(:has(img)) {
  position: relative;
  display: inline;
  color: var(--color-primary-dark, var(--color-primary));
  font-weight: 700;
  text-decoration: none;
  padding: 0.12em 0.42em;
  margin-inline: 0.05em;
  border-radius: 0.45em;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--color-primary) 14%, transparent) 0%,
      color-mix(in srgb, var(--color-primary) 8%, transparent) 100%
    );
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--color-primary) 45%, transparent);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.article-body a:not(.article-tags__item):not(.article-sales-cta__phone):not(.article-sales-cta__shop):not(.article-sales-cta__wa):not(:has(img))::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-inline-start: 0.28em;
  vertical-align: -0.05em;
  background-color: currentColor;
  opacity: 0.75;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7'/%3E%3Cpath d='M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7'/%3E%3Cpath d='M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 180ms ease, opacity 180ms ease;
}

.article-body a:not(.article-tags__item):not(.article-sales-cta__phone):not(.article-sales-cta__shop):not(.article-sales-cta__wa):not(:has(img)):hover {
  color: #fff;
  background: var(--gradient-primary, linear-gradient(135deg, #6366F1 0%, #DC2626 55%, #F97316 100%));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.article-body a:not(.article-tags__item):not(.article-sales-cta__phone):not(.article-sales-cta__shop):not(.article-sales-cta__wa):not(:has(img)):hover::after {
  opacity: 1;
  transform: translate(1px, -1px);
  background-color: #fff;
}

.article-body a:not(.article-tags__item):not(.article-sales-cta__phone):not(.article-sales-cta__shop):not(.article-sales-cta__wa):not(:has(img)):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.article-body a:has(img) {
  display: inline-block;
  text-decoration: none;
  background: none;
  box-shadow: none;
  padding: 0;
}

.article-body em {
  display: block;
  margin-bottom: 1rem;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: color-mix(in srgb, var(--color-gray-soft) 70%, var(--color-white));
  font-style: normal;
  font-size: 0.95em;
  color: var(--color-text-muted);
}

.article-body strong {
  color: var(--color-text);
  font-weight: 700;
}

.article-body hr {
  border: 0;
  height: 1px;
  margin: 2rem 0;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.article-body {
  overflow-wrap: anywhere;
}

.article-body blockquote {
  border-inline-start: 3px solid var(--color-accent);
  padding: 16px 18px;
  margin: 1.4rem 0;
  background:
    linear-gradient(90deg, rgba(220, 38, 38, 0.06), transparent 70%),
    var(--color-white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-text);
  font-weight: 500;
}

.article-body figure {
  margin: 1.75rem 0;
}

.article-body figure img,
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-soft);
}

.article-body .media {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
}

.article-body .media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Tags ---- */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(32px, 5vw, 48px);
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.article-tags__item {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: transparent;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.article-tags__item:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-gray-soft);
  transform: translateY(-1px);
}

/* ---- Author ---- */
.article-author {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 28px;
  padding: 22px 0 0;
  border-top: 1px solid var(--color-border);
}

.article-author__avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-gray-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  text-decoration: none;
  border: 2px solid var(--surface-border);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.article-author__avatar i {
  width: 24px;
  height: 24px;
}

.article-author__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-author__label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.article-author__name {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
}

.article-author__name:hover {
  color: var(--color-primary);
}

.article-author__role {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.article-author__bio {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* ---- Share ---- */
.article-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding: 4px 0;
}

.article-share__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.article-share__actions {
  display: flex;
  gap: 8px;
}

.article-share__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  text-decoration: none;
  background: var(--color-white);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.article-share__btn i {
  width: 18px;
  height: 18px;
}

.article-share__btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-gray-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* ---- Prev / Next ---- */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

.article-nav__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 0;
  text-decoration: none;
  color: inherit;
  border-block: none;
  transition: transform 180ms ease;
}

.article-nav__item:hover {
  transform: translateY(-2px);
  color: inherit;
  background: transparent;
}

.article-nav__item--next {
  text-align: left;
}

.article-nav__item--empty {
  padding: 0;
}

.article-nav__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.03em;
}

.article-nav__label i {
  width: 16px;
  height: 16px;
}

.article-nav__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text);
}

/* ---- Related ---- */
.article-related {
  padding-block: clamp(36px, 6vw, 64px);
  border-top: 1px solid var(--color-border);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(99, 102, 241, 0.06), transparent 60%),
    color-mix(in srgb, var(--color-bg) 88%, var(--color-white));
}

.article-related__inner {
  width: min(100% - 2rem, 1080px);
  margin-inline: auto;
}

.article-related__heading {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 800;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

.article-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-related__card {
  overflow: hidden;
  border-radius: calc(var(--radius-lg) + 2px);
  background: var(--color-white);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-soft);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.article-related__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.article-related__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.article-related__media {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-gray-soft);
}

.article-related__img,
.article-related__media img,
.article-related__media picture {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.article-related__card:hover .article-related__img,
.article-related__card:hover .article-related__media img {
  transform: scale(1.04);
}

.article-related__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color-primary);
  opacity: 0.45;
}

.article-related__placeholder i {
  width: 28px;
  height: 28px;
}

.article-related__body {
  padding: 14px 16px 18px;
}

.article-related__title {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.4;
  color: var(--color-text);
}

/* Override CMS inline white titles so they stay readable on light cards */
.article-related__title,
.article-related__title span,
.article-related__title a,
.article-related__title * {
  color: var(--color-text) !important;
}

.article-nav__title,
.article-nav__title span,
.article-nav__title * {
  color: var(--color-text) !important;
}

.article-related__excerpt {
  font-size: 13px;
  margin: 0;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .article-related__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .article-cover {
    min-height: clamp(300px, 78vw, 420px);
  }

  .article-cover__inner {
    width: min(100% - 1.25rem, 1080px);
    padding-block-end: 24px;
  }

  .article-cover__title {
    max-width: none;
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .article-cover__meta {
    gap: 8px 12px;
    font-size: 12.5px;
  }

  .article-cover__meta > * + * {
    padding-inline-start: 12px;
  }

  .article-shell {
    width: min(100% - 1.25rem, 1080px);
    padding-block-end: calc(var(--space-6) + 72px);
  }

  .article-body {
    font-size: 1.03rem;
    line-height: 1.88;
  }

  .article-body h2 {
    font-size: 1.22rem;
  }

  .article-nav {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .article-nav__item--next {
    text-align: right;
  }

  .article-nav__item--empty {
    display: none;
  }

  .article-related__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .article-share {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .article-share__actions {
    justify-content: flex-start;
  }

  .article-author {
    gap: 14px;
  }

  .article-author__avatar {
    width: 52px;
    height: 52px;
  }

  .article-body a:not(.article-tags__item):not(.article-sales-cta__phone):not(.article-sales-cta__shop):not(.article-sales-cta__wa):not(:has(img)) {
    padding: 0.18em 0.5em;
    line-height: 1.75;
  }

  .article-sales-cta__phones {
    grid-template-columns: 1fr;
  }

  .article-sales-cta__phone {
    min-height: 48px;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-cover__media img,
  .article-cover__img,
  .article-related__img,
  .article-related__media img,
  .article-progress__bar,
  .article-nav__item,
  .article-related__card,
  .article-share__btn,
  .article-tags__item,
  .article-cover__cat,
  .article-body a:not(.article-tags__item):not(.article-sales-cta__phone):not(:has(img)),
  .article-body a:not(.article-tags__item):not(.article-sales-cta__phone):not(:has(img))::after,
  .article-sales-cta__phone {
    animation: none !important;
    transition: none !important;
  }

  .article-cover__media img,
  .article-cover__img {
    transform: none;
  }
}

.psn-owner-note {
  margin: 1.25rem 0;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.06);
  line-height: 1.85;
}
.psn-owner-note p { margin: 0; }
.psn-owner-note a { font-weight: 700; }

.article-sales-cta--soft {
  margin: 1.25rem 0;
  padding: 0.9rem 1.05rem;
  border-radius: 14px;
  border: 1px dashed rgba(37, 99, 235, 0.35);
  background: rgba(15, 23, 42, 0.03);
  line-height: 1.85;
}
.article-sales-cta--soft p { margin: 0; }
.article-sales-cta--soft a { font-weight: 700; }



/* ==========================================================================
   Modern Enhancements: TOC, Summary Card, Callouts, Tables & Copy UX
   ========================================================================== */

/* Rail TOC Header & Polish */
.article-rail__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.article-rail__icon {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.article-rail__header .article-rail__label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

/* Mobile TOC Counter */
.article-toc__count {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  margin-inline-start: 6px;
}

/* Summary / TL;DR Card */
.article-summary-card {
  position: relative;
  margin-bottom: 2.2rem;
  padding: 1.25rem 1.45rem;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, var(--surface-border, #334155));
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--color-primary) 10%, transparent), transparent 60%),
    color-mix(in srgb, var(--color-bg) 85%, var(--color-primary) 6%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.article-summary-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 0;
  width: 4px;
  background: var(--gradient-primary, linear-gradient(180deg, #6366f1, #dc2626));
}

.article-summary-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.6rem;
}

.article-summary-card__icon {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.article-summary-card__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-primary);
}

.article-summary-card__text {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--color-text);
  font-weight: 500;
}

/* Share Bar & Copy Link Button */
.article-share {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  margin: 2.5rem 0 1.5rem;
  border-radius: var(--radius-lg, 14px);
  border: 1px solid var(--color-border);
  background: var(--glass-bg, rgba(15, 23, 42, 0.5));
}

.article-share__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-share__btn--copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  color: var(--color-text);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 180ms ease;
}

.article-share__btn--copy:hover {
  background: color-mix(in srgb, var(--color-primary) 20%, transparent);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.article-share__toast {
  position: absolute;
  inset-inline-start: 18px;
  bottom: -32px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 10;
}

.article-share__toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Rich Callouts — High Contrast & Modern */
.article-callout {
  margin: 2rem 0;
  padding: 1.25rem 1.45rem;
  border-radius: var(--radius-lg, 14px);
  border: 1px solid var(--surface-border, #e2e8f0);
  background: var(--color-white, #ffffff);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

.article-callout::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 0;
  width: 4px;
}

.article-callout__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.article-callout p,
.article-callout li {
  color: var(--color-text-muted, #475569);
}

.article-callout p:last-child {
  margin-bottom: 0;
}

.article-callout--tip {
  border-color: rgba(16, 185, 129, 0.3);
  background: color-mix(in srgb, #10b981 6%, var(--color-white, #fff));
}
.article-callout--tip::before {
  background: #10b981;
}
.article-callout--tip .article-callout__title {
  color: #059669;
}

.article-callout--warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: color-mix(in srgb, #f59e0b 6%, var(--color-white, #fff));
}
.article-callout--warning::before {
  background: #f59e0b;
}
.article-callout--warning .article-callout__title {
  color: #d97706;
}

.article-callout--info {
  border-color: rgba(99, 102, 241, 0.3);
  background: color-mix(in srgb, #6366f1 6%, var(--color-white, #fff));
}
.article-callout--info::before {
  background: #6366f1;
}
.article-callout--info .article-callout__title {
  color: #4f46e5;
}

[data-theme="dark"] .article-callout,
html[data-theme="dark"] .article-callout {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.6);
  box-shadow: none;
}
[data-theme="dark"] .article-callout p,
[data-theme="dark"] .article-callout li,
html[data-theme="dark"] .article-callout p,
html[data-theme="dark"] .article-callout li {
  color: #cbd5e1;
}

/* ==========================================================================
   Enhanced Tables — High-contrast, Modern, Responsive & Beautiful
   ========================================================================== */
.article-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 16px;
  border: 1px solid var(--surface-border, #e2e8f0);
  background: var(--color-white, #ffffff);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.03);
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* Custom sleek scrollbar for tables */
.article-table-wrap::-webkit-scrollbar {
  height: 6px;
}
.article-table-wrap::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 8px;
}
.article-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.35);
  border-radius: 8px;
}
.article-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}

/* Table element styling */
.article-body table {
  width: 100%;
  min-width: 580px;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  font-size: 0.93rem;
  background: #ffffff;
  color: #1e293b;
  text-align: right;
  direction: rtl;
}

/* Standalone tables without wrapper: ensure responsive behavior */
.article-body > table {
  margin: 2rem 0;
  border: 1px solid var(--surface-border, #e2e8f0);
  border-radius: 16px;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

/* Table Header */
.article-body thead {
  background: #f8fafc;
}

.article-body th {
  padding: 15px 18px;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  color: #0f172a !important; /* Bold, deep crisp black-navy for perfect readability */
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-bottom: 2px solid #cbd5e1;
  text-align: right;
  white-space: nowrap;
}

.article-body th:first-child {
  border-top-right-radius: 15px;
}
.article-body th:last-child {
  border-top-left-radius: 15px;
}

/* Table Body Cells */
.article-body td {
  padding: 14px 18px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #334155 !important; /* High contrast, crisp slate-700 text */
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.article-body td strong,
.article-body td b {
  color: #0f172a !important; /* Deep black-navy bold text */
  font-weight: 700;
}

.article-body td code {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5 !important;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

/* Zebra striping for effortless line reading */
.article-body tbody tr:nth-child(even) td {
  background-color: #f8fafc;
}

.article-body tbody tr:nth-child(odd) td {
  background-color: #ffffff;
}

/* Hover effect */
.article-body tbody tr:hover td {
  background: rgba(99, 102, 241, 0.06) !important;
  color: #0f172a !important;
}

/* Last row border cleanup */
.article-body tbody tr:last-child td {
  border-bottom: none;
}
.article-body tbody tr:last-child td:first-child {
  border-bottom-right-radius: 15px;
}
.article-body tbody tr:last-child td:last-child {
  border-bottom-left-radius: 15px;
}

/* Dark Theme Table Overrides */
[data-theme="dark"] .article-table-wrap,
html[data-theme="dark"] .article-table-wrap {
  border-color: rgba(255, 255, 255, 0.1);
  background: #0f172a;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .article-table-wrap::-webkit-scrollbar-track,
html[data-theme="dark"] .article-table-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .article-body table,
html[data-theme="dark"] .article-body table {
  background: #0f172a;
  color: #e2e8f0;
}

[data-theme="dark"] .article-body > table,
html[data-theme="dark"] .article-body > table {
  border-color: rgba(255, 255, 255, 0.1);
  background: #0f172a;
}

[data-theme="dark"] .article-body thead,
html[data-theme="dark"] .article-body thead {
  background: #1e293b;
}

[data-theme="dark"] .article-body th,
html[data-theme="dark"] .article-body th {
  color: #ffffff !important;
  background: linear-gradient(180deg, #1e293b 0%, #172033 100%) !important;
  border-bottom: 2px solid #334155;
}

[data-theme="dark"] .article-body td,
html[data-theme="dark"] .article-body td {
  color: #cbd5e1 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .article-body td strong,
[data-theme="dark"] .article-body td b,
html[data-theme="dark"] .article-body td strong,
html[data-theme="dark"] .article-body td b {
  color: #38bdf8 !important; /* Sleek sky-blue accent for highlights in dark mode */
}

[data-theme="dark"] .article-body td code,
html[data-theme="dark"] .article-body td code {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc !important;
}

[data-theme="dark"] .article-body tbody tr:nth-child(even) td,
html[data-theme="dark"] .article-body tbody tr:nth-child(even) td {
  background-color: rgba(30, 41, 59, 0.45);
}

[data-theme="dark"] .article-body tbody tr:nth-child(odd) td,
html[data-theme="dark"] .article-body tbody tr:nth-child(odd) td {
  background-color: #0f172a;
}

[data-theme="dark"] .article-body tbody tr:hover td,
html[data-theme="dark"] .article-body tbody tr:hover td {
  background: rgba(99, 102, 241, 0.16) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   FAQ Accordions — Chic, Modern, Gamer-Grade & High Contrast
   ========================================================================== */
.article-faq-list {
  margin: 2.2rem 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* FAQ item card */
.article-faq-item,
.article-body details:not(.article-toc) {
  border: 1px solid var(--surface-border, #e2e8f0);
  border-radius: 16px;
  background: var(--color-white, #ffffff);
  box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  position: relative;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
  isolation: isolate;
}

/* Hover state */
.article-faq-item:hover,
.article-body details:not(.article-toc):hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.09);
  transform: translateY(-1px);
}

/* Open / Active state */
.article-faq-item[open],
.article-body details:not(.article-toc)[open] {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 10px 30px -4px rgba(99, 102, 241, 0.12);
}

/* Vibrant accent bar on active FAQ item */
.article-faq-item[open]::before,
.article-body details:not(.article-toc)[open]::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 0;
  width: 4px;
  background: var(--gradient-primary, linear-gradient(180deg, #6366f1 0%, #dc2626 100%));
  z-index: 2;
}

/* Summary / Question Header */
.article-faq-item__q,
.article-body details:not(.article-toc) > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: transparent;
  transition: background 180ms ease, color 180ms ease;
  position: relative;
}

.article-faq-item__q::-webkit-details-marker,
.article-body details:not(.article-toc) > summary::-webkit-details-marker {
  display: none;
}

/* Question text flex-grow and bold */
.article-faq-item__q span,
.article-body details:not(.article-toc) > summary span {
  flex: 1;
  font-family: var(--font-display, inherit);
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

/* Question hover */
.article-faq-item:hover .article-faq-item__q span,
.article-body details:not(.article-toc):hover > summary span {
  color: var(--color-primary, #6366f1);
}

/* Open question header styling */
.article-faq-item[open] .article-faq-item__q,
.article-body details:not(.article-toc)[open] > summary {
  background: color-mix(in srgb, var(--color-primary, #6366f1) 4%, #ffffff);
}

.article-faq-item[open] .article-faq-item__q span,
.article-body details:not(.article-toc)[open] > summary span {
  color: var(--color-primary, #4f46e5);
  font-weight: 800;
}

/* Chevron Button Badge */
.article-faq-item__q i,
.article-faq-item__q svg,
.article-body details:not(.article-toc) > summary i,
.article-body details:not(.article-toc) > summary svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 6px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.08);
  color: var(--color-primary, #6366f1);
  flex-shrink: 0;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), background 180ms ease, color 180ms ease;
  box-sizing: border-box;
}

/* Open state chevron */
.article-faq-item[open] .article-faq-item__q i,
.article-faq-item[open] .article-faq-item__q svg,
.article-body details:not(.article-toc)[open] > summary i,
.article-body details:not(.article-toc)[open] > summary svg {
  transform: rotate(180deg);
  background: var(--color-primary, #6366f1);
  color: #ffffff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-primary, #6366f1) 35%, transparent);
}

/* Answer Body */
.article-faq-item__a,
.article-body details:not(.article-toc) > div:not(.article-toc__summary),
.article-body details:not(.article-toc) > p {
  padding: 16px 24px 22px;
  font-size: 0.98rem;
  line-height: 1.9;
  color: #334155 !important; /* Crisp, high-contrast slate text */
  border-top: 1px solid #f1f5f9;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.6) 0%, #ffffff 100%);
  animation: faqFadeIn 240ms ease-out forwards;
}

@keyframes faqFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-faq-item__a p,
.article-body details:not(.article-toc) > div > p {
  margin: 0 0 0.85em;
  color: #334155 !important;
}

.article-faq-item__a p:last-child,
.article-body details:not(.article-toc) > div > p:last-child {
  margin-bottom: 0;
}

/* Dark Theme FAQ Overrides */
[data-theme="dark"] .article-faq-item,
[data-theme="dark"] .article-body details:not(.article-toc),
html[data-theme="dark"] .article-faq-item,
html[data-theme="dark"] .article-body details:not(.article-toc) {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0f172a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .article-faq-item:hover,
[data-theme="dark"] .article-body details:not(.article-toc):hover,
html[data-theme="dark"] .article-faq-item:hover,
html[data-theme="dark"] .article-body details:not(.article-toc):hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .article-faq-item[open],
[data-theme="dark"] .article-body details:not(.article-toc)[open],
html[data-theme="dark"] .article-faq-item[open],
html[data-theme="dark"] .article-body details:not(.article-toc)[open] {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .article-faq-item__q,
[data-theme="dark"] .article-body details:not(.article-toc) > summary,
html[data-theme="dark"] .article-faq-item__q,
html[data-theme="dark"] .article-body details:not(.article-toc) > summary {
  color: #f8fafc;
}

[data-theme="dark"] .article-faq-item__q span,
[data-theme="dark"] .article-body details:not(.article-toc) > summary span,
html[data-theme="dark"] .article-faq-item__q span,
html[data-theme="dark"] .article-body details:not(.article-toc) > summary span {
  color: #f8fafc;
}

[data-theme="dark"] .article-faq-item[open] .article-faq-item__q,
[data-theme="dark"] .article-body details:not(.article-toc)[open] > summary,
html[data-theme="dark"] .article-faq-item[open] .article-faq-item__q,
html[data-theme="dark"] .article-body details:not(.article-toc)[open] > summary {
  background: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .article-faq-item[open] .article-faq-item__q span,
[data-theme="dark"] .article-body details:not(.article-toc)[open] > summary span,
html[data-theme="dark"] .article-faq-item[open] .article-faq-item__q span,
html[data-theme="dark"] .article-body details:not(.article-toc)[open] > summary span {
  color: #38bdf8;
}

[data-theme="dark"] .article-faq-item__q i,
[data-theme="dark"] .article-faq-item__q svg,
[data-theme="dark"] .article-body details:not(.article-toc) > summary i,
[data-theme="dark"] .article-body details:not(.article-toc) > summary svg,
html[data-theme="dark"] .article-faq-item__q i,
html[data-theme="dark"] .article-faq-item__q svg,
html[data-theme="dark"] .article-body details:not(.article-toc) > summary i,
html[data-theme="dark"] .article-body details:not(.article-toc) > summary svg {
  background: rgba(255, 255, 255, 0.08);
  color: #38bdf8;
}

[data-theme="dark"] .article-faq-item[open] .article-faq-item__q i,
[data-theme="dark"] .article-faq-item[open] .article-faq-item__q svg,
[data-theme="dark"] .article-body details:not(.article-toc)[open] > summary i,
[data-theme="dark"] .article-body details:not(.article-toc)[open] > summary svg,
html[data-theme="dark"] .article-faq-item[open] .article-faq-item__q i,
html[data-theme="dark"] .article-faq-item[open] .article-faq-item__q svg,
html[data-theme="dark"] .article-body details:not(.article-toc)[open] > summary i,
html[data-theme="dark"] .article-body details:not(.article-toc)[open] > summary svg {
  background: #6366f1;
  color: #ffffff;
}

[data-theme="dark"] .article-faq-item__a,
[data-theme="dark"] .article-body details:not(.article-toc) > div:not(.article-toc__summary),
[data-theme="dark"] .article-body details:not(.article-toc) > p,
html[data-theme="dark"] .article-faq-item__a,
html[data-theme="dark"] .article-body details:not(.article-toc) > div:not(.article-toc__summary),
html[data-theme="dark"] .article-body details:not(.article-toc) > p {
  color: #cbd5e1 !important;
  border-top-color: rgba(255, 255, 255, 0.07);
  background: rgba(15, 23, 42, 0.7);
}

[data-theme="dark"] .article-faq-item__a p,
[data-theme="dark"] .article-body details:not(.article-toc) > div > p,
html[data-theme="dark"] .article-faq-item__a p,
html[data-theme="dark"] .article-body details:not(.article-toc) > div > p {
  color: #cbd5e1 !important;
}

/* Code & Cheat Card Blocks */
.article-code-block {
  margin: 1.6rem 0;
  border-radius: var(--radius-md, 10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #090d16;
  overflow: hidden;
}

.article-code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.article-code-block__badge {
  font-weight: 700;
  color: var(--color-primary);
}

.article-code-block__copy {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 150ms ease;
}

.article-code-block__copy:hover {
  color: #fff;
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.2);
}

.article-code-block pre {
  margin: 0;
  padding: 12px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  color: #38bdf8;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}
