*, *::before, *::after {
    box-sizing: border-box;
}



body {
    margin: 0;
    padding: 12px 16px;
    /*background-color: #fedcdc; /* Розовый фон Brendan Gregg */
    background-color: #DEDEDE;
    color: #000000;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 18px;
    line-height: 1.35;
}

a {
    color: #0000ee;
    text-decoration: underline;
}

a:visited {
    color: #551a8b;
}

a:hover {
    color: #0000cc;
}

/* Сетка: 3 белые независимые колонки */
.container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 14px;
    max-width: 1440px;
    margin: 0 auto;
}

.sidebar-left,
.main-content,
.sidebar-right {
    background-color: #ffffff;
    box-sizing: border-box;
}

/* Левая навигация */
.sidebar-left {
    width: 160px;
    flex-shrink: 0;
    padding: 10px 12px;
    font-size: 13.5px;
}

.sidebar-left .menu-title {
    font-weight: bold;
    margin-bottom: 6px;
}

.sidebar-left ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-left li {
    margin-bottom: 4px;
    line-height: 1.25;
}

.sidebar-left li.active a {
    color: #aa0055;
    font-weight: bold;
}

/* Основной контент */
.main-content {
    flex: 1;
    min-width: 0;
    max-width: 960px;
    padding: 16px 24px 30px 24px;
}

/* Правый сайдбар */
.sidebar-right {
    width: 220px;
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 13.5px;
}

.recent-posts h3 {
    font-size: 13.5px;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 0 8px 0;
}

.recent-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    font-size: 12.5px;
    margin-bottom: 8px;
    line-height: 1.25;
}

.recent-posts .date {
    color: #444444;
}

/* Типографика */
h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 14px 0;
}

h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 19px;
    font-weight: bold;
    margin: 22px 0 8px 0;
}

p {
    margin: 0 0 12px 0;
}

ul {
    margin: 6px 0 14px 0;
    padding-left: 24px;
}

/* Переключатель языков в левом сайдбаре */
.lang-switcher {
    font-size: 13px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d0d0d0;
    line-height: 1.4;
}

.lang-switcher span.active {
    font-weight: bold;
    color: #000000;
}

.lang-switcher a {
    text-decoration: none;
    color: #0000ee;
}

.lang-switcher a:hover {
    text-decoration: underline;
}

/* Хронологический архив блога */
.archive-list {
    list-style: none;
    padding-left: 0;
}

.post-cats {
    font-size: 13px;
    color: #555555;
    font-style: italic;
}

.post-item {
    margin-bottom: 6px;
}

.post-date {
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    color: #444444;
}

/* Код */
pre {
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    background-color: #FFFCC4;
    border: 1px solid #cccccc;
    padding: 10px 12px;
    overflow-x: auto;
    line-height: 1.35;
    margin: 12px 0;
}

code {
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
}

/* Формулы */
.formula-box {
    text-align: center;
    padding: 10px;
    margin: 14px 0;
    background-color: #fafafa;
    border: 1px dashed #cccccc;
}

/* Сетка для картинок/снимков NDT */
.ndt-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0;
    text-align: center;
}

.ndt-image-grid img {
    max-width: 100%;
    border: 1px solid #666666;
}

.ndt-image-grid .img-title {
    font-size: 12px;
    margin-top: 4px;
    font-style: italic;
}

/* Мобильная адаптивность */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    .sidebar-left, .main-content, .sidebar-right {
        width: 100%;
    }
    .ndt-image-grid {
        grid-template-columns: 1fr;
    }
}

/* Печать */
@media print {
    body {
        background-color: #ffffff !important;
        padding: 0;
        font-size: 11pt;
    }
    .sidebar-left, .sidebar-right {
        display: none !important;
    }
    .main-content {
        max-width: 100%;
        padding: 0;
    }
    a {
        color: #000000;
    }
    pre, .ndt-image-grid, .formula-box {
        page-break-inside: avoid;
    }
}
