/* Article detail page — Figma spec */
.article-page {
  background: #ffffff;
}

/* ---- Breadcrumb bar ---- */
.article-breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 40px;
  position: relative;
}

.article-back-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.article-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
  text-decoration: none;
  transition: background 0.2s;
  flex-shrink: 0;
}

.article-back-btn:hover {
  background: rgba(0, 0, 0, 0.14);
}

.article-back-text {
  font-family: "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 510;
  line-height: 20px;
  color: #000000;
  flex-shrink: 0;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.breadcrumb-item {
  font-family: "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  color: #666666;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

a.breadcrumb-item:hover {
  color: #000000;
}

.breadcrumb-current {
  color: #000000;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-sep {
  flex-shrink: 0;
}

/* ---- Article body ---- */
.article-body {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 120px 160px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Topic group: title + divider */
.article-topic {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.article-divider {
  height: 1px;
  width: 100%;
  background: rgba(0, 0, 0, 0.1);
}

/* Title section */
.article-title-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-title {
  font-family: "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 48px;
  color: #000000;
  margin: 0;
}

.article-date {
  font-family: "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #666666;
  margin: 0;
}

/* Section */
.article-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-h2 {
  font-family: "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: #000000;
  margin: 0;
}

/* Subsection */
.article-subsection {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-h3 {
  font-family: "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  color: #000000;
  margin: 0;
}

.article-p {
  font-family: "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 32px;
  color: #666666;
  margin: 0;
  paragraph-spacing: 16px;
}

.article-p strong {
  color: #000000;
  font-weight: 700;
}

.article-p em {
  font-style: italic;
}

/* Links inside article */
.article-link {
  color: #4c55ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(76, 85, 255, 0.3);
  transition: border-color 0.2s;
}

.article-link:hover {
  border-bottom-color: #4c55ff;
}

/* Ordered list */
.article-ol {
  margin: 0;
  padding: 0 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-ol li {
  font-family: "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 32px;
  color: #666666;
}

.article-ol li strong {
  color: #000000;
  font-weight: 700;
}

.article-ol li em {
  font-style: italic;
}

/* Highlights section */
.article-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Table (markdown-rendered) */
.article-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
}

.article-table thead tr {
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.article-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  color: #000;
  background: #f7f7fa;
  white-space: nowrap;
}

.article-table th:first-child {
  width: 200px;
}

.article-table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.article-table td {
  padding: 12px 16px;
  color: #666;
}

.article-table td:first-child {
  font-weight: 600;
  color: #000;
  vertical-align: top;
}

.article-table strong {
  color: #000;
  font-weight: 700;
}

.article-table em {
  font-style: italic;
}

/* Loading state */
.article-loading {
  text-align: center;
  padding: 80px 0;
  font-family: "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  color: #999;
}

/* Article images */
.article-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 8px 0;
}

/* Responsive */
@media (max-width: 1280px) {
  .article-body {
    padding: 0 60px 120px;
  }

  .article-breadcrumb-bar {
    padding: 24px 60px;
  }
}

@media (max-width: 1024px) {
  .article-body {
    padding: 0 40px 100px;
  }

  .article-breadcrumb-bar {
    padding: 20px 40px;
  }

  .article-title {
    font-size: 32px;
    line-height: 40px;
  }

  .breadcrumb-current {
    max-width: 180px;
  }
}

@media (max-width: 768px) {
  .article-body {
    padding: 0 20px 80px;
    gap: 24px;
  }

  .article-breadcrumb-bar {
    padding: 16px 20px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .article-back-text {
    display: none;
  }

  .article-title {
    font-size: 24px;
    line-height: 32px;
  }

  .article-h2 {
    font-size: 20px;
    line-height: 28px;
  }

  .article-p {
    font-size: 15px;
    line-height: 28px;
  }

  .article-ol li {
    font-size: 15px;
    line-height: 28px;
  }

  .breadcrumb-current {
    max-width: 120px;
  }

  .article-table th:first-child {
    width: auto;
    white-space: normal;
  }
}
