/* Single Post Template — uses theme tokens from :root */

.site--single-post {
    --mn-post-heading: color-mix(in srgb, var(--mn-theme-text) 88%, #000);
    --mn-post-muted: color-mix(in srgb, var(--mn-theme-text) 58%, #fff);
    --mn-post-body: var(--mn-theme-text);
    --mn-post-surface: #fff;
    --mn-post-border: #e8edf2;
    --mn-post-soft: #f8fafc;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 3.5rem;
    box-sizing: border-box;
    background:
        radial-gradient(ellipse 80% 40% at 100% 0%, color-mix(in srgb, var(--mn-theme-primary) 8%, transparent), transparent 55%),
        radial-gradient(ellipse 60% 30% at 0% 20%, color-mix(in srgb, var(--mn-theme-secondary, var(--mn-theme-primary)) 6%, transparent), transparent 50%);
}

.single-post-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5px;
}

/* Layout: content + sidebar */
.single-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.75rem;
    align-items: start;
}

.single-post-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.single-post-breadcrumb {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--mn-post-surface, #f8fafc);
    border: 1px solid var(--mn-post-border, #e8edf2);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    box-sizing: border-box;
}

.single-post-breadcrumb .mn-breadcrumb__list {
    flex-wrap: wrap;
    row-gap: 0.35em;
    font-size: 0.875rem;
}

.single-post-breadcrumb .mn-breadcrumb__link {
    color: #5b6b7a;
}

.single-post-breadcrumb .mn-breadcrumb__link:hover {
    color: var(--mn-theme-primary);
}

.single-post-breadcrumb .mn-breadcrumb__current {
    color: var(--mn-post-heading);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Card */
.site--single-post .single-post {
    background: var(--mn-post-surface, #fff);
    border: 1px solid var(--mn-post-border, #e8edf2);
    border-radius: 18px;
    box-shadow: 0 10px 36px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    margin-bottom: 0;
    padding: 0;
}

.single-post .entry-header {
    padding: 2rem 2rem 0;
    margin-bottom: 0;
    text-align: right;
}

.single-post .entry-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.single-post .entry-categories a {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    background: var(--mn-theme-primary-soft);
    color: var(--mn-theme-secondary);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.single-post .entry-categories a:hover {
    background: var(--mn-theme-primary);
    color: #fff;
}

.single-post .entry-title {
    font-size: clamp(1.55rem, 3.6vw, 2.2rem);
    font-weight: 800;
    color: var(--mn-post-heading);
    line-height: 1.45;
    margin: 0 0 1.25rem;
    letter-spacing: -0.02em;
}

.single-post .entry-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #edf1f5;
    color: #6b7c8f;
    font-size: 0.9rem;
}

.single-post .entry-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.single-post .entry-meta-item.byline {
    gap: 0.55rem;
}

.single-post .entry-meta-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--mn-post-border);
}

.single-post .entry-meta-item i {
    color: var(--mn-theme-primary);
    font-size: 0.85em;
}

.single-post .entry-meta-item a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.single-post .entry-meta-item a:hover {
    color: var(--mn-theme-primary);
}

.single-post .post-thumbnail {
    margin: 0;
    overflow: hidden;
    background: #f1f5f9;
}

.single-post .post-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 440px;
    object-fit: cover;
    border-radius: 0;
}

/* Content area — prevent overflow on mobile */
.single-post .entry-content {
    padding: 2rem;
    line-height: 1.95;
    color: var(--mn-post-body);
    font-size: 1.0625rem;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.single-post .entry-content > *:first-child {
    margin-top: 0;
}

.single-post .entry-content > *:last-child {
    margin-bottom: 0;
}

.single-post .entry-content p {
    margin-bottom: 1.35rem;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    color: var(--mn-post-heading);
    line-height: 1.4;
    margin: 2rem 0 1rem;
    font-weight: 700;
    scroll-margin-top: 100px;
}

.single-post .entry-content h2[id],
.single-post .entry-content h3[id],
.single-post .entry-content h4[id] {
    position: relative;
}

.single-post .entry-content h2 {
    font-size: 1.5rem;
}

.single-post .entry-content h3 {
    font-size: 1.25rem;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
    margin: 0 0 1.35rem;
    padding-right: 1.5rem;
}

.single-post .entry-content li {
    margin-bottom: 0.5rem;
}

.single-post .entry-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-right: 4px solid var(--mn-theme-primary);
    background: var(--mn-post-soft);
    border-radius: 0 10px 10px 0;
    color: #475569;
}

.single-post .entry-content a:not(.internal-link-card) {
    color: var(--mn-theme-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.single-post .entry-content a:not(.internal-link-card):hover {
    color: var(--mn-theme-primary-hover);
}

.single-post .entry-content img:not(.internal-link-card__image),
.single-post .entry-content video,
.single-post .entry-content iframe,
.single-post .entry-content embed,
.single-post .entry-content object {
    max-width: 100% !important;
    width: auto;
    height: auto !important;
    display: block;
    margin: 1.5rem auto;
    border-radius: 10px;
}

.single-post .entry-content figure,
.single-post .entry-content .wp-block-image,
.single-post .entry-content .wp-caption,
.single-post .entry-content .aligncenter,
.single-post .entry-content .alignleft,
.single-post .entry-content .alignright {
    max-width: 100%;
    margin: 1.5rem 0;
}

.single-post .entry-content figure img,
.single-post .entry-content .wp-block-image img,
.single-post .entry-content .wp-caption img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.single-post .entry-content figcaption,
.single-post .entry-content .wp-caption-text {
    margin-top: 0.65rem;
    font-size: 0.875rem;
    color: var(--mn-post-muted);
    text-align: center;
    line-height: 1.6;
}

.single-post .entry-content .wp-block-embed,
.single-post .entry-content .wp-block-embed__wrapper {
    max-width: 100%;
    overflow: hidden;
}

.single-post .entry-content .wp-block-embed iframe {
    width: 100%;
    min-height: 200px;
    aspect-ratio: 16 / 9;
}

.single-post .entry-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.single-post .entry-content pre,
.single-post .entry-content code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.single-post .entry-content .page-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #edf1f5;
    font-weight: 600;
}

/* Footer */
.single-post .entry-footer {
    padding: 0 2rem 2rem;
    margin-top: 0;
    border-top: none;
}

.single-post .tags-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #edf1f5;
}

.single-post .tags-links .tags-label {
    color: var(--mn-post-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.single-post .tags-links a {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.single-post .tags-links a:hover {
    background: var(--mn-theme-primary);
    color: #fff;
}

/* Table of Contents */
.post-toc {
    margin: 0 0 2rem;
    padding: 1.15rem 1.25rem;
    background: linear-gradient(135deg, var(--mn-post-toc-bg, #f8fbff) 0%, color-mix(in srgb, var(--mn-post-toc-bg, #f1f7fd) 85%, #fff) 100%);
    border: 1px solid var(--mn-post-border, #d7e6f5);
    border-radius: 14px;
}

.post-toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.post-toc__heading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.post-toc__icon {
    color: var(--mn-theme-primary);
    font-size: 1rem;
}

.post-toc__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mn-post-heading);
}

.post-toc__count {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    background: var(--mn-theme-primary-soft);
    color: var(--mn-theme-secondary);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-toc__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid #cfe3f5;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.post-toc__toggle:hover {
    border-color: var(--mn-theme-primary);
    color: var(--mn-theme-secondary);
}

.post-toc__toggle-icon {
    transition: transform 0.2s ease;
}

.post-toc--collapsed .post-toc__toggle-icon {
    transform: rotate(180deg);
}

.post-toc__body[hidden] {
    display: none;
}

.post-toc__list,
.post-toc__sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-toc__list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.post-toc__sublist {
    margin-top: 0.35rem;
    margin-right: 1rem;
    padding-right: 0.85rem;
    border-right: 2px solid #dbe8f5;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.post-toc__item--h3 .post-toc__link-text {
    font-size: 0.92rem;
}

.post-toc__item--h4 .post-toc__link-text {
    font-size: 0.86rem;
    color: var(--mn-post-muted);
}

.post-toc__link {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    color: var(--mn-post-body);
    text-decoration: none;
    line-height: 1.6;
    transition: background 0.2s ease, color 0.2s ease;
}

.post-toc__link::before {
    content: '';
    width: 6px;
    height: 6px;
    margin-top: 0.55rem;
    border-radius: 50%;
    background: #94a3b8;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.post-toc__link:hover,
.post-toc__link.is-active {
    background: var(--mn-theme-primary-soft);
    color: var(--mn-theme-primary-hover);
}

.post-toc__link:hover::before,
.post-toc__link.is-active::before {
    background: var(--mn-theme-primary);
    transform: scale(1.2);
}

.post-toc__link-text {
    flex: 1;
    min-width: 0;
}

/* Author card (below article) */
.single-post-author-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: start;
    padding: 1.4rem 1.5rem;
    background: var(--mn-post-surface);
    border: 1px solid var(--mn-post-border);
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.04);
}

.single-post-author-card__img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--mn-post-border), 0 8px 20px rgba(15, 23, 42, 0.08);
}

.single-post-author-card__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--mn-theme-primary);
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.single-post-author-card__name {
    margin: 0 0 0.55rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--mn-post-heading);
}

