.post-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: start;
  padding-bottom: 56px;
}
.post-body { max-width: 720px; }
.post-header {
  padding: 0 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.post-meta-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid #bfdbfe;
}
.post-meta-date {
  font-size: 12px;
  color: var(--text-3);
}
.post-header h1 {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -.8px;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
}
.post-header .post-lead {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.75;
}
.prose { font-size: 16px; line-height: 1.85; color: var(--text); }
.prose h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.3px;
  margin: 8px 0 16px;
  color: var(--text);
  line-height: 1.25;
}
.prose h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text);
}
.prose p { margin-bottom: 20px; }
.prose strong { font-weight: 700; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 20px 0; padding-left: 20px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(37,99,235,.3); }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.75;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--purple);
}
.prose hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.callout {
  background: var(--accent-dim);
  border: 1px solid #bfdbfe;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
}
.callout-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.post-panel {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 28px 0;
  display: grid;
  gap: 12px;
}
.panel-row {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.panel-row:last-child { border-bottom: none; }
.post-source-note {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 0 0 28px;
  display: grid;
  gap: 10px;
}
.post-source-note-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.post-source-note dl {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px 14px;
  margin: 0;
}
.post-source-note dt {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-3);
}
.post-source-note dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-2);
}
.post-source-note a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.post-source-note a:hover { text-decoration: underline; }
.panel-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}
.panel-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
}
.post-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.post-table th,
.post-table td {
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}
.post-table th {
  background: var(--bg-subtle);
  color: var(--text-3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.post-table tr:last-child td { border-bottom: none; }
.post-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.toc,
.sidebar-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.toc { background: var(--bg-subtle); margin-bottom: 20px; }
.toc-title,
.sidebar-card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-3);
  margin-bottom: 12px;
}
.toc-list { display: flex; flex-direction: column; gap: 6px; }
.toc-list a {
  font-size: 13px;
  color: var(--text-2);
  transition: color .15s;
  padding: 2px 0 2px 10px;
  border-left: 2px solid transparent;
}
.toc-list a:hover { color: var(--accent); border-left-color: var(--accent); }
.metric-line {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.metric-line:last-child { border-bottom: none; }
.metric-line strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 4px;
}
.metric-line span { font-size: 12px; color: var(--text-3); }
.author-mini {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.author-mini img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}
.author-mini strong { display: block; font-size: 14px; }
.author-mini span { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.related-post {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  text-decoration: none;
  color: inherit;
}
.related-post > div { flex: 1; min-width: 0; }
.related-post:last-child { border-bottom: none; }
.related-post:hover .related-post-title { color: var(--accent); }
.related-post-title { font-size: 13px; font-weight: 600; line-height: 1.4; transition: color .15s; }
.related-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.related-post-cat { font-size: 11px; color: var(--text-3); }
.related-post-date {
  min-width: 70px;
  flex: 0 0 70px;
  text-align: right;
  font-size: 11px;
  color: var(--text-3);
}
@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 24px;
  }
  .post-sidebar { position: static; margin-top: 0; }
  .post-header h1 { font-size: 28px; }
  .post-sidebar .toc,
  .post-sidebar .results-card,
  .post-sidebar .author-card { display: none; }
  .post-body .prose > p:last-child { margin-bottom: 0; }
  .prose hr { margin: 24px 0; }
  .related-card {
    border-radius: 14px;
    padding: 10px 14px;
    margin: 0;
  }
  .related-card .sidebar-card-title {
    margin-bottom: 4px;
    font-size: 11px;
  }
  .related-post { padding: 10px 0; }
  .related-post-title {
    font-size: 15px;
    line-height: 1.35;
  }
  .related-post-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
  }
  .related-post-cat,
  .related-post-date { font-size: 12px; }
  .related-post-date {
    min-width: 74px;
    flex: 0 0 74px;
    justify-self: end;
    text-align: right;
  }
}
@media (max-width: 600px) {
  .panel-row { grid-template-columns: 1fr; gap: 4px; }
  .post-source-note dl { grid-template-columns: 1fr; gap: 4px; }
  .post-table { font-size: 13px; }
  .post-table th,
  .post-table td { padding: 10px; }
}
