/* =========================================
   1. ПЕРЕМЕННЫЕ И ТЕМЫ (ТЕМИЗАЦИЯ)
   ========================================= */
:root {
    --primary-color: #1b54f5;
    --primary-hover: #1440bd;
    --accent-light: #eef2ff;
    --bg-color: #ffffff;
    --bg-secondary: #f8faff;
    --text-color: #2c3e50;
    --text-secondary: #5a6a7e;
    --card-bg: #ffffff;
    --shadow-sm: 0 2px 10px rgba(27, 84, 245, 0.05);
    --shadow-md: 0 8px 30px rgba(27, 84, 245, 0.12);
    --transition: all 0.3s ease;
    --font-size-base: 16px;
    --header-height: 70px;
}

body.dark-theme {
    --bg-color: #121212;
    --bg-secondary: #1a1a1a;
    --accent-light: #1e2230;
    --text-color: #e0e0e0;
    --text-secondary: #aaaaaa;
    --card-bg: #252525;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
}

body.dark-theme .upload-trash {
    --trash-success: #6bddb4;
    --trash-warning: #ffd089;
    --trash-link: #9bbcff;
    --trash-border: #46505d;
}

body.a11y-contrast {
    --primary-color: #000000;
    --primary-hover: #333333;
    --accent-light: #ffffff;
    --bg-color: #ffffff;
    --bg-secondary: #eeeeee;
    --text-color: #000000;
    --text-secondary: #000000;
    --card-bg: #ffffff;
    --shadow-sm: none;
    --shadow-md: none;
    border: 2px solid #000;
}

    body.a11y-contrast .card,
    body.a11y-contrast header,
    body.a11y-contrast .a11y-panel {
        border: 2px solid #000;
    }

    body.a11y-contrast .a11y-btn-group,
    body.a11y-contrast .a11y-btn {
        border-color: #000;
    }

body.a11y-no-images img,
body.a11y-no-images .hero-image-container {
    display: none !important;
}

/* Протанопия (Проблема с красным) */
body.a11y-protanopia {
    --rz-danger: #0052cc;
    --rz-danger-dark: #003d99;
    --rz-success: #b3b3b3;
}

/* Дейтеранопия (Проблема с зеленым) */
body.a11y-deuteranopia {
    --rz-success: #0078d4;
    --rz-success-dark: #005a9e;
    --rz-danger: #ff8c00;
}

/* Тританопия (Проблема с синим и желтым) */
body.a11y-tritanopia {
    --primary-color: #d13438;
    --primary-hover: #a80000;
    --rz-info: #d13438;
    --rz-warning: #00cc66;
}

body.a11y-no-images .hero-content {
    width: 100%;
    text-align: center;
    padding-right: 0;
}

/* =========================================
   2. БАЗОВЫЕ НАСТРОЙКИ (ГЛОБАЛЬНЫЕ)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    overflow-x: hidden;
    line-height: 1.7;
}

h1, h2, h3 {
    font-weight: 800;
    line-height: 1.3;
}

main {
    margin-top: var(--header-height);
}

.section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-bg-secondary {
    background-color: var(--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

    .section-title::after {
        content: '';
        display: block;
        width: 60px;
        height: 3px;
        background: var(--primary-color);
        margin: 10px auto 0;
        border-radius: 2px;
    }

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* =========================================
   3. ШАПКА И НАВИГАЦИЯ (HEADER)
   ========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 0 20px;
    height: var(--header-height);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0 auto;
    flex-grow: 1;
    justify-content: center;
}

    .nav-links a {
        text-decoration: none;
        color: var(--primary-color);
        font-weight: 600;
        font-size: 0.95rem;
        transition: var(--transition);
        position: relative;
        padding: 5px 0;
    }

        .nav-links a:hover,
        .nav-links a.active-link {
            color: var(--primary-hover);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: 0;
            left: 0;
            background-color: var(--primary-color);
            transition: var(--transition);
        }

        .nav-links a:hover::after,
        .nav-links a.active-link::after {
            width: 100%;
        }

.header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
}

.tool-btn {
    background: var(--accent-light);
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary-color);
    transition: var(--transition);
    flex-shrink: 0;
}

    .tool-btn:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-2px);
    }

.nav-links a.btn-cabinet,
.btn-cabinet {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(27, 84, 245, 0.2);
}

    .nav-links a.btn-cabinet:hover,
    .btn-cabinet:hover {
        color: white;
    }

.burger-btn {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-only-cabinet {
    display: none !important;
}

/* =========================================
   4. ПОИСК (SEARCH)
   ========================================= */
