/* Layout enhancements for Markdown-rendered pages */
.markdown-shell {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.markdown-shell__inner {
    max-width: 68rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/*
.markdown-shell__card {
    background-color: #ffffff;
    border-radius: .8rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 22px 45px -18px rgba(15, 23, 42, 0.35);
    padding: clamp(2rem, 4vw, 3.75rem);
}
    
.markdown-shell__card {
    background-color: #ffffff;
    border-radius: 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow:
        0 24px 60px -30px rgba(15, 23, 42, 0.28),
        0 10px 24px -16px rgba(59, 130, 246, 0.18);
    padding: clamp(2rem, 4vw, 4rem);
}
*/


.markdown-content {
    color: #334155;
    font-family: "Inter", "Roboto", sans-serif;
    font-size: 1.04rem;
    line-height: 1.8;
    word-break: break-word;
}

.markdown-content > *:first-child {
    margin-top: 0;
}

.markdown-content > *:last-child {
    margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    color: #0f172a;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.1rem;
    margin-top: 2.5rem;
}

.markdown-content h1 {
    font-size: clamp(1.8rem, 4.3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.18;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.markdown-content h2 {
    font-size: clamp(1.1rem, 2.7vw, 1.4rem);
    font-weight: 650;
    letter-spacing: -0.02em;
    margin-top: 2rem;
}

.markdown-content h3 {
    font-size: clamp(1.0rem, 2vw, 1.2rem);
    font-weight: 600;
    margin-top: 2rem;
}

.markdown-content h4 {
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    margin-top: 1.8rem;
}

.markdown-content p {
    margin-bottom: 1.25rem;
}

.markdown-content ul,
.markdown-content ol {
    margin: 1.1rem 0 1.75rem 1.35rem;
    padding: 0;
}

.markdown-content li {
    margin-bottom: 0.10rem;
    list-style-type: disc;;
}

.markdown-content ul li::marker {
    color: #4f85d7b7;
}

.markdown-content ol li::marker {
    color: #4f85d7b7;
    font-weight: 600;
}

.markdown-content strong {
    color: #0f172a;
    font-weight: 600;
}

.markdown-content a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.markdown-content blockquote {
    background: rgba(59, 130, 246, 0.08);
    border-left: 4px solid #2563eb;
    border-radius: 1rem;
    color: #1e3a8a;
    margin: 2rem 0;
    padding: 1.5rem 2rem;
}

.markdown-content code {
    background-color: rgba(15, 23, 42, 0.08);
    border-radius: 0.45rem;
    color: #0f172a;
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    font-size: 0.95rem;
    padding: 0.15rem 0.4rem;
}

.markdown-content pre {
    background-color: rgba(15, 23, 42, 0.9);
    border-radius: 1rem;
    color: #f8fafc;
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    font-size: 0.95rem;
    margin: 2.5rem 0;
    overflow-x: auto;
    padding: 1.75rem 2rem;
}

.markdown-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.markdown-content table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.9rem;
    box-shadow: 0 14px 32px -26px rgba(15, 23, 42, 0.4);
    font-size: 0.98rem;
    margin: 2rem 0 2.5rem;
    width: 100%;
}

.markdown-content th,
.markdown-content td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    border-right: 1px solid rgba(148, 163, 184, 0.18);
    padding: 0.85rem 1rem;
    text-align: left;
    vertical-align: top;
}

.markdown-content th {
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.92), rgba(226, 232, 240, 0.92));
    color: #0f172a;
    font-weight: 700;
}

.markdown-content tr:last-child td {
    border-bottom: 0;
}

.markdown-content th:last-child,
.markdown-content td:last-child {
    border-right: 0;
}

.markdown-content tbody tr:nth-child(even) td {
    background-color: rgba(248, 250, 252, 0.8);
}

.markdown-content hr {
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.6);
    margin: 2rem 0;
}

.markdown-content img,
.markdown-content video,
.markdown-content iframe {
    border-radius: 1rem;
    height: auto;
    margin: 2rem 0;
    max-width: 100%;
}

.markdown-content small {
    color: #4b5563;
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .markdown-shell__card {
        border-radius: 1.25rem;
        padding: 1rem;
    }

    .markdown-content {
        font-size: 1rem;
    }

    .markdown-content h1 {
        font-size: 2.1rem;
        max-width: none;
    }

    .markdown-content h2 {
        font-size: 1.6rem;
    }

    .markdown-content h3 {
        font-size: 1.22rem;
    }

    .markdown-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .markdown-content td {
        padding: 10px;
    }
}
