.rl-article {
  max-width: 860px;
}

.rl-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  min-height: min(60vh, 560px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.02));
}

.article-main-image.rl-hero {
  aspect-ratio: auto;
}

.article-main-image .rl-hero__image {
  display: block;
  max-width: 100%;
  max-height: min(56vh, 520px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.rl-article__title {
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.rl-article__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--bs-secondary-color, #6c757d);
}

.rl-meta__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rl-meta__author img {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
}

.rl-meta__author strong {
  font-weight: 700;
  color: var(--bs-body-color, #212529);
}

.rl-meta__line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rl-chipbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.rl-chip {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.02);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.rl-chip:hover {
  background: rgba(13, 110, 253, 0.08);
  border-color: rgba(13, 110, 253, 0.28);
}

.rl-chip:active {
  transform: translateY(1px);
}

.rl-like.is-active {
  background: rgba(220, 53, 69, 0.10);
  border-color: rgba(220, 53, 69, 0.30);
}

.rl-like.is-active .bi {
  color: var(--bs-danger, #dc3545);
}

.rl-divider {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 22px 0;
}

.rl-comments__title {
  letter-spacing: -0.01em;
}

.rl-comment {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 12px 12px 10px;
  background: var(--bs-body-bg, #fff);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.rl-comment:hover {
  border-color: rgba(13, 110, 253, 0.25);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05);
}

.rl-comment__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rl-comment__avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.rl-comment__name {
  font-weight: 700;
}

.rl-comment__time {
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.85rem;
}

.rl-comment__actions {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
}

.rl-comment__text {
  margin: 8px 0 0;
  color: var(--bs-body-color, #212529);
}

.rl-comment__edit {
  resize: vertical;
  min-height: 84px;
}

.rl-empty {
  color: var(--bs-secondary-color, #6c757d);
  margin: 0;
}

.richtext {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--bs-body-color, #212529);
}

.richtext > *:first-child {
  margin-top: 0;
}

.richtext > *:last-child {
  margin-bottom: 0;
}

.richtext p,
.richtext ul,
.richtext ol,
.richtext blockquote,
.richtext pre,
.richtext table,
.richtext figure {
  margin: 0 0 1.2rem;
}

.richtext h1,
.richtext h2,
.richtext h3,
.richtext h4,
.richtext h5,
.richtext h6 {
  margin: 2rem 0 0.9rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--bs-body-color, #212529);
}

.richtext h2 {
  font-size: clamp(1.6rem, 2vw, 2rem);
}

.richtext h3 {
  font-size: clamp(1.35rem, 1.7vw, 1.7rem);
}

.richtext h4 {
  font-size: clamp(1.15rem, 1.4vw, 1.35rem);
}

.richtext ul,
.richtext ol {
  padding-left: 1.5rem;
}

.richtext li + li {
  margin-top: 0.35rem;
}

.richtext a {
  color: var(--bs-primary, #0d6efd);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.richtext blockquote {
  padding: 1rem 1.2rem;
  border-left: 4px solid rgba(13, 110, 253, 0.4);
  background: rgba(13, 110, 253, 0.05);
  border-radius: 0 14px 14px 0;
}

.richtext pre,
.richtext code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.richtext pre {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  overflow-x: auto;
  background: #111827;
  color: #f8fafc;
  line-height: 1.6;
}

.richtext code {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
}

.richtext pre code {
  background: transparent;
  padding: 0;
}

.richtext table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
}

.richtext th,
.richtext td {
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.75rem 0.9rem;
  vertical-align: top;
}

.richtext th {
  background: rgba(15, 23, 42, 0.04);
  font-weight: 700;
}

.richtext hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.richtext img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.rl-hero img,
.richtext img {
  cursor: zoom-in;
}

.rl-image-lightbox[hidden] {
  display: none !important;
}

.rl-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.rl-image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
}

.rl-image-lightbox__dialog {
  position: relative;
  z-index: 1;
  max-width: min(1200px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rl-image-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  width: auto;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.rl-image-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.rl-image-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

@media (max-width: 576px) {
  .rl-article {
    max-width: 100%;
  }
  .rl-hero {
    min-height: 260px;
    padding: 12px;
  }
  .rl-hero__image {
    max-height: 42vh;
  }
  .rl-chip {
    width: 100%;
    justify-content: center;
  }
}