.search-wrapper {
    position: relative;
}

.search-input {
    position: absolute;
    right: 45px;
    top: 0;
    width: 0;
    opacity: 0;
    height: 40px;
    border: 2px solid var(--accent-light);
    border-radius: 20px;
    padding: 5px 20px;
    outline: none;
    transition: var(--transition);
    background: var(--card-bg);
    color: var(--text-color);
    pointer-events: none;
}

.search-wrapper.active .search-input {
    width: 220px;
    opacity: 1;
    pointer-events: auto;
    border-color: var(--primary-color);
}

/* =========================================
   5. ПАНЕЛЬ ДЛЯ СЛАБОВИДЯЩИХ (A11Y)
   ========================================= */
.a11y-panel {
    position: fixed;
    top: var(--header-height);
    right: -320px;
    width: 300px;
    background: var(--card-bg);
    border-left: 4px solid var(--primary-color);
    padding: 25px;
    box-shadow: var(--shadow-md);
    z-index: 999;
    transition: var(--transition);
    border-bottom-left-radius: 20px;
}

    .a11y-panel.open {
        right: 0;
    }

    .a11y-panel h3 {
        margin-bottom: 20px;
        font-size: 1.1rem;
        color: var(--primary-color);
    }

.a11y-control {
    margin-bottom: 20px;
}

    .a11y-control label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        font-size: 0.9rem;
    }

.a11y-btn-group {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--accent-light);
}

.a11y-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

    .a11y-btn:not(:last-child) {
        border-right: 1px solid var(--accent-light);
    }

    .a11y-btn:hover {
        background: var(--accent-light);
    }

/* =========================================
   6. ПЛАШКА ВОССТАНОВЛЕНИЯ СОЕДИНЕНИЯ BLAZOR
   ========================================= */
#components-reconnect-modal {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: none;
}

.reconnect-dialog {
    background: var(--card-bg, #ffffff);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
    border: 1px solid var(--accent-light, #eef2ff);
    display: none;
    animation: dropDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: block;
}

    #components-reconnect-modal.components-reconnect-show .show-dialog {
        display: block;
    }

    #components-reconnect-modal.components-reconnect-failed .failed-dialog {
        display: block;
    }

    #components-reconnect-modal.components-reconnect-rejected .rejected-dialog {
        display: block;
    }

#components-reconnect-modal::before {
    content: '';
    position: fixed;
    top: -20px;
    left: -50vw;
    width: 200vw;
    height: 200vh;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(3px);
    z-index: -1;
}

/* =========================================
   7. КНОПКИ И КОМПОНЕНТЫ
   ========================================= */
.cta-btn {
    display: inline-block;
    padding: 15px 35px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(27, 84, 245, 0.4);
    transition: var(--transition);
}

    .cta-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(27, 84, 245, 0.5);
        background: var(--primary-hover);
    }

#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(27, 84, 245, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 900;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

    #scrollToTop.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    #scrollToTop:hover {
        transform: translateY(-5px);
        background: var(--primary-hover);
    }

/* =========================================
   8. ГЛАВНЫЙ ЭКРАН (HERO)
   ========================================= */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90vh;
    padding-top: 50px;
    padding-bottom: 50px;
    position: relative;
    overflow: hidden;
}

    .hero::before {
        content: '';
        position: absolute;
        top: -100px;
        right: -100px;
        width: 600px;
        height: 600px;
        background: var(--accent-light);
        border-radius: 50%;
        z-index: -1;
        opacity: 0.7;
    }

.hero-content {
    flex: 1;
    padding-right: 60px;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.highlight {
    color: var(--primary-color);
    position: relative;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 500px;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-blob {
    width: 480px;
    height: 480px;
    background: var(--primary-color);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    overflow: hidden;
    position: relative;
    animation: morph 8s ease-in-out infinite;
    border: 5px solid white;
    box-shadow: var(--shadow-md);
}

    .hero-blob img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.05);
    }

.floating-badge {
    position: absolute;
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    z-index: 3;
    animation: float 4s ease-in-out infinite;
}

.badge-1 {
    top: 100px;
    left: -30px;
    animation-delay: 0s;
}

.badge-2 {
    bottom: 80px;
    right: -20px;
    animation-delay: 1.5s;
}

/* =========================================
   9. КАРТОЧКИ И КОНТЕНТ (КАРКАС)
   ========================================= */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 30px;
}