.single-post-author-card__name a {
    color: inherit;
    text-decoration: none;
}

.single-post-author-card__name a:hover {
    color: var(--mn-theme-primary);
}

.single-post-author-card__bio {
    margin: 0 0 0.85rem;
    color: var(--mn-post-muted);
    line-height: 1.8;
    font-size: 0.95rem;
}

.single-post-author-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--mn-theme-secondary);
    text-decoration: none;
}

.single-post-author-card__link:hover {
    color: var(--mn-theme-primary);
}

/* Post navigation */
.single-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0;
}

.single-post-nav__link {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.05rem 1.2rem;
    background: var(--mn-post-surface, #fff);
    border: 1px solid var(--mn-post-border, #e8edf2);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    min-width: 0;
}

.single-post-nav__link:hover {
    border-color: var(--mn-theme-primary);
    box-shadow: 0 8px 22px var(--mn-theme-primary-soft);
    transform: translateY(-2px);
}

.single-post-nav__link--next {
    text-align: left;
}

.single-post-nav__label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
}

.single-post-nav__title {
    color: var(--mn-post-heading);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.single-post-nav__link--empty {
    visibility: hidden;
    pointer-events: none;
}

/* Related Posts */
.related-posts {
    margin-top: 0;
    padding: 1.5rem;
    background: var(--mn-post-surface);
    border: 1px solid var(--mn-post-border);
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.04);
}

.related-posts__header {
    margin-bottom: 1.25rem;
}

.related-posts-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--mn-post-heading);
    margin: 0 0 0.35rem;
    position: relative;
    padding-right: 0.85rem;
}

