
:root {
    --edu-text: #1a1a1a;
    --edu-muted: #8a8a8a;
    --edu-link: #2481cc;
    --edu-border: #ececec;
    --edu-bg: #ffffff;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--edu-bg);
    color: var(--edu-text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 19px;
    line-height: 1.7;
}

.edu-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 56px 24px 120px;
}


.edu-article-title {
    font-size: 40px;
    line-height: 1.18;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.edu-article-meta {
    color: var(--edu-muted);
    font-size: 16px;
    margin: 0 0 36px;
}
.edu-article-meta a { color: var(--edu-muted); }


.edu-content { font-size: 19px; }
.edu-content p { margin: 0 0 22px; }
.edu-content h3 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin: 38px 0 12px;
    letter-spacing: -0.01em;
}
.edu-content h4 {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
    margin: 30px 0 10px;
}
.edu-content a { color: var(--edu-link); text-decoration: none; }
.edu-content a:hover { text-decoration: underline; }
.edu-content strong, .edu-content b { font-weight: 700; }
.edu-content em, .edu-content i { font-style: italic; }
.edu-content ul, .edu-content ol { margin: 0 0 22px; padding-left: 28px; }
.edu-content li { margin: 0 0 8px; }
.edu-content blockquote {
    margin: 0 0 22px;
    padding: 2px 0 2px 22px;
    border-left: 3px solid var(--edu-text);
    font-style: italic;
}
.edu-content aside {
    margin: 0 0 22px;
    padding: 14px 18px;
    background: #f6f8fa;
    border-radius: 8px;
    font-size: 17px;
    color: #4a4a4a;
}
.edu-content pre {
    background: #f6f8fa;
    border-radius: 8px;
    padding: 14px 16px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 22px;
}
.edu-content code {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.88em;
    background: #f0f1f3;
    padding: 1px 5px;
    border-radius: 4px;
}
.edu-content pre code { background: none; padding: 0; }

.edu-content { overflow-wrap: anywhere; }
.edu-content pre { overflow-wrap: normal; }

.edu-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 0 0 22px;
    font-size: 16px;
    line-height: 1.45;
}
.edu-content th,
.edu-content td {
    border: 1px solid var(--edu-border);
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}
.edu-content th { background: #f6f8fa; font-weight: 700; }
.edu-content hr {
    border: none;
    border-top: 1px solid var(--edu-border);
    margin: 40px 0;
}
.edu-content figure { margin: 0 0 26px; position: relative; }

.edu-content figure.edu-fig-loading {
    min-height: 200px;
    background: #f4f5f7;
    border-radius: 8px;
}
.edu-content figure.edu-fig-loading img { opacity: 0; }
.edu-content figure.edu-fig-loading::after {
    content: '';
    position: absolute;
    top: 100px;
    left: 50%;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 3px solid #d6d9de;
    border-top-color: #2481cc;
    border-radius: 50%;
    animation: edu-spin .8s linear infinite;
}
.edu-content figure.edu-fig-loaded img { animation: edu-fade .35s ease; }

.edu-content figure.edu-fig-error {
    min-height: 90px;
    background: #f4f5f7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.edu-content figure.edu-fig-error::after {
    content: 'Не удалось загрузить изображение';
    color: var(--edu-muted);
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.edu-content figure.edu-fig-error img { display: none; }
@keyframes edu-spin { to { transform: rotate(360deg); } }
.edu-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
    
    background: #f1f2f4;
    transition: opacity .3s ease;
}

.edu-content img.edu-img-loading { opacity: .25; min-height: 48px; }
.edu-content img.edu-img-loaded { opacity: 1; }
.edu-content figcaption {
    text-align: center;
    color: var(--edu-muted);
    font-size: 15px;
    margin-top: 8px;
}
.edu-content .edu-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 0 0 26px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.edu-content .edu-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


.edu-article-footer {
    margin-top: 56px;
    padding-top: 22px;
    border-top: 1px solid var(--edu-border);
    color: var(--edu-muted);
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.edu-back-link {
    color: var(--edu-muted);
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.edu-back-link:hover { color: var(--edu-text); }


.edu-index-head { margin-bottom: 40px; }
.edu-index-title {
    font-size: 40px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}
.edu-index-sub { color: var(--edu-muted); font-size: 17px; margin: 0; }
.edu-card-list { display: flex; flex-direction: column; gap: 4px; }
.edu-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 18px 0;
    border-bottom: 1px solid var(--edu-border);
}
.edu-card:hover .edu-card-title { color: var(--edu-link); }
.edu-card-title {
    font-size: 23px;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
    transition: color .12s;
}
.edu-card-excerpt { color: var(--edu-muted); font-size: 16px; margin: 0; }
.edu-card-path {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: #b3b3b3;
    margin-top: 6px;
}
.edu-empty {
    text-align: center;
    color: var(--edu-muted);
    padding: 80px 0;
    font-size: 18px;
}


.edu-nf { text-align: center; padding: 100px 0; }
.edu-nf h1 { font-size: 64px; margin: 0 0 8px; }
.edu-nf p { color: var(--edu-muted); }

@media (max-width: 600px) {
    .edu-wrap { padding: 36px 18px 80px; }
    body { font-size: 18px; }
    .edu-article-title, .edu-index-title { font-size: 30px; }
    .edu-content h3 { font-size: 22px; }
}
