/* Shared by frontend rich content and the WordPress editor iframe.
   Repeated heading scope overrides the older article/card heading rules without !important on author formatting. */
.rich-content{--rc-text:#444;--rc-heading:#282b2e;--rc-brand:#283593;--rc-quote:#f1f2f3;--rc-card:#f7f8f9;--rc-code:#f1f2f3;--rc-line:rgba(136,136,136,.2);color:var(--rc-text);font-size:15px;line-height:1.875;overflow-wrap:anywhere}
html[data-theme="dark"] .rich-content{--rc-text:#a5a9b2;--rc-heading:#c7c9cf;--rc-brand:#b8b8b8;--rc-quote:#27292b;--rc-card:#303233;--rc-code:#27292b;--rc-line:#1b1d1f}
.rich-content p{font-size:inherit;line-height:1.875;margin:0 0 24px;color:inherit}
html .rich-content.rich-content.rich-content.rich-content :is(h1,h2,h3,h4,h5,h6){color:var(--rc-heading);font-weight:700;line-height:1.5;scroll-margin-top:110px}
.rich-content.rich-content.rich-content.rich-content>h1{font-size:24px}
.rich-content.rich-content.rich-content.rich-content>h2{position:relative;font-size:18px!important;margin:0 0 10px!important;padding:5px 0!important;border:0!important}
.rich-content.rich-content.rich-content.rich-content>h2::before,.rich-content.rich-content.rich-content.rich-content>h2::after{content:"";position:absolute;left:calc(-1 * var(--heading-edge,24px));bottom:auto;top:50%;width:8px;height:20px;background:#e6c977;transform:translateY(-50%);clip-path:none;border-radius:0}
.rich-content.rich-content.rich-content.rich-content>h2::after{left:calc(-1 * var(--heading-edge,24px) + 2px);transform:translateY(-50%) skewX(-10deg)}
.rich-content.rich-content.rich-content.rich-content>h3{font-size:15px;margin:0 0 10px;padding:0;border:0}
.rich-content.rich-content.rich-content.rich-content>h3::before,.rich-content.rich-content.rich-content.rich-content>h3::after,.rich-content.rich-content.rich-content.rich-content>h4::before,.rich-content.rich-content.rich-content.rich-content>h5::before,.rich-content.rich-content.rich-content.rich-content>h6::before{content:none}
.rich-content.rich-content.rich-content.rich-content>h4{font-size:16px;border-bottom:1px solid var(--rc-line);padding-bottom:8px}
.rich-content.rich-content.rich-content.rich-content>h5,.rich-content.rich-content.rich-content.rich-content>h6{font-size:16px}
.rich-content :is(ul,ol){padding-left:40px;margin:0 0 20px;font-size:14px;line-height:1.875;list-style-position:outside}
.rich-content ul>li{list-style-type:disc}
.rich-content ol>li{list-style-type:decimal}
.rich-content :is(ul,ol)>li{margin:8px 0 8px -23px;padding-left:5px;color:inherit;text-align:justify}
.rich-content :is(ul,ol)>li::marker{color:#283593;font-weight:700}
.rich-content li>p{margin-bottom:8px}
.rich-content li :is(ul,ol){margin:8px 0;padding-left:40px}
html .rich-content.rich-content blockquote{position:relative;margin:20px 0;padding:10px 20px;border:0;border-left:4px solid rgba(136,136,136,.2);border-radius:4px 14px 14px 4px;background:var(--rc-quote);color:var(--rc-text);line-height:1.5;box-shadow:none}
html .rich-content.rich-content blockquote::before,html .rich-content.rich-content blockquote::after{content:none}
html .rich-content.rich-content blockquote :is(ol,ul){font-size:14px;line-height:1.5}
html .rich-content.rich-content blockquote :is(ol,ul)>li{margin-top:8px;margin-bottom:8px;line-height:1.5;color:rgba(0,0,0,.75)}
html .rich-content.rich-content blockquote :is(ol,ul) li>p{font-size:inherit!important;line-height:1.5;margin:0}
html .rich-content.rich-content blockquote p{font-size:14px!important;line-height:1.6;margin:0 0 8px}
html .rich-content.rich-content blockquote>p:last-child,html .rich-content.rich-content blockquote>ol:last-child,html .rich-content.rich-content blockquote>ul:last-child{margin-bottom:0}
.rich-content hr{height:0;margin:19px 0;border:0;border-top:1px solid var(--rc-line)}
.rich-content table{display:table;width:100%;max-width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px;margin:20px 0}
.rich-content table :is(td,th){border:1px solid #fff;padding:10px 15px;min-width:0;overflow-wrap:anywhere}
.rich-content table tr:nth-child(odd){background:#f7f8f9}
.rich-content table tr:first-child{background:#e7eaee;font-weight:700;color:#283593}
.rich-content pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:20px;border-radius:6px;background:var(--rc-code);color:var(--rc-text);font-size:14px;line-height:1.5}
.rich-content img{max-width:100%;height:auto}
.rich-content :is(.highlight-02,.highlight-03){position:relative;z-index:0;isolation:isolate;box-decoration-break:clone;-webkit-box-decoration-break:clone;text-decoration:none}
.rich-content :is(.highlight-02,.highlight-03)::after{content:"";position:absolute;left:0;bottom:0;width:100%;height:40%;opacity:.7;z-index:-1;background:#f9e476;pointer-events:none}
.rich-content .highlight-03::after{background:#95ff88}
.rich-content .article-app-card{position:relative;margin:50px 0 30px!important;padding:15px 20px 20px;background:var(--rc-card);border-radius:14px;font-size:13.96px;line-height:1.7}
.rich-content .article-app-title{position:absolute;left:50%;top:-15px;transform:translateX(-50%);width:240px;max-width:calc(100% - 32px);padding:0 10px;border-radius:30px;background:#f6dc3e;color:#283593;text-align:center;line-height:30px;font-size:15px;font-weight:700;box-sizing:border-box}
.rich-content .article-app-title a,.rich-content .article-app-title a *{color:#283593!important;text-decoration:none;border:0}
.rich-content .article-app-body{min-width:0;padding-top:5px}
.rich-content .article-app-body p{font-size:inherit;line-height:1.7;margin-bottom:0}
.rich-content .article-rating{color:#f60}
.rich-content .download_link{position:relative;color:var(--rc-brand);text-decoration:none;border:0}
.rich-content .download_link::before{content:"";display:inline-block;width:13px;height:13px;margin-right:4px;vertical-align:-1px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 3h2v10l4-4 1.4 1.4L12 17l-6.4-6.6L7 9l4 4V3zM4 18h16v3H4z'/%3E%3C/svg%3E") center/contain no-repeat}
.rich-content .download_link::after{content:"下载";display:inline-block;margin-left:5px;padding:2px 6px;border-radius:0 5px 5px 5px;background:linear-gradient(to right,transparent -20%,#dceefe 100%);font-size:85%;font-weight:500;vertical-align:1px}
.rich-content :is(.article-thanks,.thanks){border-radius:4px;padding:5px 10px;background:linear-gradient(to right,#fff 0%,#edf9d7 100%);color:#484848;font-size:13px;line-height:1.8}
.rich-content :is(.article-thanks,.thanks) strong{color:green!important;font-weight:700}
.rich-content .article-thanks{display:inline-block}
.rich-content .article-code-card{position:relative;margin:0 0 24px}
.rich-content .article-code-title{padding-right:210px;margin:0 0 24px;font-size:15px;min-height:28px}
.rich-content .article-code-card>.thanks{position:absolute;right:0;top:-5px;margin:0}
.rich-content .article-code-card>.thanks:first-child{position:relative;display:table;margin-left:auto;margin-bottom:10px;top:auto}
.rich-content .copycode{position:relative;margin:0;background:var(--rc-code);border-radius:6px;line-height:1.5}
.rich-content .article-code-title~.copycode{margin-top:-15px}
.rich-content .copycode code{display:block;padding:20px;font:14px/1.5 Consolas,Monaco,monospace;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--rc-text);background:transparent;border:0}
.rich-content .article-copy{position:absolute;right:10px;top:10px;opacity:0;border:0;border-radius:6px;padding:6px 8px;background:#d4d4d4;color:rgba(0,0,0,.85);font-size:12px;line-height:1.5;cursor:pointer;transition:opacity .15s;box-shadow:none}
.rich-content .copycode:hover .article-copy,.rich-content .copycode:focus-within .article-copy{opacity:1}
.rich-content .article-copy.is-copied{background:#cfe9cf;color:green}
.rich-content .article-copy.is-error{background:#eddede;color:#ad3030}
.rich-content .article-section-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:16px 30px;margin:0 0 25px;padding:25px 10px 30px;border-top:1px solid rgba(0,0,0,.08);background:linear-gradient(to top,transparent 0%,#f2f4ff 120%);font-size:15px;font-weight:700}
.rich-content .article-section-nav a{position:relative;color:var(--rc-brand);border:0;padding:30px 0 8px;text-decoration:none;transition:opacity .15s}
.rich-content .article-section-nav a::before{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);width:21px;height:21px;background:currentColor;mask:var(--rc-nav-icon) center/contain no-repeat}
.rich-content .article-section-nav a:nth-child(4n+1){--rc-nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' d='M3 5h18v14H3zM9 9l6 3-6 3z'/%3E%3C/svg%3E")}
.rich-content .article-section-nav a:nth-child(4n+2){--rc-nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' d='M9 17V5l11-2v12M9 8l11-2'/%3E%3Cellipse cx='6' cy='18' rx='3' ry='2.5'/%3E%3Cellipse cx='17' cy='16' rx='3' ry='2.5'/%3E%3C/svg%3E")}
.rich-content .article-section-nav a:nth-child(4n+3){--rc-nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' d='M12 5C8 2 3 4 3 4v15s5-2 9 1c4-3 9-1 9-1V4s-5-2-9 1zm0 0v15'/%3E%3C/svg%3E")}
.rich-content .article-section-nav a:nth-child(4n+4){--rc-nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' d='M3 8h18v13H3zM8 2l4 5 4-5M7 13h6m-6 4h4m6-4v4'/%3E%3C/svg%3E")}
.rich-content .article-section-nav a:hover{opacity:.7}
.rich-content .article-fold{position:relative;margin:30px 0 40px;padding:20px;background:var(--rc-card);border-radius:14px}
.rich-content .article-fold.is-ready:not(.is-expanded)>.article-fold-body{max-height:230px;overflow:hidden;mask-image:linear-gradient(#000 65%,transparent)}
.rich-content .article-fold-toggle{position:absolute;z-index:1;bottom:-16px;left:50%;transform:translateX(-50%);width:120px;max-width:100%;padding:0 8px;background:#283593;border:1px solid #283593;border-radius:30px;color:#fff;font-family:inherit;font-weight:400;font-size:14px;line-height:30px;cursor:pointer}
.rich-content :is(.article-copy,.article-fold-toggle,.article-section-nav a,.download_link):focus-visible{outline:2px solid #5969cc;outline-offset:3px}
/* The editor displays full fold bodies, with copy controls as a preview. */
body.rich-content .article-fold-body{max-height:none!important;overflow:visible!important;mask-image:none!important}
body.rich-content .article-copy{opacity:1}
html[data-theme="dark"] .rich-content.rich-content blockquote{border-left-color:#1b1d1f}
html[data-theme="dark"] .rich-content :is(ul,ol)>li::marker{color:#a5a9b2}
html[data-theme="dark"] .rich-content table :is(td,th){border-color:#242728}
html[data-theme="dark"] .rich-content table tr:nth-child(odd){background:#27292a}
html[data-theme="dark"] .rich-content table tr:first-child{background:#3c4042;color:#e5c977}
html[data-theme="dark"] .rich-content .highlight-02::after{background:#1b1d1f}
html[data-theme="dark"] .rich-content .highlight-03{color:#fff}
html[data-theme="dark"] .rich-content .highlight-03::after{background:#283593}
html[data-theme="dark"] .rich-content .download_link::after{background:#283593;color:#fff}
html[data-theme="dark"] .rich-content .article-app-title a,html[data-theme="dark"] .rich-content .article-app-title a *{color:#283593!important}
html[data-theme="dark"] .rich-content :is(.thanks,.article-thanks){background:linear-gradient(to right,#2c2e2f 0%,#353737 100%);color:#8d9199}
html[data-theme="dark"] .rich-content .article-copy{background:#242424;color:#e7eaee}
html[data-theme="dark"] .rich-content .article-copy.is-copied{background:#204729;color:#b9e8bc}
html[data-theme="dark"] .rich-content .article-copy.is-error{background:#512c2c;color:#ffdada}
html[data-theme="dark"] .rich-content .article-section-nav{background:linear-gradient(to top,transparent 0%,#383838 120%)}
@media(hover:none),(pointer:coarse){.rich-content .article-copy{opacity:1}.rich-content .copycode code{padding-top:48px}}
@media(max-width:767px){
 .rich-content{font-size:14px}
 .rich-content.rich-content.rich-content.rich-content>h2{font-size:16px!important;padding:6px 0!important}
 .rich-content.rich-content.rich-content.rich-content>h2::before{left:calc(-1 * var(--heading-edge,18px));width:5px}.rich-content.rich-content.rich-content.rich-content>h2::after{left:calc(-1 * var(--heading-edge,18px) + 2px);width:5px}
 .rich-content.rich-content.rich-content.rich-content>h3{font-size:14px}.rich-content ul{font-size:13px}
 .rich-content .article-app-card{margin-top:40px!important;padding-bottom:10px;font-size:13px}
 .rich-content .article-app-title{font-size:13px}
 .rich-content .article-code-title{padding-right:0;margin-bottom:10px}
 .rich-content .article-code-card>.thanks{position:relative;display:table;margin:0 0 20px auto;top:auto}
 .rich-content .copycode code{font-size:13px;padding:48px 15px 15px}
 .rich-content .article-copy{opacity:1}
 .rich-content .article-section-nav{padding:20px 10px;gap:10px 20px;font-size:14px}
 .rich-content table :is(td,th){padding:8px}
}
@media(max-width:370px){.rich-content{font-size:13px}}
@media(prefers-reduced-motion:reduce){.rich-content *{scroll-behavior:auto!important;transition:none!important}}

body.rich-content{--heading-edge:24px;font-size:15px;line-height:1.875;color:var(--rc-text)}
@media(max-width:767px){body.rich-content{font-size:14px}}

html[data-theme="dark"] .rich-content.rich-content blockquote :is(ol,ul)>li{color:#a5a9b2}

/* V409: compact two-column information lists with a fading row fill. */
html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))){table-layout:fixed}
html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) :is(th,td){text-align:left!important;background:transparent!important;border:0!important;padding:10px 15px;vertical-align:middle}
html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr>:first-child,html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) col:first-child{box-sizing:border-box;width:132px!important;text-align:left!important}
html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr>:first-child{font-weight:600;border-right:1px solid #ffffffa6!important}
html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr>:first-child :is(p,div,span,strong){text-align:left!important}
html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) col:nth-child(2){width:auto!important}
html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr{background:linear-gradient(to right,#fff,transparent)!important}
html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr:nth-child(odd){background:linear-gradient(to right,#f4f5f6,transparent)!important}
html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr:first-child{background:linear-gradient(to right,#e7eaee,transparent)!important;color:#283593}
html[data-theme="dark"] .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr{background:linear-gradient(to right,#2b2d2f,transparent)!important}
html[data-theme="dark"] .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr:nth-child(odd){background:linear-gradient(to right,#303336,transparent)!important}
html[data-theme="dark"] .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr:first-child{background:linear-gradient(to right,#393d42,transparent)!important;color:#b8b8b8}
html[data-theme="dark"] .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr>:first-child{border-right-color:#ffffff0f!important}

@media(max-width:820px){html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) tr>:first-child,html .rich-content table:has(tr>:is(th,td):nth-child(2):last-child):not(:has(tr>:is(th,td):nth-child(3))) col:first-child{width:96px!important}}

/* Square thumbnails preserve the original file for the existing large-image viewer. */
html .rich-content .article-image-grid{display:grid;gap:10px;margin:20px 0;padding:0;width:100%;grid-template-columns:repeat(3,minmax(0,1fr))}
html .rich-content .article-image-grid.image-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
html .rich-content .article-image-grid>a{display:block;position:relative;min-width:0;aspect-ratio:1/1;padding:0!important;margin:0!important;overflow:hidden;border-radius:8px;background:var(--surface-2,#f1f2f3);text-decoration:none}
html .rich-content .article-image-grid>a>img{display:block!important;position:absolute;inset:0;box-sizing:border-box;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:1/1;object-fit:cover;margin:0!important;border:0;border-radius:inherit;cursor:zoom-in}
html .rich-content .article-image-grid>a::before,html .rich-content .article-image-grid>a::after{content:none!important}
@media(max-width:820px){html .rich-content .article-image-grid{gap:6px;margin:16px 0}html .rich-content .article-image-grid>a{border-radius:5px}}
