.article-page {
    width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
}

.article-page h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 12px;
    line-height: 1.3;
}

.article-subtitle {
    color: #aaa;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

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


.article-toc {
    position: sticky;
    top: 20px;
    background: #26314e;
    padding: 20px;
    border-radius: 8px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.toc-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #aaa;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #3d4870;
    font-weight: 600;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc-list a {
    display: block;
    padding: 7px 10px;
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: all 0.15s;
}

.toc-list a:hover {
    color: #4a90e2;
    background: rgba(74, 144, 226, 0.1);
    border-left-color: #4a90e2;
}

.toc-list a.active {
    color: #4a90e2;
    border-left-color: #4a90e2;
    background: rgba(74, 144, 226, 0.12);
    font-weight: 500;
}

.toc-sub {
    list-style: none;
    padding: 0 0 0 12px;
    margin: 4px 0 0 0;
}

.toc-sub a {
    font-size: 12px;
    color: #aaa;
    padding: 4px 10px;
}


.article-content {
    min-width: 0;
}

.article-section {
    background: #26314e;
    padding: 25px 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.article-section h2 {
    font-size: 1.5rem;
    color: #4a90e2;
    margin: 0 0 18px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #3d4870;
    line-height: 1.3;
}

.article-section h3 {
    font-size: 1.2rem;
    color: #4a90e2;
    margin: 24px 0 12px 0;
    line-height: 1.35;
}

.article-section p {
    color: #ccc;
    line-height: 1.75;
    margin-bottom: 14px;
}

.article-section strong {
    color: #fff;
    font-weight: 600;
}

.article-section em {
    color: #aaa;
    font-style: italic;
}

.article-section ul,
.article-section ol {
    color: #ccc;
    line-height: 1.75;
    padding-left: 24px;
    margin-bottom: 14px;
}

.article-section li {
    margin-bottom: 8px;
}

.article-section li::marker {
    color: #4a90e2;
}

.scenario-block {
    background: #1a1a2e;
    border-left: 3px solid #f7931a;
    padding: 18px 22px;
    border-radius: 0 8px 8px 0;
    margin: 18px 0;
}

.scenario-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #f7931a;
    font-weight: 600;
    margin-bottom: 12px;
}

.scenario-step {
    padding: 6px 0;
    color: #ccc;
    line-height: 1.5;
}

.scenario-step.warning {
    color: #f7931a;
}

.scenario-step.negative {
    color: #ff6b6b;
}


.formula-block {
    background: #1a1a2e;
    border: 1px solid #4a6fa5;
    padding: 20px 24px;
    border-radius: 8px;
    margin: 18px 0;
    text-align: center;
}

.formula {
    font-size: 18px;
    font-family: 'Courier New', monospace;
    color: #4a90e2;
    font-weight: 600;
    margin: 6px 0;
    letter-spacing: 0.5px;
}

.formula-example {
    font-family: 'Courier New', monospace;
    /*font-size: 14px;*/
    color: #ccc;
    line-height: 1.9;
    margin-top: 12px;
}

.formula-example .strike {
    color: #ff6b6b;
    text-decoration: line-through;
}

.formula-example .result {
    color: #ff6b6b;
    font-weight: 600;
}


.table-wrapper {
    overflow-x: auto;
    margin: 18px 0 22px;
    border-radius: 6px;
    border: 1px solid #4a6fa5;
}

.article-section table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #1a1a2e;
}

.article-section table thead {
    background: #2f3d63;
}

.article-section table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #4a6fa5;
}

.article-section table td {
    padding: 12px 16px;
    border-bottom: 1px solid #3d4870;
    color: #ccc;
    line-height: 1.5;
    vertical-align: top;
}

.article-section table tr:last-child td {
    border-bottom: none;
}

.article-section table tr:hover td {
    background: rgba(74, 144, 226, 0.08);
}

.table-good {
    color: #28a745 !important;
    font-weight: 500;
}

