/* New palette is opt-in only. Original theme.css remains byte-identical. */
html[data-theme="dark"] {
 color-scheme: dark;
 --dark-bg:#0F141B; --dark-card:#1B232D; --dark-raised:#25313E; --dark-depth:#101820;
 --xjm-ink:#F0F5FA; --ink-2:#25313E;
 --text:#E2EAF2; --muted:#B6C2D0; --grey:#BAC4CF; --grey-text:#B6C2D0;
 --paper:#151D26; --line:rgba(212,227,242,.16); --line-strong:rgba(212,227,242,.32);
 --link:#80C8FF;
 --grad-soft:linear-gradient(120deg,#17332D,#1B2C40);
 --shadow:0 1px 2px rgba(0,0,0,.25),0 16px 40px -20px rgba(0,0,0,.65);
 --shadow-lg:0 30px 80px -30px rgba(0,0,0,.8);
}
html[data-theme="dark"] body{background:var(--dark-card);}
html[data-theme="dark"] .btn{--b-bg:var(--dark-depth);}
html[data-theme="dark"] .btn--light{background:var(--dark-card);}
html[data-theme="dark"] .btn--outline-light:hover{border-color:var(--dark-card);}
html[data-theme="dark"] .colorbar i:nth-child(4){background:var(--dark-depth);}
html[data-theme="dark"] .site-header{background:rgba(27,35,45,.78);}
html[data-theme="dark"] .site-header.is-scrolled{background:rgba(27,35,45,.92);}
html[data-theme="dark"] .main-nav .sub-menu{background:var(--dark-card);}
html[data-theme="dark"] .search-panel{background:var(--dark-card);}
html[data-theme="dark"] input[type="text"], html[data-theme="dark"] input[type="email"], html[data-theme="dark"] input[type="url"], html[data-theme="dark"] input[type="password"], html[data-theme="dark"] input[type="search"], html[data-theme="dark"] input[type="tel"], html[data-theme="dark"] input[type="number"], html[data-theme="dark"] input[type="date"], html[data-theme="dark"] select, html[data-theme="dark"] textarea{background:var(--dark-card);}
html[data-theme="dark"] .search-form .search-submit{background:var(--dark-depth);}
html[data-theme="dark"] .search-form .search-submit:hover{background:color-mix(in srgb, var(--dark-depth) 80%, var(--xjm-blue));}
html[data-theme="dark"] .section--ink{background:var(--dark-depth);color:var(--muted);}
html[data-theme="dark"] .section--ink .kicker{color:var(--muted);}
html[data-theme="dark"] .section--ink .section-lead{color:var(--muted);}
html[data-theme="dark"] .hero{background:linear-gradient(180deg, var(--dark-card) 0%, var(--paper) 100%);}
html[data-theme="dark"] .hero__eyebrow{background:rgba(27,35,45,.7);}
html[data-theme="dark"] .mat--book{background:var(--dark-depth);}
html[data-theme="dark"] .mat--book .mat__label{color:var(--muted);}
html[data-theme="dark"] .mat--bag{background:var(--dark-card);}
html[data-theme="dark"] .mat--card{background:var(--dark-card);}
html[data-theme="dark"] .mat__lines i:nth-child(1){background:var(--dark-depth);}
html[data-theme="dark"] .mat--swatch i:nth-child(4){background:var(--dark-depth);}
html[data-theme="dark"] .stage__tag{background:rgba(27,35,45,.7);}
html[data-theme="dark"] .marquee{background:var(--dark-card);}
html[data-theme="dark"] .service-card{background:var(--dark-depth);}
html[data-theme="dark"] .service-card__no{color:var(--muted);}
html[data-theme="dark"] .service-card__en{color:var(--muted);}
html[data-theme="dark"] .service-card__text{color:var(--muted);}
html[data-theme="dark"] .service-card--feature{background:linear-gradient(160deg, color-mix(in srgb, var(--xjm-green) 22%, var(--dark-depth)) 0%, var(--dark-depth) 55%, color-mix(in srgb, var(--xjm-blue) 22%, var(--dark-depth)) 100%);color:var(--muted);}
html[data-theme="dark"] .service-card--feature .service-card__text{color:var(--muted);}
html[data-theme="dark"] .case-card__placeholder{color:var(--muted);}
html[data-theme="dark"] .case-card--text:nth-child(2n) .case-card__placeholder{background:linear-gradient(140deg, var(--dark-depth), color-mix(in srgb, var(--xjm-blue) 40%, var(--dark-depth)));}
html[data-theme="dark"] .case-card__no{background:rgba(27,35,45,.9);}
html[data-theme="dark"] .filter-bar a{background:var(--dark-card);}
html[data-theme="dark"] .filter-bar a.is-active{background:var(--dark-depth);}
html[data-theme="dark"] .filter-bar--cases{background:var(--dark-card);}
html[data-theme="dark"] .quote-card{background:var(--dark-card);}
html[data-theme="dark"] .clients{background:var(--dark-card);}
html[data-theme="dark"] .clients__list li{color:var(--muted);}
html[data-theme="dark"] .post-card{background:var(--dark-card);}
html[data-theme="dark"] .cta__box{color:var(--muted);background:radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--xjm-green) 55%, var(--dark-depth)) 0%, transparent 50%), radial-gradient(120% 140% at 100% 100%, color-mix(in srgb, var(--xjm-blue) 65%, var(--dark-depth)) 0%, transparent 55%), var(--dark-depth);}
html[data-theme="dark"] .cta__kicker{color:var(--muted);}
html[data-theme="dark"] .cta__qr{background:var(--dark-card);}
html[data-theme="dark"] .widget{background:var(--dark-card);}
html[data-theme="dark"] .pagination .page-numbers.current{background:var(--dark-depth);}
html[data-theme="dark"] .error-404__o::before, html[data-theme="dark"] .error-404__o::after{background:var(--dark-depth);}
html[data-theme="dark"] .timeline__text{color:var(--muted);}
html[data-theme="dark"] .suite__col{background:var(--dark-card);}
html[data-theme="dark"] .contact-quick__item{background:var(--dark-card);}
html[data-theme="dark"] .contact-quick__qr{background:var(--dark-card);}
html[data-theme="dark"] .site-footer{background:var(--dark-depth);color:var(--muted);}
html[data-theme="dark"] .footer-brand .brand-text__desc{color:var(--muted);}
html[data-theme="dark"] .footer-contact a, html[data-theme="dark"] .footer-menu a{color:var(--muted);}
html[data-theme="dark"] .footer-qr{background:var(--dark-card);}
html[data-theme="dark"] .site-footer .widget{color:var(--muted);}
html[data-theme="dark"] .site-footer .widget a{color:var(--muted);}
html[data-theme="dark"] .footer-beian a{color:var(--muted);}
html[data-theme="dark"] .float-contact__btn{background:var(--dark-card);}
html[data-theme="dark"] .float-contact__btn span{background:var(--dark-depth);}
html[data-theme="dark"] .float-contact__pop{background:var(--dark-card);}
html[data-theme="dark"] .entry-content pre, html[data-theme="dark"] .wp-block-code{background:var(--dark-depth);color:var(--text);}
html[data-theme="dark"] .entry-content thead th{background:var(--dark-depth);}
html[data-theme="dark"] .wp-block-image.is-style-xjm-frame img, html[data-theme="dark"] .is-style-xjm-frame img{background:var(--dark-card);}
html[data-theme="dark"] .wp-block-button__link{background:var(--dark-depth);}
html[data-theme="dark"] .wp-block-group.is-style-xjm-cropmarks{background-image:linear-gradient(var(--dark-depth), var(--dark-depth)), linear-gradient(var(--dark-depth), var(--dark-depth)), linear-gradient(var(--dark-depth), var(--dark-depth)), linear-gradient(var(--dark-depth), var(--dark-depth));}
html[data-theme="dark"] .wp-block-file .wp-block-file__button{background:var(--dark-depth);}
html[data-theme="dark"] .has-ink-background-color{background-color:var(--dark-depth) !important;}
html[data-theme="dark"] .has-white-background-color{background-color:var(--dark-card) !important;}
html[data-theme="dark"] .has-ink-gradient-background{background:linear-gradient(160deg, #16233A 0%, var(--dark-depth) 100%) !important;}
@media (max-width: 1024px){
html[data-theme="dark"] .mobile-panel{background:var(--dark-card);}
}
@media (max-width: 680px){
html[data-theme="dark"] .float-contact{background:var(--dark-card);}
}
html[data-theme="dark"] .contact-steps__list li{background:var(--dark-card);}
html[data-theme="dark"] .contact-steps__call{background:var(--dark-depth);}
html[data-theme="dark"] .contact-steps__call small{color:var(--muted);}
html[data-theme="dark"] .contact-form .wpcf7-not-valid-tip{color:var(--text);}
html[data-theme="dark"] .contact-card{background:var(--dark-card);}
html[data-theme="dark"] .contact-card--hotline{background:var(--dark-depth);}
html[data-theme="dark"] .contact-card--hotline .contact-card__kicker{color:var(--muted);}
html[data-theme="dark"] .contact-card__label{color:var(--muted);}
html[data-theme="dark"] .contact-card__foot span{color:var(--muted);}
html[data-theme="dark"] .contact-qr__frame{background:var(--dark-card);}
html[data-theme="dark"] .contact-map{background:var(--dark-card);}
html[data-theme="dark"] .contact-map__visual{background-color:var(--paper);}
html[data-theme="dark"] .contact-map__road{background:var(--dark-card);}
html[data-theme="dark"] .contact-map__tag{background:var(--dark-card);}
html[data-theme="dark"] .flow-list__no{background:var(--dark-card);}
html[data-theme="dark"] .contact-flow__form{background:var(--dark-card);}
html[data-theme="dark"] .contact-form .bdxjm-message-form input:focus, html[data-theme="dark"] .contact-form .bdxjm-message-form textarea:focus{background:var(--dark-card);}
html[data-theme="dark"] .about-collage__badge{background:var(--dark-depth);}
html[data-theme="dark"] .about-collage__badge small{color:var(--muted);}
html[data-theme="dark"] .about-fields__list li{background:var(--dark-card);}
html[data-theme="dark"] .value-card{background:var(--dark-depth);color:var(--muted);}
html[data-theme="dark"] .price-band__arrow{background:var(--dark-depth);}
html[data-theme="dark"] .cat-card__link{background:var(--dark-card);}
html[data-theme="dark"] .cat-card__no{background:rgba(27,35,45,.92);}
html[data-theme="dark"] .filter-chip{color:var(--muted);}
html[data-theme="dark"] .fp-card{background:var(--dark-card);}
html[data-theme="dark"] .price-nav{background:rgba(27,35,45,.88);}
html[data-theme="dark"] .price-index__cat span{background:var(--dark-depth);}
html[data-theme="dark"] .price-item{background:var(--dark-card);}
html[data-theme="dark"] .price-item__cta:hover{background:var(--dark-depth);}
html[data-theme="dark"] .section--paper .price-item{background:var(--dark-card);}
html[data-theme="dark"] .pf-cats{background:var(--dark-card);}
html[data-theme="dark"] .pf-cats__list a.is-current{background:var(--dark-depth);}
html[data-theme="dark"] .pf-works__count{color:var(--muted);}
html[data-theme="dark"] .pf-works__note{color:var(--muted);}
html[data-theme="dark"] .pf-empty p{color:var(--muted);}
html[data-theme="dark"] .pf-pager__card{background:var(--dark-card);}
html[data-theme="dark"] .xjm-lb__cap{color:var(--muted);}
html[data-theme="dark"] .site-footer .widget li a{color:var(--muted);}

/* Hand-tuned material hierarchy and high-contrast accents. Images are never inverted. */
html[data-theme="dark"] body { background:var(--dark-bg); }
html[data-theme="dark"] ::selection { background:#02E16F; color:#0C1422; }
html[data-theme="dark"] .site-header { background:rgba(15,20,27,.9); border-bottom-color:var(--line); }
html[data-theme="dark"] .site-header.is-scrolled { background:rgba(15,20,27,.97); }
html[data-theme="dark"] .hero { background:linear-gradient(180deg,#0F141B,#151D26); }
html[data-theme="dark"] .hero__orb--g, html[data-theme="dark"] .hero__orb--b { opacity:.1; }
html[data-theme="dark"] .section--ink, html[data-theme="dark"] .pf-works { background:#0B1118; color:var(--text); }
html[data-theme="dark"] .service-card { background:#151F29; }
html[data-theme="dark"] .service-card:hover { background:#202E3B; }
html[data-theme="dark"] .service-card--feature { background:linear-gradient(145deg,#18332D,#16202A 55%,#192C40); }
html[data-theme="dark"] .cta__box { background:radial-gradient(ellipse at 0 0,#193D31 0%,transparent 60%),radial-gradient(ellipse at 100% 100%,#1A334B,transparent 65%),#101820; }
html[data-theme="dark"] .cta__box p, html[data-theme="dark"] .cta__kicker { color:var(--text); }
html[data-theme="dark"] .site-footer { background:#0A1017; color:var(--muted); box-shadow:inset 0 1px var(--line); }
html[data-theme="dark"] .site-footer .footer-brand .custom-logo { filter:none; }
html[data-theme="dark"] .clients__list li { color:#B6C2D0; }
html[data-theme="dark"] .btn { --b-bg:#25313E; --b-fg:#F0F5FA; border-color:var(--line-strong); }
html[data-theme="dark"] .btn--ghost { background:transparent; color:var(--text); --b-fg:#F0F5FA; }
html[data-theme="dark"] .btn--light { background:#E2EAF2; color:#0C1422; --b-fg:#0C1422; }
html[data-theme="dark"] .btn--gradient, html[data-theme="dark"] .badge,
html[data-theme="dark"] .article-hero__avatar, html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .service-card:hover .service-card__icon,
html[data-theme="dark"] .service-card--feature .service-card__icon,
html[data-theme="dark"] .contact-quick__icon, html[data-theme="dark"] .contact-steps__icon,
html[data-theme="dark"] .contact-map__pin, html[data-theme="dark"] .about-v2__seal,
html[data-theme="dark"] .filter-chip.is-active, html[data-theme="dark"] .pf-tile__zoom,
html[data-theme="dark"] .price-nav__tabs a em,
html[data-theme="dark"] .wp-block-button.is-style-xjm-gradient > .wp-block-button__link,
html[data-theme="dark"] .bypostauthor > .comment-body .fn::after,
html[data-theme="dark"] input[type="submit"], html[data-theme="dark"] button[type="submit"],
html[data-theme="dark"] .price-band__card, html[data-theme="dark"] .price-band__card:hover,
html[data-theme="dark"] .float-contact__btn:hover { color:#0C1422; --b-fg:#0C1422; }
html[data-theme="dark"] .price-band__card :is(h2,h3,strong,small) { color:#0C1422; }
html[data-theme="dark"] .price-band__kicker { opacity:1; }
html[data-theme="dark"] .price-band__arrow { background:#0C1422; color:#F0F5FA; }
html[data-theme="dark"] .case-card__link:hover .case-card__arrow,
html[data-theme="dark"] .pf-pager__card:hover .pf-pager__arrow { color:#0C1422; }
html[data-theme="dark"] .case-card__no, html[data-theme="dark"] .cat-card__no { background:rgba(15,20,27,.94); color:#F0F5FA; }
html[data-theme="dark"] .price-nav { background:rgba(21,29,38,.96); }
html[data-theme="dark"] .price-item { box-shadow:0 2px 0 rgba(0,0,0,.12); }
html[data-theme="dark"] .entry-content :is(th,td), html[data-theme="dark"] .wp-block-table :is(th,td) { color:var(--text); border-color:var(--line-strong); }
html[data-theme="dark"] .entry-content thead th { background:#25313E; color:#F0F5FA; }
html[data-theme="dark"] :is(input,textarea,select,option):not(:where([type="submit"],[type="button"],[type="reset"],[type="hidden"],[type="checkbox"],[type="radio"])) { background:#111922; color:#E2EAF2; border-color:#5C6D80; color-scheme:dark; }
html[data-theme="dark"] :is(input,textarea):not(:where([type="submit"],[type="button"],[type="reset"],[type="hidden"],[type="checkbox"],[type="radio"]))::placeholder { color:#A9B8C8; opacity:1; }
html[data-theme="dark"] :is(input,textarea,select):not(:where([type="submit"],[type="button"],[type="reset"],[type="hidden"],[type="checkbox"],[type="radio"])):focus { background:#182430; outline:2px solid #80C8FF; outline-offset:2px; }
html[data-theme="dark"] :focus-visible { outline-color:#80C8FF; }
html[data-theme="dark"] .bdxjm-message-form { background:#1B232D; color:#E2EAF2; border-color:#435364; box-shadow:none; }
html[data-theme="dark"] .bdxjm-message-form :is(h2,h3,label) { color:#F0F5FA; }
html[data-theme="dark"] .bdxjm-message-form__intro { color:#B6C2D0; }
html[data-theme="dark"] .bdxjm-message-form :is(input,textarea) { background:#111922; color:#E2EAF2; border-color:#5C6D80; }
html[data-theme="dark"] .bdxjm-message-form :is(input,textarea):focus { background:#182430; border-color:#80C8FF; }
html[data-theme="dark"] .bdxjm-message-form button[type="submit"] { background:var(--grad); color:#0C1422; }
html[data-theme="dark"] .bdxjm-message-form__notice { background:#2C291C; border-color:#B79948; color:#F5DB9A; }
html[data-theme="dark"] .bdxjm-message-form__notice--success { background:#16352B; border-color:#4CBA83; color:#9DE4BD; }
html[data-theme="dark"] .bdxjm-message-form__notice--error,
html[data-theme="dark"] .wpcf7-not-valid-tip { background:#3B2328; border-color:#E88C94; color:#FFBBC2; }
html[data-theme="dark"] .xjm-lb { background:#070B12; }
html[data-theme="dark"] .xjm-lb__cap { color:#CFDAE6; }
html[data-theme="dark"] .xjm-lb__btn { background:#1B2733; border-color:#66788A; color:#F0F5FA; }
html[data-theme="dark"] .xjm-lb__btn:hover { background:#304356; border-color:#80C8FF; }
html[data-theme="dark"] .xjm-lb__dot { background:#8494A5; }
html[data-theme="dark"] .xjm-lb__dot.is-active { background:var(--grad); }
html[data-theme="dark"] .pf-works__note { color:#B6C2D0; }
html[data-theme="dark"] .contact-qr__frame { background:#FFFFFF; }
@media (max-width:680px) {
 html[data-theme="dark"] .float-contact > a.float-contact__btn:first-child { color:#0C1422; }
}
@media print {
 html[data-theme="dark"] { --text:#111; --xjm-ink:#111; --muted:#333; --paper:#fff; --line:#999; color-scheme:light; }
 html[data-theme="dark"] body { background:#fff; color:#111; }
 html[data-theme="dark"] .appearance-toggle { display:none; }
}
html[data-theme="dark"] .bdxjm-message-form label span { color:#FFB38C; }
html[data-theme="dark"] .search-form .search-submit { background:#25313E; color:#F0F5FA; }
html[data-theme="dark"] .search-form .search-submit:hover { background:#304356; }
html[data-theme="dark"] .mat--poster, html[data-theme="dark"] .mat__logo { color:#0C1422; }
/* Mode-specific brand assets have no synthetic white backing or inversion. */

/* Stable dark header contrast, including the scrolled sticky state. */
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-header.is-scrolled { background:#0F141B; }
html[data-theme="dark"] .site-header .icon-btn { color:#F0F5FA; background:#1B232D; border-color:#66788A; }
html[data-theme="dark"] .site-header .icon-btn:hover { background:#25313E; border-color:#80C8FF; }

/* 1.2.2: single-post reading surface. Paint only: original reading widths/spacing stay intact. */
html[data-theme="dark"] body.single-post { background:#0F141B; }
html[data-theme="dark"] body.single-post .single-article { position:relative; isolation:isolate; }
html[data-theme="dark"] body.single-post .single-article::before {
 content:""; position:absolute; z-index:-1; pointer-events:none;
 top:calc(clamp(48px,7vw,96px) - clamp(32px,3vw,44px)); bottom:24px;
 left:max(8px,calc((100% - 1320px)/2)); right:max(8px,calc((100% - 1320px)/2));
 background:#1B232D; border:1px solid #344252; border-radius:20px;
 box-shadow:0 18px 56px -32px rgba(0,0,0,.65);
}
html[data-theme="dark"] body.single-post .single-article > .article-hero { background:transparent; }
html[data-theme="dark"] body.single-post .single-article > .article-hero > .page-hero__grid { opacity:.25; }
html[data-theme="dark"] body.single-post .single-article .entry-content :is(pre,.wp-block-code) { background:#111922; color:#E2EAF2; box-shadow:inset 0 0 0 1px #344252; }
html[data-theme="dark"] body.single-post .single-article .entry-content blockquote { background:#15202B; color:#E2EAF2; border-left-color:#02E16F; border-radius:0 12px 12px 0; }
html[data-theme="dark"] body.single-post .single-article .entry-content :is(table,.wp-block-table) { background:#18212B; }
html[data-theme="dark"] body.single-post .single-article .entry-content thead th { background:#25313E; color:#F0F5FA; }
html[data-theme="dark"] body.single-post .single-article .entry-content :is(th,td) { border-color:#435364; }
html[data-theme="dark"] body.single-post .single-article .entry-content a { color:#80C8FF; }
html[data-theme="dark"] body.single-post .single-article .entry-content a:hover { color:#B5DFFF; }
@media (max-width:680px) {
 html[data-theme="dark"] body.single-post .single-article::before { top:calc(clamp(48px,7vw,96px) - 18px); bottom:16px; left:max(4px,calc(var(--gutter) - 18px)); right:max(4px,calc(var(--gutter) - 18px)); border-radius:16px; }
}

/* 1.2.3: comment submit is an action, not a dark text-entry field. */
html[data-theme="dark"] .comments-area .comment-form :is(input[type="submit"],button[type="submit"]) {
 background:#02E16F; background-image:none; color:#0C1422; --b-fg:#0C1422; --b-bg:#02E16F;
 border:0; font-weight:700; opacity:1; cursor:pointer;
}
html[data-theme="dark"] .comments-area .comment-form :is(input[type="submit"],button[type="submit"]):hover:not(:disabled) { background:#36ED91; color:#0C1422; }
html[data-theme="dark"] .comments-area .comment-form :is(input[type="submit"],button[type="submit"]):focus-visible { outline:3px solid #80C8FF; outline-offset:4px; box-shadow:0 0 0 2px #111922; }
html[data-theme="dark"] .comments-area .comment-form :is(input[type="submit"],button[type="submit"]):active:not(:disabled) { background:#00C861; color:#0C1422; transform:translateY(0); }
html[data-theme="dark"] .comments-area .comment-form :is(input[type="submit"],button[type="submit"]):disabled { background:#314153; color:#BAC8D6; --b-fg:#BAC8D6; cursor:not-allowed; opacity:1; transform:none; box-shadow:none; }
html[data-theme="dark"] .comments-area { color:#E2EAF2; }
html[data-theme="dark"] .comments-area :is(label,.comment-content) { color:#E2EAF2; }
html[data-theme="dark"] .comments-area :is(.comment-notes,.logged-in-as,.comment-awaiting-moderation) { color:#B6C2D0; }
html[data-theme="dark"] .comments-area .required { color:#FFB38C; }
html[data-theme="dark"] .comments-area :is(.comment-reply-link,#cancel-comment-reply-link) { color:#80C8FF; text-decoration:underline; text-underline-offset:3px; }
html[data-theme="dark"] .comments-area a:focus-visible { outline:2px solid #80C8FF; outline-offset:3px; }
html[data-theme="dark"] .comments-area .comment-form input[type="checkbox"] { accent-color:#02E16F; color-scheme:dark; }
html[data-theme="dark"] .comments-area .comment-form input[type="checkbox"]:focus-visible { outline:2px solid #80C8FF; outline-offset:3px; }
html[data-theme="dark"] .comments-area .comment-form [aria-invalid="true"] { border-color:#FFBBC2; }
html[data-theme="dark"] .comments-area :is(.comment-form-error,.comment-error,[role="alert"]) { background:#3B2328; color:#FFBBC2; border-color:#E88C94; }