.card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

    .card:hover {
        transform: translateY(-10px);
        box-shadow: var(--shadow-md);
        border-color: var(--accent-light);
    }

/* Центрируем контент во всех карточках блока О себе */
#about .card {
    text-align: center;
}

.about-card-icon {
    width: 70px;
    height: 70px;
    background: var(--accent-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px; /* ИСПРАВЛЕНО: добавлено "auto" для выравнивания по центру блока */
    color: var(--primary-color);
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-item h4 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.review-card {
    position: relative;
    padding-top: 50px;
}

.review-quote-icon {
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 4rem;
    color: var(--accent-light);
    z-index: 0;
    opacity: 0.7;
}

.review-text {
    position: relative;
    z-index: 1;
    font-size: 1.05rem;
    font-style: italic;
    margin-bottom: 25px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: bold;
}

.author-info h5 {
    font-weight: 700;
    margin-bottom: 3px;
}

.author-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.blog-card {
    padding: 0;
    overflow: hidden;
}

.blog-thumb {
    height: 220px;
    width: 100%;
    background-color: var(--accent-light);
    position: relative;
    overflow: hidden;
}

    .blog-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition);
    }

.blog-card:hover .blog-thumb img {
    transform: scale(1.05);
}

.blog-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.blog-content {
    padding: 30px;
}

.blog-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.blog-content h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.blog-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .blog-link:hover {
        gap: 12px;
    }

.blog-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), #8CA8FF);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    position: absolute;
    top: 0;
    left: 0;
}