.table-bad {
    color: #ff6b6b !important;
    font-weight: 500;
}

.table-flag {
    color: #ff6b6b !important;
}

.checklist-number {
    display: inline-block;
    width: 22px;
    height: 22px;
    background: #4a90e2;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 8px;
    vertical-align: middle;
}


.pull-quote {
    font-size: 1.05rem;
    line-height: 1.65;
    color: #eee;
    font-weight: 500;
    border-left: 3px solid #4a90e2;
    padding: 8px 0 8px 20px;
    margin: 24px 0;
    font-style: italic;
}


.type-block {
    background: #1a1a2e;
    border: 1px solid #3d4870;
    border-radius: 8px;
    padding: 22px;
    margin: 20px 0;
}

.type-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.type-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #4a90e2;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.type-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
}


.case-block {
    background: #16213e;
    border-left: 2px solid #4a90e2;
    padding: 14px 20px;
    margin: 12px 0;
    border-radius: 0 6px 6px 0;
}

.case-block.danger {
    border-left-color: #ff3545;
}

.case-name {
    font-weight: 600;
    color: #4a90e2;
    font-size: 15px;
    margin-bottom: 6px;
}

.case-block.danger .case-name {
    color: #ff6b6b;
}

.case-block p {
    margin-bottom: 8px;
    color: #ccc;
}

.case-block p:last-child {
    margin-bottom: 0;
}

.lesson-block {
    background: #1e3a2e;
    border-left: 3px solid #28a745;
    padding: 14px 20px;
    margin: 18px 0 0;
    border-radius: 0 6px 6px 0;
}

.lesson-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #28a745;
    font-weight: 700;
    margin-bottom: 6px;
}

.lesson-block p {
    margin: 0;
    color: #ccc;
}

.psych-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0;
}

.psych-item {
    background: #1a1a2e;
    border-left: 3px solid #4a90e2;
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
}

.psych-name {
    font-weight: 600;
    color: #4a90e2;
    margin-bottom: 6px;
    font-size: 15px;
}

.psych-item p {
    margin: 0;
}


.rules-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    counter-reset: rule;
}

.rules-list li {
    counter-increment: rule;
    padding: 16px 18px 16px 60px;
    background: #1a1a2e;
    border-radius: 6px;
    margin-bottom: 10px;
    position: relative;
    border: 1px solid #3d4870;
}

.rules-list li::before {
    content: counter(rule);
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: #4a90e2;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.rules-list li strong {
    color: #fff;
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.rules-list li p {
    margin: 0;
}


.final-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 22px 0;
}

.final-box {
    padding: 22px;
    border-radius: 8px;
}

.final-box.trap {
    background: #3a1e1e;
    border: 1px solid #ff3545;
}

.final-box.real {
    background: #1e3a2e;
    border: 1px solid #28a745;
}

.final-box-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.final-box.trap .final-box-title {
    color: #ff6b6b;
}

.final-box.real .final-box-title {
    color: #28a745;
}

.final-box p {
    margin: 0;
    color: #ccc;
}


.disclaimer {
    margin-top: 30px;
    padding: 20px 24px;
    background: #1a1a2e;
    border-left: 3px solid #666;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    font-style: italic;
}


.back-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 18px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: #0056b3;
}


@media (max-width: 1024px) {
    .article-page {
        width: 100%;
        padding: 20px 10px;
    }
    .article-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .article-toc {
        position: static;
        max-height: none;
    }
    .final-comparison {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .article-page h1 {
        font-size: 1.5rem;
    }
    .article-section {
        padding: 18px 16px;
    }
    .article-section h2 {
        font-size: 1.25rem;
    }
    .type-block {
        padding: 16px;
    }
    .type-title {
        font-size: 1rem;
    }
    .article-section table {
        font-size: 13px;
    }
    .article-section table th,
    .article-section table td {
        padding: 8px 10px;
    }
}