.related-posts-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 4px;
    background: var(--mn-theme-primary);
    border-radius: 4px;
}

.related-posts__subtitle {
    margin: 0;
    color: var(--mn-post-muted);
    font-size: 0.9rem;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.related-posts__card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mn-post-border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.related-posts__card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--mn-theme-primary) 35%, var(--mn-post-border));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.related-posts__thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef2f7;
}

.related-posts__img,
.related-posts__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-posts__placeholder {
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

.related-posts__content {
    padding: 0.95rem 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.related-posts__date {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
}

.related-posts__card-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.55;
}

.related-posts__card-title a {
    color: var(--mn-post-heading);
    text-decoration: none;
}

.related-posts__card-title a:hover {
    color: var(--mn-theme-primary);
}

.related-posts__excerpt {
    margin: 0;
    font-size: 0.86rem;
    color: var(--mn-post-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar */
.single-post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 110px;
}

.single-post-sidebar__widgets > .widget,
.sp-widget {
    background: var(--mn-post-surface);
    border: 1px solid var(--mn-post-border);
    border-radius: 16px;
    padding: 1.1rem 1.15rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.single-post-sidebar__widgets {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.single-post-sidebar__widgets .widget-title,
.sp-widget__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.95rem;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--mn-post-heading);
}

.sp-widget__title i {
    color: var(--mn-theme-primary);
}

/* Author widget */
.sp-author {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 0.85rem;
}

.sp-author__avatar-img {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--mn-post-border);
}

.sp-author__label {
    display: block;
    font-size: 0.75rem;
    color: var(--mn-theme-primary);
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.sp-author__name {
    display: block;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--mn-post-heading);
    text-decoration: none;
    line-height: 1.35;
}

.sp-author__name:hover {
    color: var(--mn-theme-primary);
}

.sp-author__count {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: var(--mn-post-muted);
}

.sp-author__bio {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--mn-post-muted);
}

.sp-author__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--mn-theme-secondary);
    text-decoration: none;
}

.sp-author__link:hover {
    color: var(--mn-theme-primary);
}

/* Search */
.sp-widget--search .search-form,
.single-post-sidebar .search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
}

.sp-widget--search input[type="search"],
.single-post-sidebar .search-form input[type="search"] {
    width: 100%;
    margin: 0;
    padding: 0.7rem 0.85rem;
    border: 1px solid #dbe5ef;
    border-radius: 10px;
    background: var(--mn-post-soft);
    font: inherit;
    color: var(--mn-post-heading);
}

