/* Shared article / case-study viewer styles (SPA + SEO prerender first paint) */
.pseudo-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(10, 18, 35, 0.82);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pseudo-modal-window {
    background: #fff;
    border-radius: 12px;
    width: 90vw;
    max-width: 1400px;
    min-height: 300px;
    max-height: 85vh;
    box-shadow: 0 8px 32px rgba(30, 40, 60, 0.25);
    position: relative;
    padding: 1rem 2.5rem 2.5rem 2.5rem;
    margin: 4rem 0 0 0;
    display: flex;
    flex-direction: column;
}

.cs-modal-window {
    max-width: 1500px;
    overflow-x: hidden;
}

.pseudo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1abc9c;
    padding: 0.65rem 1rem 0.65rem 1.5rem;
    margin: -1rem -2.5rem 0 -2.5rem;
    border-radius: 12px 12px 0 0;
}

.pseudo-modal-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255,255,255,0.90);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    flex: 1 1 auto;
    min-width: 0;
}

.pseudo-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.pseudo-modal-scroll-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: rgba(255,255,255,0.85);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.pseudo-modal-scroll-btn:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.app-view-body-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin: 0 0 1.2rem 0;
    line-height: 1.3;
    word-break: break-word;
}

.pseudo-modal-content {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 1.5rem;
}

.pseudo-modal-close {
    background: none;
    border: none;
    font-size: 2.6rem;
    line-height: 1;
    cursor: pointer;
    color: rgba(255,255,255,0.92);
    flex-shrink: 0;
    padding-left: 0.5rem;
    text-decoration: none;
}

.pseudo-modal-close:hover {
    color: #fff;
}

.pseudo-modal-action {
    display: block;
    margin: 2rem auto 0 auto;
    padding: 0.7rem 2.2rem;
    background: #24c7a8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    text-align: center;
    width: fit-content;
}

.pseudo-modal-action:hover { background: #1aa58a; color: #fff; }

.cs-read-full-btn {
    background: linear-gradient(135deg, #1a6fc4 0%, #24c7a8 100%);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.85rem 2.8rem;
    border-radius: 50px;
    box-shadow: 0 4px 18px rgba(36,199,168,0.25);
    margin: 0;
}

.cs-read-full-btn:hover { background: linear-gradient(135deg, #155fa0 0%, #1aa58a 100%); color: #fff; }

.cs-collapse-btn {
    background: #334155;
    font-size: 1rem;
    border-radius: 50px;
}

.cs-collapse-btn:hover { background: #1e293b; }

.cs-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.cs-main {
    flex: 0 0 65%;
    min-width: 0;
    overflow-x: hidden;
}

.cs-sidebar {
    flex: 0 0 33%;
    min-width: 0;
    position: sticky;
    top: 0;
    background: #f1f5f9;
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 12px rgba(15,23,42,0.08);
}

.cs-sidebar-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 10px rgba(15,23,42,0.15);
}

.cs-modal-window .pseudo-modal-content h1,
.cs-modal-window .pseudo-modal-content h2 {
    color: #0f4c75;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.cs-modal-window .pseudo-modal-content h3 {
    color: #0369a1;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1.6rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cs-modal-window .pseudo-modal-content h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.1em;
    background: linear-gradient(180deg, #0369a1, #0d9488);
    border-radius: 3px;
    flex-shrink: 0;
}

.cs-modal-window .pseudo-modal-content h4 {
    color: #1e40af;
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.2rem;
    margin-bottom: 0.3rem;
}

.cs-modal-window .pseudo-modal-content p {
    color: #334155;
    line-height: 1.75;
    margin-bottom: 0.8rem;
}

.cs-modal-window .pseudo-modal-content ul,
.cs-modal-window .pseudo-modal-content ol {
    color: #334155;
    padding-left: 1.4rem;
    line-height: 1.8;
}

.cs-modal-window .pseudo-modal-content li {
    margin-bottom: 0.35rem;
}

.cs-modal-window .pseudo-modal-content li::marker {
    color: #0d9488;
}

.cs-modal-window .pseudo-modal-content strong,
.cs-modal-window .pseudo-modal-content b {
    color: #0f172a;
}

.cs-modal-window .pseudo-modal-content em,
.cs-modal-window .pseudo-modal-content i {
    color: #64748b;
}

.cs-modal-window .pseudo-modal-content blockquote {
    background: #f0fdf9;
    border-left: 4px solid #0d9488;
    border-radius: 0 10px 10px 0;
    padding: 1rem 1.4rem;
    margin: 1rem 0 1.5rem 0;
    color: #0369a1;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 500;
}

.cs-sidebar h3 {
    color: #0369a1;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e2e8f0;
}

.cs-sidebar h3:first-of-type { margin-top: 0; }

.cs-sidebar p,
.cs-sidebar li {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 0.3rem;
}

.cs-sidebar li::marker { color: #0d9488; }

.cs-sidebar ul,
.cs-sidebar ol { padding-left: 1.2rem; }

.cs-sidebar code {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
    border-radius: 6px;
    padding: 0.18rem 0.6rem;
    font-size: 0.82rem;
    margin: 0.15rem 0.1rem;
    font-family: 'Consolas', monospace;
}

.cs-full-content {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.seo-listing {
    max-width: 900px;
    margin: 7rem auto 3rem auto;
    padding: 0 1.5rem 3rem 1.5rem;
    font-family: Lato, sans-serif;
    color: #334155;
}

.seo-listing h1 {
    color: #2c3e50;
    font-family: Montserrat, sans-serif;
}

.seo-listing ul { line-height: 1.8; padding-left: 1.2rem; }
.seo-listing a { color: #1abc9c; }

@media (max-width: 768px) {
    .pseudo-modal-window {
        width: 98vw;
        max-height: calc(100vh - 2rem);
        margin: 1rem 0 0 0;
        padding: 0.75rem 1.25rem 1.5rem 1.25rem;
    }

    .pseudo-modal-header {
        margin: -0.75rem -1.25rem 0 -1.25rem;
        padding: 0.55rem 0.75rem 0.55rem 1rem;
    }

    .app-view-body-title {
        font-size: 1.4rem;
    }

    .pseudo-modal-close {
        font-size: 2rem;
    }

    .cs-layout { flex-direction: column; }
    .cs-main { flex: 1 1 100%; }
    .cs-sidebar { flex: 1 1 100%; position: static; }
}

@media (max-width: 480px) {
    .pseudo-modal-window {
        width: 100vw;
        max-height: calc(100vh - 0.5rem);
        margin: 0.5rem 0 0 0;
        padding: 0.5rem 0.75rem 1.25rem 0.75rem;
        border-radius: 12px 12px 0 0;
    }

    .pseudo-modal-header {
        margin: -0.5rem -0.75rem 0 -0.75rem;
        padding: 0.5rem 0.6rem 0.5rem 0.85rem;
        border-radius: 12px 12px 0 0;
    }

    .app-view-body-title {
        font-size: 1.15rem;
    }

    .pseudo-modal-close {
        font-size: 1.7rem;
    }

    .pseudo-modal-action {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }

    .cs-read-full-btn {
        font-size: 0.95rem;
        padding: 0.65rem 1.25rem;
        white-space: normal;
        border-radius: 10px;
    }

    .cs-sidebar {
        padding: 1rem;
    }
}
