/* Shared content styles for the WordPress editor and published content. */
.cn-entry-content .cn-content-highlight,
.mce-content-body .cn-content-highlight,
.editor-styles-wrapper .cn-content-highlight {
    display: inline;
    max-width: 100%;
    margin: .12rem 0;
    padding: .12rem .35rem;
    border: 1px solid #cfe1f7;
    border-right: 3px solid var(--cn-primary, #0866d7);
    border-radius: 8px;
    background: #f3f8ff;
    color: #263b55;
    line-height: 2;
    vertical-align: baseline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.cn-entry-content .cn-content-highlight-box,
.mce-content-body .cn-content-highlight-box,
.editor-styles-wrapper .cn-content-highlight-box {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 1.2rem 0;
    padding: 1rem 1.15rem;
    border: 1px solid #cfe1f7;
    border-right: 4px solid var(--cn-primary, #0866d7);
    border-radius: 13px;
    background: linear-gradient(135deg, #f7faff 0%, #eef6ff 100%);
    color: #263b55;
    line-height: 2;
    overflow-wrap: anywhere;
}

.cn-entry-content .cn-content-highlight-box > :first-child,
.mce-content-body .cn-content-highlight-box > :first-child,
.editor-styles-wrapper .cn-content-highlight-box > :first-child { margin-top: 0; }

.cn-entry-content .cn-content-highlight-box > :last-child,
.mce-content-body .cn-content-highlight-box > :last-child,
.editor-styles-wrapper .cn-content-highlight-box > :last-child { margin-bottom: 0; }

.cn-entry-content .is-style-cafinet-highlight,
.editor-styles-wrapper .is-style-cafinet-highlight {
    display: block;
    margin: 1.25rem 0;
    padding: 1rem 1.15rem;
    border: 1px solid #cfe1f7;
    border-right: 4px solid var(--cn-primary, #0866d7);
    border-radius: 12px;
    background: #f3f8ff;
    color: #263b55;
    line-height: 2;
}

.cn-entry-content .is-style-cafinet-highlight > :last-child,
.editor-styles-wrapper .is-style-cafinet-highlight > :last-child {
    margin-bottom: 0;
}

.cn-entry-content .cn-content-table,
.cn-entry-content .wp-block-table table,
.mce-content-body .cn-content-table,
.mce-content-body table,
.editor-styles-wrapper .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    border: 1px solid #dce5ef;
}

.cn-entry-content .cn-content-table th,
.cn-entry-content .cn-content-table td,
.cn-entry-content .wp-block-table th,
.cn-entry-content .wp-block-table td,
.mce-content-body .cn-content-table th,
.mce-content-body .cn-content-table td,
.mce-content-body table th,
.mce-content-body table td,
.editor-styles-wrapper .wp-block-table th,
.editor-styles-wrapper .wp-block-table td {
    padding: .7rem .85rem;
    border: 1px solid #dce5ef;
    text-align: right;
    vertical-align: top;
}

.cn-entry-content .cn-content-table th,
.cn-entry-content .wp-block-table th,
.mce-content-body .cn-content-table th,
.mce-content-body table th,
.editor-styles-wrapper .wp-block-table th {
    background: #f0f6ff;
    color: #173b65;
    font-weight: 700;
}


/* Shared presentation for collapsible contents and article navigation. */
.cn-entry-content a,
.mce-content-body a,
.editor-styles-wrapper a {
    color: var(--cn-primary, #0866d7);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: currentColor;
}

.cn-entry-content a:hover,
.mce-content-body a:hover,
.editor-styles-wrapper a:hover {
    color: #064fa8;
    text-decoration-thickness: 2px;
}

.cn-content-toc {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 1.35rem 0 1.8rem;
    padding: 0;
    border: 1px solid #dce7f4;
    border-right: 4px solid var(--cn-primary, #0866d7);
    border-radius: 14px;
    background: linear-gradient(135deg, #fbfdff 0%, #f3f8ff 100%);
    color: #263b55;
    box-shadow: 0 7px 20px rgba(28, 74, 128, .055);
    overflow: hidden;
    box-sizing: border-box;
}

.cn-content-toc summary,
.cn-content-accordion > summary,
.cn-content-accordion-preview > summary {
    cursor: pointer;
    color: #173b65;
    font-weight: 700;
    line-height: 2;
    outline-offset: 4px;
}

.cn-content-toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: .85rem 1rem;
    color: #173b65;
    font-size: .98em;
    list-style: none;
    overflow-wrap: anywhere;
}

.cn-content-toc summary::-webkit-details-marker { display: none; }
.cn-content-toc summary::after {
    content: '+';
    display: inline-grid;
    place-items: center;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: #e6f1ff;
    color: var(--cn-primary, #0866d7);
    font-size: 1.2rem;
    line-height: 1;
}
.cn-content-toc details[open] > summary { border-bottom: 1px solid #e0eaf6; }
.cn-content-toc details[open] > summary::after { content: '−'; }

.cn-content-toc ol {
    display: grid;
    gap: .42rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: .8rem 2.1rem .9rem 1rem;
    box-sizing: border-box;
    list-style: decimal;
    overflow-wrap: anywhere;
}

.cn-content-toc li { min-width: 0; padding: .12rem 0; color: #8193a9; }
.cn-content-toc .cn-content-toc-level-3 { margin-right: .85rem; font-size: .94em; }
.cn-content-toc a {
    display: inline-block;
    max-width: 100%;
    color: var(--cn-primary, #0866d7);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.cn-content-toc a:hover { color: #064fa8; text-decoration-thickness: 2px; }
.cn-content-toc a:focus-visible { outline: 2px solid var(--cn-primary, #0866d7); outline-offset: 3px; border-radius: 3px; }

.cn-content-accordion,
.cn-content-accordion-preview {
    margin: 1rem 0;
    border: 1px solid #dce7f4;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.cn-content-accordion > summary,
.cn-content-accordion-preview > summary {
    padding: .85rem 1rem;
    background: #f5f9ff;
    color: #173b65;
}

.cn-content-accordion[open] > summary,
.cn-content-accordion-preview[open] > summary {
    border-bottom: 1px solid #e5edf7;
}

.cn-content-accordion-body { padding: .9rem 1rem; }
.cn-content-accordion-body > :last-child { margin-bottom: 0; }
.cn-content-accordion-editor { margin: 1rem 0; }
.cn-content-accordion-editor .cn-content-accordion-body { min-height: 48px; }

@media (max-width: 600px) {
    .cn-content-toc { margin: 1rem 0 1.4rem; border-radius: 11px; }
    .cn-content-toc summary { padding: .72rem .8rem; font-size: .92em; }
    .cn-content-toc ol { gap: .35rem; padding: .65rem 1.75rem .75rem .7rem; font-size: .92em; }
    .cn-content-toc .cn-content-toc-level-3 { margin-right: .55rem; }
    .cn-entry-content .cn-content-highlight-box,
    .mce-content-body .cn-content-highlight-box,
    .editor-styles-wrapper .cn-content-highlight-box { padding: .8rem .85rem; border-radius: 11px; }
    .cn-content-accordion > summary { padding: .75rem .85rem; }
    .cn-content-accordion-body { padding: .75rem .85rem; }
}
