.single-post {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

.single-post__categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
}

.single-post__categories a {
  color: var(--color-lime);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-decoration: none;
  text-transform: uppercase;
}

.single-post__categories a:hover,
.single-post__categories a:focus-visible {
  color: var(--color-white);
}

.single-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) 0;
  max-width: 720px;
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-on-dark-muted);
  font-family: var(--font-body);
  font-size: clamp(var(--text-sm), 1.5vw, var(--text-base));
  font-weight: var(--weight-light);
  line-height: var(--leading-body);
  letter-spacing: -0.02em;
}

.single-post__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin: 0;
  padding: 0;
}

.single-post__meta-item:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-inline: var(--space-3);
  border-radius: 50%;
  background: color-mix(in srgb, var(--text-on-dark-soft) 70%, transparent);
  flex-shrink: 0;
}

.single-post__meta-label {
  color: var(--text-on-dark-soft);
}

.single-post__meta a {
  color: var(--text-on-dark-muted);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.single-post__meta a:hover,
.single-post__meta a:focus-visible {
  color: var(--color-lime);
}

.single-post__author {
  max-width: 760px;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.single-post__author-name {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.single-post__author-name a {
  color: var(--heading);
  text-decoration: none;
}

.single-post__author-name a:hover,
.single-post__author-name a:focus-visible {
  color: var(--link);
}

.single-post__author-bio {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
}

.single-post__feature {
  width: min(100% - (var(--page-inline) * 2), var(--container));
  margin: var(--space-7) auto 0;
}

.single-post__feature-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.single-post__layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: clamp(var(--space-6), 4vw, var(--space-8));
  width: min(100% - (var(--page-inline) * 2), 1160px);
  margin: var(--space-8) auto 0;
  align-items: start;
}

.single-post__layout--solo {
  grid-template-columns: minmax(0, 1fr);
}

.single-post__toc {
  position: sticky;
  top: calc(var(--header-h) + var(--space-5));
  max-height: calc(100vh - var(--header-h) - var(--space-7));
  overflow: auto;
}

.single-post__toc-title {
  margin: 0 0 var(--space-5);
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: clamp(var(--text-xl), 2vw, var(--text-2xl));
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
}

.single-post__toc-list {
  position: relative;
  margin: 0;
  padding: 0 0 0 var(--space-5);
  list-style: none;
  border-left: 2px solid var(--border);
}

.single-post__toc-marker {
  position: absolute;
  left: -2px;
  top: 0;
  width: 2px;
  height: 0;
  background: var(--accent);
  transition: top var(--transition), height var(--transition);
}

.single-post__toc-item {
  margin: 0;
}

.single-post__toc-item + .single-post__toc-item {
  margin-top: var(--space-4);
}

.single-post__toc-item--h3 {
  padding-left: var(--space-3);
}

.single-post__toc-link {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  line-height: 1.45;
  text-decoration: none;
}

.single-post__toc-link.is-active {
  color: var(--heading);
  font-weight: var(--weight-semibold);
}

.single-post__toc-link:hover,
.single-post__toc-link:focus-visible {
  color: var(--heading);
}

.single-post__content {
  min-width: 0;
  max-width: 760px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

.single-post__content h2,
.single-post__content h3,
.single-post__content h4,
.single-post__content p[id] {
  scroll-margin-top: calc(var(--header-h) + var(--space-5));
}

.single-post__content h2,
.single-post__content h3,
.single-post__content h4 {
  color: var(--heading);
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
}

.single-post__content p[id] > strong:only-child,
.single-post__content p[id] > b:only-child {
  display: block;
  margin-top: var(--space-6);
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
}

.single-post__content h2 {
  margin: var(--space-7) 0 var(--space-4);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
}

.single-post__content h3 {
  margin: var(--space-6) 0 var(--space-3);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

.single-post__content p,
.single-post__content ul,
.single-post__content ol {
  margin: 0 0 var(--space-4);
}

.single-post__content a {
  color: var(--link);
}

.single-post__content a:hover,
.single-post__content a:focus-visible {
  color: var(--link-hover);
}

.single-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.single-post__recent {
  margin-top: var(--space-8);
}

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

  .single-post__toc {
    position: static;
    max-height: none;
  }

  .single-post__content {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .single-post__toc-marker {
    transition: none;
  }
}
