.article-container {
  max-width: 820px;
  margin: 0 auto;
}

.article-meta {
  color: var(--fg-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.article-cover {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
  margin: 8px auto 36px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
}

.article-content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--fg);
  overflow-wrap: anywhere;
}

.article-content > p:first-child {
  font-size: 20px;
  line-height: 1.65;
  color: var(--fg-muted);
}

.article-content p {
  margin: 0 0 1.25em;
}

.article-content h2 {
  font-family: 'Unbounded', 'Inter', sans-serif;
  font-size: 28px;
  line-height: 1.3;
  margin: 2.1em 0 0.7em;
  letter-spacing: -0.4px;
}

.article-content h3 {
  font-family: 'Unbounded', 'Inter', sans-serif;
  font-size: 22px;
  line-height: 1.35;
  margin: 1.7em 0 0.6em;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.4em 1.3em;
  padding: 0;
}

.article-content li {
  margin-bottom: 0.55em;
  padding-left: 0.2em;
}

.article-content li::marker {
  color: var(--accent);
}

.article-content strong,
.article-content b {
  font-weight: 700;
  color: var(--fg);
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content blockquote {
  margin: 1.5em 0;
  padding: 12px 20px;
  border-left: 4px solid var(--accent);
  background: var(--card);
  border-radius: 0 12px 12px 0;
  color: var(--fg-muted);
}

.article-content code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 5px;
}

.article-content pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  margin: 1.4em 0;
}

.article-content pre code {
  border: 0;
  padding: 0;
  background: transparent;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 16px;
}

.article-content th,
.article-content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.article-content th {
  background: var(--card);
}

.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.2em auto;
}

.article-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

@media (max-width: 600px) {
  .article-content {
    font-size: 17px;
    line-height: 1.7;
  }

  .article-content h2 {
    font-size: 23px;
  }

  .article-content h3 {
    font-size: 20px;
  }

  .article-cover {
    border-radius: 14px;
    margin-bottom: 26px;
  }
}

.article-toc {
  margin: 20px 0 28px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
}

.article-toc strong {
  display: block;
  margin-bottom: 8px;
}

.article-toc ol {
  margin: 0;
  padding-left: 20px;
}

.article-toc li {
  margin: 4px 0;
}

.article-toc a {
  color: var(--accent);
  text-decoration: none;
}

.article-toc a:hover {
  text-decoration: underline;
}

.article-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.88);
}

.article-lightbox[hidden] {
  display: none;
}

.article-lightbox img {
  max-width: min(1100px, 96vw);
  max-height: 88vh;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.article-lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.article-lightbox-close:hover,
.article-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  outline: 3px solid #fff;
  outline-offset: 2px;
}
