.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 17, 23, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.2px;
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav__link {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 7px;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}

.site-nav__link:hover {
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.05);
}

.site-nav__link.active {
    color: var(--accent);
    background: rgba(88, 166, 255, 0.08);
}

.site-footer {
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 28px 20px;
}

.site-footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
}

.site-footer__links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s;
}

.site-footer__links a:hover {
    color: var(--accent);
}

.site-footer__copy {
    color: #444d56;
    font-size: 12px;
}

.article-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 64px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s;
}

.breadcrumb a:hover {
    opacity: 0.75;
}

.breadcrumb__sep {
    opacity: 0.35;
    font-size: 10px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 276px;
    gap: 30px;
    align-items: start;
}

.article-layout>.article {
    min-width: 0;
}

.article-sidebar {
    position: sticky;
    top: 78px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}


@media (max-width: 860px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .article-sidebar {
        display: none;
    }
}

.mobile-cta {
    display: none;
}

@media (max-width: 860px) {
    .mobile-cta {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 13px;
        margin-bottom: 20px;
        background: rgba(46, 160, 67, 0.07);
        border: 1px solid rgba(46, 160, 67, 0.2);
        border-radius: 10px;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s;
    }

    .mobile-cta:active {
        background: rgba(46, 160, 67, 0.13);
    }

    .mobile-cta__icon {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(46, 160, 67, 0.13);
        border-radius: 7px;
        font-size: 16px;
    }

    .mobile-cta__body {
        flex: 1;
        min-width: 0;
    }

    .mobile-cta__label {
        font-size: 10px;
        font-weight: 700;
        color: #3fb950;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 1px;
    }

    .mobile-cta__title {
        font-size: 13px;
        font-weight: 600;
        color: #e6edf3;
    }

    .mobile-cta__arrow {
        color: #3fb950;
        font-size: 18px;
        flex-shrink: 0;
    }
}

.article__title {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    letter-spacing: -0.4px;
    margin-bottom: 12px;
}

.article__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12.5px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.article__meta-sep {
    opacity: 0.35;
}

.article__lead {
    font-size: 15.5px;
    line-height: 1.78;
    color: #c9d1d9;
    margin-bottom: 22px;
}

/* h2 - акцентная левая полоска вместо шаблонного bottom border */
.article h2 {
    font-size: 1.18rem;
    font-weight: 700;
    color: #fff;
    margin: 30px 0 11px;
    padding-left: 12px;
    border-left: 2.5px solid var(--accent);
    line-height: 1.35;
}

.article h3 {
    font-size: 0.97rem;
    font-weight: 600;
    color: #e6edf3;
    margin: 20px 0 7px;
}

.article p {
    font-size: 15px;
    line-height: 1.82;
    color: #b0bec8;
    margin-bottom: 14px;
}

.article strong {
    color: #e6edf3;
}

.article a {
    color: var(--accent);
    text-decoration: none;
}

.article a:hover {
    text-decoration: underline;
}

.article__formula {
    background: rgba(88, 166, 255, 0.05);
    border: 1px solid rgba(88, 166, 255, 0.18);
    border-radius: 9px;
    padding: 13px 16px;
    margin: 16px 0;
}

.article__formula-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.article__formula-body {
    font-size: 14px;
    font-weight: 600;
    color: #e6edf3;
    font-family: "Courier New", monospace;
    line-height: 1.55;
    word-break: break-word;
}

