.article-container {
  max-width: var(--article-width);
  margin: 40px auto;
  padding: 0 20px;
}

.article-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 30px;
}

.article-title {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--text);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.article-content {
  font-size: 1.05rem;
}

.article-content h2 {
  font-size: 1.8rem;
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.article-content h3 {
  font-size: 1.4rem;
  margin: 30px 0 16px;
  color: var(--text);
}

.article-content p {
  margin-bottom: 20px;
  color: var(--text);
}

.article-content ul, .article-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: var(--text);
}

.article-content li {
  margin-bottom: 8px;
}

.article-content a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  background-color: var(--card);
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-content img {
  border-radius: var(--radius-sm);
  margin: 32px auto;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  background-color: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

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

.article-content th {
  background-color: var(--background-soft);
  font-weight: 600;
}

/* Alerts / Notes in Articles */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 24px 0;
  border-left: 4px solid;
}

.alert-warning {
  background-color: rgba(241, 184, 91, 0.1);
  border-color: var(--warning);
}
.alert-warning strong { color: var(--warning); }

.alert-info {
  background-color: rgba(67, 166, 255, 0.1);
  border-color: var(--primary);
}
.alert-info strong { color: var(--primary); }

.alert-danger {
  background-color: rgba(239, 119, 119, 0.1);
  border-color: var(--danger);
}
.alert-danger strong { color: var(--danger); }

/* Table of Contents */
.toc-container {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 40px;
}

.toc-title {
  font-size: 1.2rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-list li {
  margin-bottom: 12px;
}

.toc-list a {
  color: var(--text-soft);
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--primary);
}

.toc-list ul {
  padding-left: 20px;
  margin-top: 10px;
  margin-bottom: 0;
}

/* Desktop sticky TOC */
@media (min-width: 1200px) {
  .page-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
  }
  
  .article-container {
    margin: 0;
    max-width: 100%;
    padding: 0;
  }

  .sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
  }
}
