.taxonomy-content {
  padding-bottom: 2rem;
}

.taxonomy-header {
  margin: 1.5rem auto 2rem;
  max-width: 960px;
  padding: 0 1rem;
}

.taxonomy-header p {
  color: var(--muted);
  margin-bottom: 0;
}

.taxonomy-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: 0 1rem 2rem;
}

.taxonomy-card,
.post-tags a {
  text-decoration: none;
}

.taxonomy-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 160px;
  padding: 1rem 1.1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.taxonomy-card:hover,
.taxonomy-card:focus {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

.taxonomy-card-title {
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 600;
}

.taxonomy-card-description {
  color: var(--muted);
  flex: 1 1 auto;
}

.taxonomy-card-count,
.tag-sidebar-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.post-tags a {
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
}

.post-tags a:hover,
.post-tags a:focus {
  border-color: var(--accent);
  color: var(--accent-strong);
}
.related-posts-section {
  margin: 2rem 0;
}

.related-posts-header {
  margin-bottom: 1rem;
}

.related-posts-header h3 {
  margin-bottom: 0.25rem;
}

.related-posts-header p {
  color: var(--muted);
  margin-bottom: 0;
}

.related-posts-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-post-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.related-post-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.75rem;
}

.related-post-card h4 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 0;
}

.related-post-card h4 a {
  color: var(--heading);
  text-decoration: none;
}

.related-post-card h4 a:hover,
.related-post-card h4 a:focus {
  color: var(--link-hover);
}

.related-post-card p {
  color: var(--text);
  margin-bottom: 0;
}

.related-post-shared-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.related-post-shared-tags a {
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  text-decoration: none;
}

.related-post-card-footer {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 1.1rem 1rem;
}

.related-post-card-footer span {
  color: var(--muted);
  font-size: 0.9rem;
}

.related-post-card-footer a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}