.sp-widget--search input[type="search"]:focus,
.single-post-sidebar .search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--mn-theme-primary);
    box-shadow: 0 0 0 3px var(--mn-theme-primary-soft);
}

.sp-widget--search input[type="submit"],
.sp-widget--search button,
.single-post-sidebar .search-form input[type="submit"],
.single-post-sidebar .search-form button {
    margin: 0;
    padding: 0.7rem 0.95rem;
    border: 0;
    border-radius: 10px;
    background: var(--mn-theme-primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* Post lists */
.sp-post-list,
.sp-rank-list,
.sp-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sp-post-list__item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0.75rem;
    align-items: center;
}

.sp-post-list__thumb {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: #eef2f7;
    flex-shrink: 0;
}

.sp-post-list__thumb img,
.sp-post-list__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-post-list__placeholder {
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.sp-post-list__title,
.sp-rank-list__title {
    display: block;
    color: var(--mn-post-heading);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5;
}

.sp-post-list__title:hover,
.sp-rank-list__title:hover {
    color: var(--mn-theme-primary);
}

.sp-post-list__date,
.sp-rank-list__meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.sp-rank-list__item {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 0.7rem;
    align-items: start;
}

.sp-rank-list__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--mn-theme-primary-soft);
    color: var(--mn-theme-secondary);
    font-size: 0.82rem;
    font-weight: 800;
}

.sp-rank-list__item:nth-child(-n+3) .sp-rank-list__index {
    background: var(--mn-theme-primary);
    color: #fff;
}

/* Categories */
.sp-cat-list .cat-item {
    margin: 0;
}

.sp-cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.sp-cat-list a:hover {
    background: var(--mn-theme-primary-soft);
    color: var(--mn-theme-primary-hover);
}

.sp-cat-list .mn-blog-cat__count,
.sp-cat-list .count {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Tags */
.sp-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.sp-tag-cloud__item {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.sp-tag-cloud__item:hover {
    background: var(--mn-theme-primary);
    color: #fff;
}

/* Comments within single post context */
.single-post-comments {
    width: 100%;
    max-width: none;
    margin-top: 1.75rem;
}

.site--single-post .comments-area {
    margin-top: 0;
    width: 100%;
    max-width: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .single-post-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 1.25rem;
    }

    .related-posts__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related-posts__card:last-child:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .single-post-layout {
        grid-template-columns: 1fr;
    }

    .single-post-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .sp-widget--author,
    .single-post-sidebar__widgets {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .single-post-container {
        padding: 1rem 0.75rem 0;
    }

    .single-post-breadcrumb {
        padding: 0.65rem 0.85rem;
        border-radius: 8px;
        font-size: 0.82rem;
        box-sizing: border-box;
    }

    .single-post .entry-header,
    .single-post .entry-content,
    .single-post .entry-footer {
        padding-right: 1.15rem;
        padding-left: 1.15rem;
    }

    .single-post .entry-header {
        padding-top: 1.35rem;
    }

    .single-post .entry-content {
        padding-top: 1.35rem;
        padding-bottom: 1.35rem;
        font-size: 1rem;
        line-height: 1.85;
    }

    .single-post .entry-meta-bar {
        gap: 0.6rem 1rem;
        font-size: 0.82rem;
    }

    .single-post .post-thumbnail img {
        max-height: 260px;
    }

    .post-toc {
        padding: 1rem;
        border-radius: 12px;
    }

    .post-toc__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .post-toc__sublist {
        margin-right: 0.65rem;
        padding-right: 0.65rem;
    }

    .single-post .entry-content .alignleft,
    .single-post .entry-content .alignright {
        float: none;
        margin: 1rem auto;
        display: block;
        text-align: center;
    }

    .single-post-author-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .single-post-nav {
        grid-template-columns: 1fr;
    }

    .single-post-nav__link--next {
        text-align: right;
    }

    .related-posts {
        padding: 1.15rem;
    }

    .related-posts__grid {
        grid-template-columns: 1fr;
    }

    .related-posts__card:last-child:nth-child(3) {
        grid-column: auto;
    }

    .single-post-sidebar {
        grid-template-columns: 1fr;
    }

    .single-post-comments {
        margin-top: 1.25rem;
    }

    .site--single-post .comments-area {
        padding: 1.15rem;
    }
}
