/* Knowledge article layout. Mirrors css/article.css for blog depth. */

.post-masthead {
  padding: calc(var(--header-h) + 48px) 0 36px;
  background: var(--cream);
}

.post-wrap {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
}

.post-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-dim);
}

.post-breadcrumb a:hover {
  color: var(--ink);
}

.post-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--cream-deep);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.post-date-inline {
  font-size: 13px;
  color: var(--text-dim);
}

.post-masthead h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.05rem, 4.2vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.038em;
  line-height: 1.1;
}

.post-lead {
  width: min(100%, 42rem);
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 16.5px;
  line-height: 1.62;
}

.post-body-section {
  padding: 24px 0 88px;
  background: var(--cream);
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
}

#articleContent h2 {
  margin: 40px 0 12px;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

#articleContent h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 500;
}

#articleContent p,
#articleContent li {
  color: var(--text-muted);
}

#articleContent p {
  margin: 0 0 16px;
  font-size: 16.5px;
  line-height: 1.65;
}

#articleContent ul,
#articleContent ol {
  margin: 0 0 20px;
  padding-left: 1.2em;
}

#articleContent a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.callout {
  margin: 0 0 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.callout.tip {
  background: var(--cream-deep);
}

.callout.warning {
  border-color: #e4d3c0;
  background: #fff8ef;
}

.data-table-wrap {
  overflow-x: auto;
  margin: 8px 0 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  background: var(--cream);
  font-weight: 500;
}

.step-list {
  margin: 0 0 24px;
  padding-left: 1.2em;
}

.post-aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
}

.post-toc {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.post-toc h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

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

.post-toc li + li {
  margin-top: 8px;
}

.post-toc a {
  font-size: 14px;
  color: var(--text-muted);
}

.post-toc a:hover,
.post-toc a.is-active {
  color: var(--ink);
}

.aside-cta {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.aside-cta p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.article-cta {
  margin-top: 36px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.article-cta h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 500;
}

.related-list {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.related-list li + li {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-aside {
    position: static;
  }
}
