/* MuteSolo Blog — single-column editorial layout with brand-pink accents.
   Scoped under .ms-blog and .ms-article so it never bleeds into other pages. */

:root {
    --ms-pink: #e43a90;
    --ms-pink-soft: #fdeef5;
    --ms-text: #1a1a1a;
    --ms-text-soft: #555;
    --ms-text-muted: #888;
    --ms-border: #e8e8e8;
    --ms-bg-soft: #fafafa;
    --ms-radius: 12px;
}

/* ---------- Shared containers ---------- */

/* The site header (.header in app.css) is `position: absolute; top: 0`, so it
   overlays the top of the body. Blog pages are plain content (no full-bleed
   hero like the home page), so we explicitly push the content below the
   header's bottom edge.

   Measured header total height ≈ top-header (35px) + header-inner (~110-130px)
   ≈ 165-180px. Using 220px on desktop and 130px on mobile (where the nav
   collapses to a hamburger) gives breathing room without looking awkward. */

.ms-blog,
.ms-article {
    background: #fff;
    color: var(--ms-text);
    margin-top: 150px;
    padding: 16px 0 96px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (max-width: 992px) {
    .ms-blog,
    .ms-article {
        margin-top: 70px;
    }
}

.ms-blog__container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.ms-article__container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- List page header ---------- */

.ms-blog__header {
    text-align: center;
    margin-bottom: 32px;
}

.ms-blog__back {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--ms-text-soft);
    text-decoration: none;
    font-size: 14px;
}
.ms-blog__back:hover { color: var(--ms-pink); }

.ms-blog__h1 {
    font-size: 44px;
    line-height: 1.1;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.ms-blog__lede {
    font-size: 18px;
    color: var(--ms-text-soft);
    margin: 0 auto;
    max-width: 640px;
    line-height: 1.5;
}

.ms-blog__empty {
    text-align: center;
    color: var(--ms-text-muted);
    padding: 48px 0;
}

/* ---------- Category tabs ---------- */

.ms-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 8px 0 32px;
    overflow-x: auto;
}

.ms-cat-tab {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--ms-border);
    border-radius: 999px;
    color: var(--ms-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.ms-cat-tab:hover {
    border-color: var(--ms-pink);
    color: var(--ms-pink);
    text-decoration: none;
}
.ms-cat-tab.is-active {
    background: var(--ms-pink);
    border-color: var(--ms-pink);
    color: #fff;
}

/* ---------- Featured post ---------- */

.ms-featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    align-items: center;
    margin: 16px 0 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--ms-border);
}

.ms-featured__media {
    display: block;
    border-radius: var(--ms-radius);
    overflow: hidden;
    background: var(--ms-bg-soft);
    aspect-ratio: 16 / 10;
}
.ms-featured__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-featured__category {
    display: inline-block;
    color: var(--ms-pink);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-bottom: 12px;
}

.ms-featured__title {
    font-size: 32px;
    line-height: 1.2;
    margin: 0 0 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.ms-featured__title a {
    color: var(--ms-text);
    text-decoration: none;
}
.ms-featured__title a:hover { color: var(--ms-pink); }

.ms-featured__excerpt {
    color: var(--ms-text-soft);
    font-size: 17px;
    line-height: 1.55;
    margin: 0 0 16px;
}

.ms-featured__meta,
.ms-featured__dot {
    color: var(--ms-text-muted);
    font-size: 14px;
}
.ms-featured__dot { margin: 0 6px; }

@media (max-width: 760px) {
    .ms-featured { grid-template-columns: 1fr; gap: 16px; }
    .ms-featured__title { font-size: 26px; }
    .ms-blog__h1 { font-size: 32px; }
}

/* ---------- Post grid ---------- */

.ms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
}

@media (max-width: 960px) { .ms-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ms-grid { grid-template-columns: 1fr; } }

/* ---------- Post card ---------- */

.ms-post-card {
    display: flex;
    flex-direction: column;
}

.ms-post-card__media {
    display: block;
    border-radius: var(--ms-radius);
    overflow: hidden;
    background: var(--ms-bg-soft);
    aspect-ratio: 16 / 10;
    margin-bottom: 16px;
}
.ms-post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.ms-post-card__media:hover img { transform: scale(1.02); }

.ms-post-card__category {
    color: var(--ms-pink);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-bottom: 8px;
}

.ms-post-card__title {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: -0.005em;
}
.ms-post-card__title a {
    color: var(--ms-text);
    text-decoration: none;
}
.ms-post-card__title a:hover { color: var(--ms-pink); }

.ms-post-card__excerpt {
    color: var(--ms-text-soft);
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ms-post-card__meta {
    color: var(--ms-text-muted);
    font-size: 13px;
    margin-top: auto;
}
.ms-post-card__dot { margin: 0 6px; }

/* ---------- Pagination ---------- */

.ms-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 48px;
}
.ms-pagination__link {
    color: var(--ms-pink);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
}
.ms-pagination__link.is-disabled { color: var(--ms-text-muted); pointer-events: none; }
.ms-pagination__status { color: var(--ms-text-soft); font-size: 14px; }

/* ---------- Article detail ---------- */

.ms-breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    margin: 0 0 24px;
    font-size: 13px;
    color: var(--ms-text-muted);
}
.ms-breadcrumbs a {
    color: var(--ms-text-soft);
    text-decoration: none;
}
.ms-breadcrumbs a:hover { color: var(--ms-pink); }
.ms-breadcrumbs__sep { margin: 0 6px; color: var(--ms-text-muted); }

.ms-article-header { margin-bottom: 24px; }