.placeholder-icon {
    font-size: 3.5rem;
    opacity: 0.8;
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

.placeholder-text {
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
    opacity: 0.9;
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
}

.blog-card:hover .blog-placeholder {
    background: linear-gradient(135deg, var(--primary-hover), #7496ff);
}

.blog-card:hover .placeholder-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* =========================================
   10. КОНТАКТЫ И ПОДВАЛ
   ========================================= */
.contact-container {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 60px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--accent-light);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.social-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    transition: var(--transition);
    text-decoration: none;
}

.sb-wa {
    background: #25D366;
}

.sb-tg {
    background: #0088cc;
}

.sb-vk {
    background: #0077FF;
}

.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

footer {
    background: var(--bg-secondary);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

/* =========================================
   11. АНИМАЦИИ (KEYFRAMES)
   ========================================= */
@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    50% {
        border-radius: 60% 40% 30% 70% / 70% 40% 50% 60%;
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes dropDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-spin {
    animation: smoothSpin 1.2s linear infinite;
    display: inline-block;
}

@keyframes smoothSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

    .fade-up.visible {
        opacity: 1;
        transform: translateY(0);
    }

/* =========================================
   12. АДАПТИВ И МЕДИА-ЗАПРОСЫ
   ========================================= */

/* Планшеты и небольшие ноутбуки (от 769px до 1100px) */
@media (max-width: 1100px) and (min-width: 769px) {
    header {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.1rem;
        gap: 8px;
    }

    .nav-links {
        gap: 12px;
    }

        .nav-links a {
            font-size: 0.85rem;
            white-space: nowrap;
        }

    .header-tools {
        gap: 8px;
    }

    .tool-btn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .nav-links a.btn-cabinet, .btn-cabinet {
        padding: 8px 15px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-blob {
        width: 380px;
        height: 380px;
    }
}

/* Стандартные телефоны (до 768px) */
@media (max-width: 768px) {
    .desktop-only, .desktop-search-btn, .search-wrapper {
        display: none !important;
    }

    .mobile-only-cabinet {
        display: block !important;
    }

    .mobile-only-cabinet > .btn-cabinet {
        display: inline-flex;
        align-items: center;
    }

    .navbar {
        justify-content: flex-start;
    }

    .logo {
        font-size: 1.1rem;
    }

    .header-tools {
        order: 2;
        margin-left: auto;
        margin-right: 10px;
        gap: 8px;
    }

    .burger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 3;
    }

    .tool-btn {
        width: 36px;
        height: 36px;
    }

    .nav-links {
        margin: 0;
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        height: calc(100dvh - var(--header-height));
        padding: 24px 16px;
        gap: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--card-bg);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        transition: var(--transition);
        box-shadow: inset 0 10px 20px -10px rgba(0,0,0,0.1);
    }

        .nav-links.active {
            left: 0;
        }

        .nav-links li {
            margin: 12px 0;
            flex-shrink: 0;
        }

        .nav-links a {
            font-size: 1.3rem;
        }

            .nav-links a::after {
                display: none;
            }

    .a11y-panel {
        width: 100%;
        right: -100%;
        border-left: none;
        border-top: 4px solid var(--primary-color);
        border-radius: 0 0 20px 20px;
    }

    .section {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 30px;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 50px;
        order: 1;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        margin: 0 auto 30px;
    }

    .hero-image-container {
        order: 2;
        width: 100%;
    }

    .hero-blob {
        width: 300px;
        height: 300px;
    }

    .floating-badge {
        transform: scale(0.8);
    }

    .badge-1 {
        top: 20px;
        left: 0;
    }

    .badge-2 {
        bottom: 20px;
        right: 0;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .contact-container {
        padding: 30px 20px;
    }

    .social-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* Компактные телефоны (iPhone SE, старые Android) */
@media (max-width: 400px) {
    .section-title {
        font-size: 1.6rem;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    header {
        padding: 0 10px;
    }

    .logo {
        font-size: 0.95rem;
        gap: 6px;
    }

    .tool-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .header-tools {
        gap: 6px;
        margin-right: 6px;
    }
}
/* Единый вывод Markdown для статей, страницы «О себе» и предпросмотра редактора. */
.markdown-content {
    overflow-wrap: anywhere;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: 1.5em 0 .55em;
    color: var(--text-color, inherit);
    line-height: 1.25;
    scroll-margin-top: 100px;
}

.markdown-content h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.markdown-content h2 { font-size: clamp(1.55rem, 3vw, 2rem); }
.markdown-content h3 { font-size: clamp(1.3rem, 2.5vw, 1.65rem); }
.markdown-content h4 { font-size: 1.25rem; }
.markdown-content h5 { font-size: 1.1rem; }
.markdown-content h6 { font-size: 1rem; }

.markdown-content p,
.markdown-content ul,
.markdown-content ol,
.markdown-content blockquote,
.markdown-content table,
.markdown-content pre,
.markdown-content figure {
    margin: 0 0 1.15rem;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 1.6rem;
}

.markdown-content blockquote {
    padding: .8rem 1rem;
    border-left: 4px solid var(--primary-color, #6f58c9);
    border-radius: 0 8px 8px 0;
    background: color-mix(in srgb, var(--primary-color, #6f58c9) 9%, transparent);
}

.markdown-content a {
    color: var(--primary-color, #5b45bd);
    text-decoration-thickness: .08em;
    text-underline-offset: .15em;
}

.markdown-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.markdown-content th,
.markdown-content td {
    min-width: 8rem;
    padding: .6rem .75rem;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    text-align: left;
}

.markdown-content th {
    background: color-mix(in srgb, var(--primary-color, #6f58c9) 10%, transparent);
}

.markdown-content code {
    padding: .12em .35em;
    border-radius: 4px;
    background: color-mix(in srgb, currentColor 9%, transparent);
}

.markdown-content pre {
    max-width: 100%;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 8px;
    background: #171a21;
    color: #f4f6fa;
}

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

.markdown-content .md-image {
    box-sizing: border-box;
    max-width: 100%;
}

.markdown-content .md-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.markdown-content .md-image-left { margin-right: auto; }
.markdown-content .md-image-center { margin-right: auto; margin-left: auto; }
.markdown-content .md-image-right { margin-left: auto; }
.markdown-content .md-image-width-25 { width: 25%; }
.markdown-content .md-image-width-50 { width: 50%; }
.markdown-content .md-image-width-75 { width: 75%; }
.markdown-content .md-image-width-100 { width: 100%; }

.markdown-content figcaption {
    margin-top: .45rem;
    color: color-mix(in srgb, currentColor 68%, transparent);
    font-size: .9rem;
    text-align: center;
}

.markdown-content .md-size-small { font-size: .875em; }
.markdown-content .md-size-normal { font-size: 1em; }
.markdown-content .md-size-large { font-size: 1.25em; }
.markdown-content .md-preset-accent {
    color: var(--primary-color, #5b45bd);
    font-weight: 700;
}
.markdown-content .md-preset-note {
    display: inline-block;
    padding: .12em .45em;
    border-radius: 5px;
    background: color-mix(in srgb, var(--primary-color, #6f58c9) 12%, transparent);
}

.markdown-content .footnotes {
    margin-top: 2rem;
    font-size: .9em;
}

@media (max-width: 640px) {
    .markdown-content .md-image-width-25,
    .markdown-content .md-image-width-50,
    .markdown-content .md-image-width-75 {
        width: 100%;
    }
}