.article__example {
    margin: 16px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.article__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.article__table th {
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    white-space: nowrap;
}

.article__table td {
    padding: 9px 12px;
    color: #b0bec8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.035);
    font-size: 13px;
}

.article__table-result td {
    background: rgba(46, 160, 67, 0.06);
    color: #56d364;
    border-top: 1px solid rgba(46, 160, 67, 0.18);
    border-bottom: none;
}

.article__related {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.article__related-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.article__related-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.article__related-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 9px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s, background 0.15s;
}

.article__related-card:hover,
.article__related-card:active {
    border-color: rgba(88, 166, 255, 0.22);
    background: rgba(88, 166, 255, 0.045);
}

.article__related-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(88, 166, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.article__related-text {
    flex: 1;
    font-size: 13px;
    color: #c9d1d9;
    font-weight: 500;
}

.article__related-arrow {
    color: var(--muted);
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-widget {
    background: rgba(22, 27, 34, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 13px;
    padding: 15px;
}

.sidebar-widget--cta {
    border-color: rgba(46, 160, 67, 0.28);
    background: rgba(46, 160, 67, 0.045);
    border-radius: 11px;
    border-left: 3px solid rgba(88, 166, 255, 0.4);
    padding-left: 17px;
}

.sidebar-widget--nav {
    border-radius: 10px;
}

.sidebar-widget__title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 9px;
}

.sidebar-widget--cta .sidebar-widget__title {
    color: var(--success);
}

.sidebar-widget__text {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 13px;
}

.sidebar-widget__btn {
    display: block;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
}

.sidebar-widget__formula {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    font-family: "Courier New", monospace;
    background: rgba(88, 166, 255, 0.055);
    border-radius: 7px;
    padding: 8px 11px;
    margin-bottom: 8px;
    word-break: break-word;
}

.sidebar-widget__note {
    font-size: 12px;
    color: var(--muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-nav__link {
    display: block;
    padding: 7px 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.sidebar-nav__link:hover {
    color: var(--accent);
    background: rgba(88, 166, 255, 0.06);
}

@media (max-width: 600px) {
    .article-wrap {
        padding: 14px 14px 52px;
    }

    .article__title {
        font-size: 1.28rem;
    }

    .article h2 {
        font-size: 1.03rem;
        margin-top: 24px;
    }

    .article p {
        font-size: 14.5px;
    }

    .article__lead {
        font-size: 14.5px;
    }

    .article__formula-body {
        font-size: 13px;
    }

    .breadcrumb {
        margin-bottom: 14px;
        font-size: 12px;
    }

    .site-header__inner {
        height: 52px;
    }

    .site-nav__link {
        font-size: 12px;
        padding: 4px 8px;
    }
}

[data-theme="light"] .site-header {
    background: rgba(240, 244, 248, 0.92);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .site-logo {
    color: #0f172a;
}

[data-theme="light"] .site-nav__link {
    color: #64748b;
}

[data-theme="light"] .site-nav__link:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .site-nav__link.active {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.07);
}

[data-theme="light"] .site-footer {
    border-top-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .site-footer__links a {
    color: #64748b;
}

[data-theme="light"] .site-footer__links a:hover {
    color: var(--accent);
}

[data-theme="light"] .site-footer__copy {
    color: #94a3b8;
}

[data-theme="light"] .breadcrumb {
    color: #64748b;
}

[data-theme="light"] .breadcrumb a {
    color: var(--accent);
}

[data-theme="light"] .article__title {
    color: #0f172a;
}

[data-theme="light"] .article__meta {
    color: #64748b;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .article__lead {
    color: #334155;
}

[data-theme="light"] .article h2 {
    color: #0f172a;
    border-left-color: var(--accent);
}

[data-theme="light"] .article h3 {
    color: #1e293b;
}

[data-theme="light"] .article p {
    color: #475569;
}

[data-theme="light"] .article strong {
    color: #1e293b;
}

[data-theme="light"] .article__formula {
    background: rgba(37, 99, 235, 0.04);
    border-color: rgba(37, 99, 235, 0.18);
}

[data-theme="light"] .article__formula-body {
    color: #1e293b;
}

[data-theme="light"] .article__table th {
    background: rgba(0, 0, 0, 0.03);
    color: #64748b;
    border-bottom-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .article__table td {
    color: #475569;
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .article__table-result td {
    background: rgba(22, 163, 74, 0.06);
    color: #16a34a;
    border-top-color: rgba(22, 163, 74, 0.18);
}

[data-theme="light"] .article__related {
    border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .article__related-title {
    color: #94a3b8;
}

[data-theme="light"] .article__related-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.065);
}

[data-theme="light"] .article__related-card:hover {
    border-color: rgba(37, 99, 235, 0.22);
    background: rgba(37, 99, 235, 0.04);
}

[data-theme="light"] .article__related-text {
    color: #1e293b;
}

[data-theme="light"] .sidebar-widget {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .sidebar-widget--cta {
    background: rgba(22, 163, 74, 0.035);
    border-color: rgba(22, 163, 74, 0.22);
    border-left-color: rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .sidebar-widget__title {
    color: #94a3b8;
}

[data-theme="light"] .sidebar-widget--cta .sidebar-widget__title {
    color: #16a34a;
}

[data-theme="light"] .sidebar-widget__text {
    color: #64748b;
}

[data-theme="light"] .sidebar-widget__formula {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.055);
}

[data-theme="light"] .sidebar-widget__note {
    color: #94a3b8;
}

[data-theme="light"] .sidebar-nav__link {
    color: #64748b;
}

[data-theme="light"] .sidebar-nav__link:hover {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.05);
}

[data-theme="light"] .mobile-cta {
    background: rgba(22, 163, 74, 0.06);
    border-color: rgba(22, 163, 74, 0.18);
}

[data-theme="light"] .mobile-cta__title {
    color: #0f172a;
}

.article__weights-inline {
    margin: 20px 0;
    padding: 0;
    background: none;
    border: none;
}

.article__weights-labels {
    display: flex;
    margin-bottom: 6px;
}

.article__weights-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: center;
    flex-shrink: 0;
}

.article__weights-label--so {
    width: 25%;
    color: #58a6ff;
}

.article__weights-label--sor {
    width: 25%;
    color: #e3b341;
}

.article__weights-label--soch {
    width: 50%;
    color: #3fb950;
}

.article__weights-bar {
    display: flex;
    height: 9px;
    border-radius: 99px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    gap: 2px;
}

.article__weights-seg {
    height: 100%;
    transition: width 0.6s cubic-bezier(.2, .9, .25, 1);
    position: relative;
}

.article__weights-seg--so {
    width: 25%;
    background: linear-gradient(90deg, #3a7bd5, #58a6ff);
    border-radius: 99px 0 0 99px;
}

.article__weights-seg--sor {
    width: 25%;
    background: linear-gradient(90deg, #c5920a, #e3b341);
}

.article__weights-seg--soch {
    width: 50%;
    background: linear-gradient(90deg, #2ea043, #3fb950);
    border-radius: 0 99px 99px 0;
}

.article__weights-pcts {
    display: flex;
    margin-top: 5px;
}

.article__weights-pct {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    flex-shrink: 0;
}

.article__weights-pct--so {
    width: 25%;
    color: #58a6ff;
}

.article__weights-pct--sor {
    width: 25%;
    color: #e3b341;
}

.article__weights-pct--soch {
    width: 50%;
    color: #3fb950;
}

[data-theme="light"] .article__weights-label--so {
    color: #2563eb;
}

[data-theme="light"] .article__weights-label--sor {
    color: #d97706;
}

[data-theme="light"] .article__weights-label--soch {
    color: #16a34a;
}

[data-theme="light"] .article__weights-seg--so {
    background: linear-gradient(90deg, #1d4ed8, #3b82f6);
}

[data-theme="light"] .article__weights-seg--sor {
    background: linear-gradient(90deg, #b45309, #f59e0b);
}

[data-theme="light"] .article__weights-seg--soch {
    background: linear-gradient(90deg, #15803d, #22c55e);
}

[data-theme="light"] .article__weights-pct--so {
    color: #2563eb;
}

[data-theme="light"] .article__weights-pct--sor {
    color: #d97706;
}

[data-theme="light"] .article__weights-pct--soch {
    color: #16a34a;
}

@media (max-width: 600px) {
    .article__weights-label {
        font-size: 10px;
    }

    .article__weights-pct {
        font-size: 11px;
    }

    .article__weights-bar {
        height: 8px;
    }
}