
/* ===== ARTICLE LAYOUT: TOC + Content + Sibling Nav ===== */

.article-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 200px 1fr 240px;
  gap: 2rem;
  align-items: start;
}

/* --- Left sidebar: Table of Contents --- */
.toc-sidebar {
  position: sticky;
  top: 70px;
  padding-top: 1.5rem;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.toc-sidebar::-webkit-scrollbar { width: 3px; }
.toc-sidebar::-webkit-scrollbar-thumb { background: #d0dbe5; border-radius: 3px; }

.toc-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6B7C8D;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #3282b8;
}

.toc-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-nav ul li {
  margin-bottom: 0.15rem;
}
.toc-nav ul li a {
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #6B7C8D;
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.toc-nav ul li a:hover {
  color: #0f4c75;
  background: #f4f8fb;
}
.toc-nav ul li a.active {
  color: #0f4c75;
  font-weight: 600;
  border-left-color: #3282b8;
  background: #f4f8fb;
}
.toc-nav ul li.toc-sub a {
  padding-left: 1.1rem;
  font-size: 0.76rem;
}

/* --- Main article content --- */
.article-content {
  min-width: 0;
  padding: 1.5rem 0 3rem;
}

/* Better content spacing for readability */
.article-layout .entry-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #2A3F55;
}
.article-layout .entry-content p {
  margin-bottom: 1rem;
}
.article-layout .entry-content h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1B2838;
  margin: 2rem 0 0.75rem;
  padding-top: 0.5rem;
}
.article-layout .entry-content h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1B2838;
  margin: 1.5rem 0 0.6rem;
}
.article-layout .entry-content ul,
.article-layout .entry-content ol {
  margin: 0.4rem 0 1rem 1.4rem;
}
.article-layout .entry-content li {
  margin-bottom: 0.3rem;
  line-height: 1.6;
}
.article-layout .entry-content li p {
  margin-bottom: 0.25rem;
}
.article-layout .entry-content blockquote {
  border-left: 3px solid #3282b8;
  padding: 0.4rem 0 0.4rem 1.2rem;
  margin: 1rem 0;
  font-style: italic;
  color: #6B7C8D;
}
.article-layout .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.article-layout .entry-content th,
.article-layout .entry-content td {
  padding: 0.6rem 0.8rem;
  border: 1px solid #E5E7EB;
  text-align: left;
}
.article-layout .entry-content th {
  background: #f4f8fb;
  font-weight: 600;
  color: #0f4c75;
}
.article-layout .entry-content img {
  border-radius: 8px;
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

/* --- Right sidebar: Sibling navigation --- */
.sibling-sidebar {
  position: sticky;
  top: 70px;
  padding-top: 1.5rem;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.sibling-sidebar::-webkit-scrollbar { width: 3px; }
.sibling-sidebar::-webkit-scrollbar-thumb { background: #d0dbe5; border-radius: 3px; }

.sibling-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6B7C8D;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #3282b8;
}
.sibling-title a {
  color: inherit;
  text-decoration: none;
}
.sibling-title a:hover {
  color: #3282b8;
}

.sibling-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.sibling-nav ul li {
  margin-bottom: 0.1rem;
}
.sibling-nav ul li a {
  display: block;
  font-size: 0.82rem;
  color: #2A3F55;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  line-height: 1.35;
}
.sibling-nav ul li a:hover {
  background: #f4f8fb;
  color: #3282b8;
}
.sibling-nav ul li.current a {
  background: #f4f8fb;
  color: #0f4c75;
  font-weight: 600;
  border-left: 2px solid #3282b8;
  border-radius: 0 4px 4px 0;
}

/* Sibling sidebar widgets (key posts, related tools) */
.sibling-sidebar .widget {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #E5E7EB;
}
.sibling-sidebar .widget:last-child {
  border-bottom: none;
}
.sibling-sidebar .widget-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6B7C8D;
  margin-bottom: 0.6rem;
}
.sibling-sidebar .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sibling-sidebar .widget ul li {
  margin-bottom: 0.3rem;
}
.sibling-sidebar .widget ul li a {
  font-size: 0.82rem;
  color: #2A3F55;
  text-decoration: none;
  transition: color 0.2s;
}
.sibling-sidebar .widget ul li a:hover {
  color: #3282b8;
}

/* ===== RESPONSIVE: Article layout ===== */
@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr 220px;
  }
  .toc-sidebar {
    display: none;
  }
}
@media (max-width: 700px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .sibling-sidebar {
    position: static;
    max-height: none;
    padding-top: 0;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
  }
}