.ms-article-header__category {
    display: inline-block;
    color: var(--ms-pink);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-bottom: 16px;
}

.ms-article-header__title {
    font-size: 44px;
    line-height: 1.15;
    margin: 0 0 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ms-article-header__dek {
    font-size: 20px;
    line-height: 1.5;
    color: var(--ms-text-soft);
    margin: 0 0 20px;
}

.ms-article-header__meta {
    color: var(--ms-text-muted);
    font-size: 14px;
}
.ms-article-header__dot { margin: 0 6px; }

@media (max-width: 600px) {
    .ms-article-header__title { font-size: 32px; }
    .ms-article-header__dek { font-size: 17px; }
}

.ms-article__hero {
    margin: 24px 0 32px;
    border-radius: var(--ms-radius);
    overflow: hidden;
    background: var(--ms-bg-soft);
}
.ms-article__hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- Inline TOC ---------- */

.ms-toc {
    background: var(--ms-bg-soft);
    border-radius: var(--ms-radius);
    padding: 20px 24px;
    margin: 0 0 32px;
}
.ms-toc__title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ms-text-muted);
    margin: 0 0 10px;
}
.ms-toc__list {
    margin: 0;
    padding-left: 20px;
    color: var(--ms-text);
}
.ms-toc__list li { margin: 6px 0; line-height: 1.4; }
.ms-toc__list a {
    color: var(--ms-text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.ms-toc__list a:hover {
    color: var(--ms-pink);
    border-bottom-color: var(--ms-pink);
}

/* ---------- Article body typography ---------- */

.ms-article__body {
    font-size: 18px;
    line-height: 1.75;
    color: var(--ms-text);
}

.ms-article__body p { margin: 0 0 1.25em; }

.ms-article__body h2 {
    font-size: 28px;
    line-height: 1.25;
    margin: 2em 0 0.6em;
    font-weight: 700;
    letter-spacing: -0.01em;
    scroll-margin-top: 80px;
}
.ms-article__body h3 {
    font-size: 22px;
    line-height: 1.3;
    margin: 1.6em 0 0.5em;
    font-weight: 700;
}
.ms-article__body h4 {
    font-size: 18px;
    margin: 1.4em 0 0.4em;
    font-weight: 700;
}

.ms-article__body a {
    color: var(--ms-pink);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ms-article__body a:hover { text-decoration: none; }

.ms-article__body ul,
.ms-article__body ol {
    margin: 0 0 1.25em;
    padding-left: 1.5em;
}
.ms-article__body li { margin-bottom: 0.4em; }

.ms-article__body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ms-radius);
    margin: 1.5em 0;
}

.ms-article__body figure { margin: 1.5em 0; }
.ms-article__body figcaption {
    font-size: 14px;
    color: var(--ms-text-muted);
    text-align: center;
    margin-top: 8px;
}

.ms-article__body blockquote,
.ms-article__body .ms-pull-quote {
    border-left: 4px solid var(--ms-pink);
    padding: 0.25em 1.25em;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--ms-text);
    font-size: 20px;
    line-height: 1.5;
}

.ms-article__body .ms-inline-cta {
    background: var(--ms-pink-soft);
    border: 1px solid var(--ms-pink);
    border-radius: var(--ms-radius);
    padding: 16px 20px;
    margin: 1.5em 0;
    font-size: 17px;
}
.ms-article__body .ms-inline-cta a {
    color: var(--ms-pink);
    font-weight: 600;
}

.ms-article__body code {
    background: var(--ms-bg-soft);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.ms-article__body pre {
    background: #1a1a1a;
    color: #f4f4f4;
    padding: 16px;
    border-radius: var(--ms-radius);
    overflow-x: auto;
    margin: 1.25em 0;
}
.ms-article__body pre code { background: transparent; padding: 0; color: inherit; }

/* ---------- Tags ---------- */

.ms-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 40px 0;
}
.ms-tag {
    display: inline-block;
    background: var(--ms-bg-soft);
    border: 1px solid var(--ms-border);
    border-radius: 999px;
    padding: 6px 14px;
    color: var(--ms-text-soft);
    font-size: 13px;
    text-decoration: none;
}
.ms-tag:hover {
    color: var(--ms-pink);
    border-color: var(--ms-pink);
    text-decoration: none;
}

/* ---------- Author bio ---------- */

.ms-author-bio {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 28px;
    background: var(--ms-bg-soft);
    border-radius: var(--ms-radius);
    margin: 32px 0;
}
.ms-author-bio__avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ms-pink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}
.ms-author-bio__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ms-author-bio__name {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 4px;
}
.ms-author-bio__text {
    color: var(--ms-text-soft);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

/* ---------- App CTA ---------- */

.ms-app-cta {
    margin: 40px 0;
    padding: 32px;
    border-radius: var(--ms-radius);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1530 60%, var(--ms-pink) 100%);
    color: #fff;
    text-align: center;
}
.ms-app-cta__title {
    font-size: 26px;
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
}
.ms-app-cta__sub {
    margin: 0 0 20px;
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}
.ms-app-cta__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.ms-app-cta__btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}
.ms-app-cta__btn--ios {
    background: #fff;
    color: #1a1a1a;
}
.ms-app-cta__btn--ios:hover { color: var(--ms-pink); text-decoration: none; }
.ms-app-cta__btn--android {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.3);
}
.ms-app-cta__btn.is-disabled { cursor: default; }

/* ---------- Related posts ---------- */

.ms-related {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--ms-border);
}
.ms-related__title {
    font-size: 24px;
    margin: 0 0 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.ms-related__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}
@media (max-width: 600px) {
    .ms-related__grid { grid-template-columns: 1fr; }
}
