/* WAKENEX Editorial 2026-10-30. Visual overrides only.
   Keep original templates, language visibility, hidden states and interaction hooks.
   Home composition belongs to editorial-home.css; reader controls to editorial-reader.css. */
:root {
  --bg:#07101b; --bg-1:#0d1826; --bg-2:#132133; --bg-3:#1c2d42;
  --ink:#edf2f7; --ink-2:#bbc8d7; --ink-3:#94a7bd;
  --line:rgba(171,193,218,.16); --line-2:rgba(171,193,218,.29);
  --accent:#2388ff; --accent-ink:#70b4ff; --accent-fill:#146be8; --accent-fill-hover:#0d5ccc;
  --accent-soft:rgba(35,136,255,.095); --accent-line:rgba(84,163,255,.45);
  --header-bg:rgba(7,16,27,.96); --scrim:rgba(3,9,16,.72);
  --shadow-1:0 1px 2px rgba(0,0,0,.15); --shadow-2:0 20px 50px rgba(0,0,0,.28);
  --wrap:1240px; --read:720px; --gutter:clamp(20px,4.2vw,56px); --header-h:64px;
  --t-h1:clamp(2.1rem,1.42rem + 2.7vw,3.6rem);
  --t-h2:clamp(1.5rem,1.15rem + 1.25vw,2.2rem);
  --t-h3:clamp(1.2rem,1.05rem + .5vw,1.45rem);
  --t-lead:clamp(1.08rem,1.02rem + .35vw,1.25rem);
  --t-body:1.125rem; --t-small:.9375rem; --t-meta:.8125rem; --t-label:.75rem;
  --lh-body:1.78; --section:clamp(48px,6vw,80px);
  --r-sm:6px; --r-md:9px; --r-lg:12px;
}
:root[data-theme="light"] {
  --bg:#f7f8fa; --bg-1:#fff; --bg-2:#eef2f7; --bg-3:#e2e9f1;
  --ink:#111d2d; --ink-2:#435369; --ink-3:#5c6c80;
  --line:rgba(27,48,74,.13); --line-2:rgba(27,48,74,.24);
  --accent:#146be8; --accent-ink:#155ac4; --accent-soft:rgba(20,107,232,.06); --accent-line:rgba(20,107,232,.33);
  --header-bg:rgba(247,248,250,.97); --scrim:rgba(9,20,34,.42);
  --shadow-1:0 1px 3px rgba(17,29,45,.04); --shadow-2:0 20px 50px rgba(17,29,45,.1);
}
@media(prefers-color-scheme:light) {
  :root[data-theme="auto"] {
    --bg:#f7f8fa; --bg-1:#fff; --bg-2:#eef2f7; --bg-3:#e2e9f1;
    --ink:#111d2d; --ink-2:#435369; --ink-3:#5c6c80;
    --line:rgba(27,48,74,.13); --line-2:rgba(27,48,74,.24);
    --accent:#146be8; --accent-ink:#155ac4; --accent-soft:rgba(20,107,232,.06); --accent-line:rgba(20,107,232,.33);
    --header-bg:rgba(247,248,250,.97); --scrim:rgba(9,20,34,.42);
    --shadow-1:0 1px 3px rgba(17,29,45,.04); --shadow-2:0 20px 50px rgba(17,29,45,.1);
  }
}
html,body,html.wx-fx-on body,html.wx-fx-on footer { background:var(--bg); }
body { background-image:none; }
/* Decoration only: the legacy canvas may be retained in cached markup. */
.wx-fx { visibility:hidden!important; opacity:0!important; }
html.wx-fx-on .topbar { background:var(--header-bg); }
.topbar { background:var(--header-bg); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
.brand { gap:12px; }
.brand .brand-logo { width:134px; height:23px; object-fit:contain; flex:none; }
.brand .brand-logo-light { display:none; }
.brand .brand-logo-dark { display:block; }
:root[data-theme="light"] .brand .brand-logo-dark { display:none; }
:root[data-theme="light"] .brand .brand-logo-light { display:block; }
@media(prefers-color-scheme:light) {
  :root[data-theme="auto"] .brand .brand-logo-dark { display:none; }
  :root[data-theme="auto"] .brand .brand-logo-light { display:block; }
}
.cnbrand { font-size:12px; letter-spacing:.14em; }
.desktop-nav { gap:24px; }
.desktop-nav>a { font-size:14px; }
.nav-more { margin-left:-18px; }
.lang-btn { min-height:34px; }
:focus-visible { outline:2px solid var(--accent-ink); outline-offset:4px; }
.reading-shell { padding-top:24px; }
.breadcrumbs { gap:8px; font-size:12px; line-height:1.65; }
.page-heading { max-width:1040px; padding:30px 0 28px; }
.page-heading h1 { margin-top:8px; max-width:1000px; font-weight:650; }
.page-heading>p,.page-heading #pageIntro { max-width:760px; margin-top:14px; font-size:var(--t-lead); line-height:1.65; }
.reading-grid { gap:56px; padding-top:28px; }
.collection-page .wx-view-body { max-width:none; }
.collection-page .page-heading { padding-bottom:28px; }
.wx-head { max-width:1000px; padding:30px 0 28px; }
.wx-head h1 { max-width:1000px; margin-top:14px; font-size:clamp(2.15rem,1.48rem + 2.8vw,3.65rem); line-height:1.13; letter-spacing:-.035em; }
html[lang="zh-CN"] .wx-head h1 { line-height:1.29; letter-spacing:-.018em; font-weight:650; }
.wx-dek { max-width:780px; margin-top:18px; line-height:1.65; }
.wx-thesis { max-width:780px; margin-top:22px; padding:16px 20px; background:var(--accent-soft); border-left-width:3px; }
.wx-thesis p { line-height:1.7; }
.wx-head .wx-share { margin-top:18px; }
.wx-meta { font-size:13px; color:var(--ink-3); }
.wx-layout { grid-template-columns:minmax(0,var(--read)) minmax(180px,240px); gap:clamp(36px,5vw,72px); padding-top:32px; }
.wx-layout:not(:has(.wx-toc)),.wx-note .wx-layout,.wx-canon .wx-layout { grid-template-columns:minmax(0,var(--read)); }
.wx-body { font-size:18px; line-height:1.85; letter-spacing:0; }
html[lang="zh-CN"] .wx-body { font-size:18px; letter-spacing:.015em; line-height:1.92; }
.wx-body>*+* { margin-top:1.15em; }
.wx-body>p:first-child { font-size:19px; line-height:1.8; }
.wx-body h2 { margin-top:2.1em; font-size:clamp(1.4rem,1.2rem + .7vw,1.85rem); line-height:1.42; }
.wx-body h3 { line-height:1.5; }
.wx-body strong { font-weight:650; }
.wx-hero { max-width:1000px; margin:8px 0 0; }
.wx-hero picture,.wx-hero img { border-radius:9px; }
.wx-hero img { object-fit:contain; }
.wx-note .wx-head { max-width:940px; padding-bottom:18px; }
.wx-note .wx-head h1 { max-width:920px; font-size:clamp(1.75rem,1.25rem + 1.8vw,2.6rem); line-height:1.28; }
html[lang="zh-CN"] .wx-note .wx-head h1 { line-height:1.4; }
.wx-note-dek { max-width:780px; color:var(--ink-2); font-size:17px; line-height:1.8; margin-top:16px; }
.wx-note .wx-layout { padding-top:12px; }
.wx-note .wx-hero { max-width:680px; margin:28px auto; }
.wx-body h2.wx-note-label { margin-top:1.8em; }
.wx-toc { font-size:13px; padding-left:20px; border-left:1px solid var(--line); }
.wx-toc a { padding-block:7px; color:var(--ink-2); }
.wx-toc ol { border-left:0; }
.wx-canon .wx-head { max-width:1000px; }
.wx-canon .wx-origin { padding:14px 18px; background:var(--accent-soft); border-radius:0 6px 6px 0; }
.wx-canon .wx-origin p { font-size:1em; }
.wx-canon table { font-size:15px; }
.wx-canon th,.wx-canon td { padding:12px 14px 12px 0; }
.wx-cards li { padding:20px 24px; }
.content-section { margin-bottom:36px; padding-bottom:36px; }
.content-section>h2 { font-size:clamp(1.5rem,1.15rem + 1vw,2rem); line-height:1.35; }
.content-section>p { max-width:760px; }
.related-pages { padding-top:56px; }
.wx-sources { margin-top:42px; }
footer { margin-top:72px; }
.footer-inner { padding-top:40px; }
.post-art,.post-art img { border-radius:8px; }
.post-copy h3 { line-height:1.4; text-wrap:pretty; }
.post-copy>p { line-height:1.7; }
@media(max-width:1100px) {
 .wx-layout { grid-template-columns:minmax(0,var(--read)); }
}
@media(max-width:760px) {
 :root { --gutter:22px; --header-h:60px; --section:48px; }
 .brand .brand-logo { width:120px; height:21px; }
 .reading-shell { padding-top:18px; }
 .wx-head,.page-heading { padding:22px 0 24px; }
 .wx-head h1 { font-size:clamp(29px,6.6vw,42px); margin-top:12px; }
 html[lang="zh-CN"] .wx-head h1 { line-height:1.35; }
 .wx-dek { font-size:17px; line-height:1.75; margin-top:14px; }
 .wx-thesis { margin-top:18px; padding:14px 16px; }
 .wx-thesis p { font-size:16px; line-height:1.8; }
 .wx-layout { padding-top:24px; }
 .wx-body,html[lang="zh-CN"] .wx-body { font-size:17px; line-height:1.9; letter-spacing:0; }
 .wx-body>p:first-child { font-size:18px; line-height:1.8; }
 .wx-note .wx-head h1 { font-size:clamp(27px,6.5vw,34px); line-height:1.4; }
 .wx-note-dek { font-size:16px; line-height:1.8; }
 .wx-note .wx-layout { padding-top:8px; }
 .wx-meta { font-size:12px; }
 .wx-head .wx-share { margin-top:14px; }
 .page-heading h1 { font-size:32px; }
 .page-heading>p,.page-heading #pageIntro { font-size:17px; }
 .wx-cards li { padding:16px 18px; }
 .wx-canon table { font-size:14px; }
 .content-section { padding-bottom:28px; margin-bottom:28px; }
 .wx-hero { margin-top:0; }
 .wx-hero picture,.wx-hero img { border-radius:6px; }
 .wx-note .wx-hero { margin:24px auto; }
 footer { margin-top:48px; }
}
@media(max-width:360px) {
 :root { --gutter:16px; }
 .brand .brand-logo { width:102px; height:18px; }
 .topbar { padding-inline:12px; gap:8px; }
}
@media(prefers-reduced-motion:reduce) {
 html { scroll-behavior:auto; }
 .em-pulse,.em-flow,.em-blink { animation:none; }
}

/* Overlay surfaces follow the root theme, independently of any night-stage panel.
   Only appearance is overridden: .open, [hidden], focus and dialog behavior remain owned by wx.css/JS. */
:root { --overlay-bg:#07101b; --overlay-panel:#0d1826; --overlay-ink:#edf2f7; --overlay-muted:#bbc8d7; --overlay-line:rgba(171,193,218,.29); --overlay-scrim:rgba(3,9,16,.78); }
:root[data-theme="light"] { --overlay-bg:#f7f8fa; --overlay-panel:#fff; --overlay-ink:#111d2d; --overlay-muted:#435369; --overlay-line:rgba(27,48,74,.24); --overlay-scrim:rgba(9,20,34,.42); }
@media(prefers-color-scheme:light) {
 :root[data-theme="auto"] { --overlay-bg:#f7f8fa; --overlay-panel:#fff; --overlay-ink:#111d2d; --overlay-muted:#435369; --overlay-line:rgba(27,48,74,.24); --overlay-scrim:rgba(9,20,34,.42); }
}
:root .mobile-drawer { background:var(--overlay-bg); color:var(--overlay-ink); }
:root .mobile-drawer .drawer-group { border-color:var(--overlay-line); }
:root .mobile-drawer .drawer-group>a,:root .mobile-drawer .drawer-close { color:var(--overlay-ink); }
:root .mobile-drawer .drawer-list a,:root .mobile-drawer .drawer-sub,:root .mobile-drawer .drawer-toggle { color:var(--overlay-muted); }
:root .mobile-drawer #mobileSearch { background:var(--overlay-panel); color:var(--overlay-ink); border-color:var(--overlay-line); }
:root .search-overlay { background:var(--overlay-scrim); color:var(--overlay-ink); }
:root .search-overlay .search-box { background:var(--overlay-panel); color:var(--overlay-ink); border-color:var(--overlay-line); }
:root .search-box input { background:var(--overlay-bg); color:var(--overlay-ink); border-color:var(--overlay-line); }
:root .search-box input::placeholder { color:var(--overlay-muted); opacity:1; }
:root .search-box>button,:root .search-result p,:root #searchResults>p { color:var(--overlay-muted); }
:root .search-result { border-color:var(--overlay-line); }
:root .search-result strong { color:var(--overlay-ink); }
:root .search-result:hover strong { color:var(--accent-ink); }
/* Short notes move directly from their actions into the text. Empty live regions remain accessible. */
.wx-note .wx-head { padding-bottom:12px; }
.wx-note .wx-head .wx-copy-status:empty { min-height:0; margin-top:0; }
.wx-note .wx-head .wx-share { margin-top:14px; }
.wx-note .wx-layout { padding-top:16px; }
@media(max-width:760px) {
 .wx-note .wx-head { padding-bottom:12px; }
 .wx-note .wx-layout { padding-top:16px; }
}
