/* 官网深浅色切换 v1.0（2026-10-23）：切换按钮 + 浅色模式里自动换色管不到的手写部分。
   源文件在 官网与品牌/官网主题/主题/theme.css，由 build_theme.py 拷到 shared/，不要直接改 shared/ 里的。
   各样式文件的浅色版是 *.light.css（自动生成）。 */

/* ---------- 切换按钮（深浅两种模式都用） ---------- */
.u-theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:40px;min-height:40px;padding:0;border:1px solid #394257;border-radius:4px;background:none;color:#f4f6fb;cursor:pointer;appearance:none;font:inherit;flex:0 0 auto}
.u-theme-toggle:hover{border-color:#5279ff;color:#fff;background:rgba(82,121,255,.12)}
.u-theme-toggle:focus-visible,.u-theme-nav:focus-visible{outline:2px solid #7895ff;outline-offset:2px}
.u-theme-toggle [data-theme-icon],.u-theme-nav [data-theme-icon]{display:inline-flex}
.u-theme-toggle svg.ri{width:18px;height:18px}
.u-theme-nav{display:none}
@media (max-width:1000px){
  .u-theme-toggle{width:36px;min-width:36px;height:36px;min-height:36px}
  /* 手机导航菜单最后一项：切换模式 */
  .unified-header.is-menu-open .u-theme-nav{display:flex;align-items:center;gap:10px;width:100%;margin:6px 0 0;padding:14px 4px;border:0;border-top:1px solid rgba(244,247,255,.11);background:none;color:#c6cad3;font:inherit;font-size:15px;text-align:left;cursor:pointer;appearance:none}
  .u-theme-nav svg.ri{width:18px;height:18px}
}
/* 页头放不下时，页头上的按钮藏起来，只留菜单里的那个 */
@media (max-width:420px){
  .unified-actions .u-theme-toggle{display:none}
}

html.theme-switching,html.theme-switching *,html.theme-switching *::before,html.theme-switching *::after{transition:none!important}

/* ---------- 浅色模式 ---------- */
:root[data-theme="light"]{color-scheme:light}
:root[data-theme="light"] .u-theme-toggle{border-color:#c9cfdb;color:#1d2230}
:root[data-theme="light"] .u-theme-toggle:hover{border-color:#3f63e6;color:#2a4fd6;background:rgba(63,99,230,.08)}
:root[data-theme="light"] .u-theme-toggle:focus-visible,:root[data-theme="light"] .u-theme-nav:focus-visible{outline-color:#3f63e6}
:root[data-theme="light"] .unified-header.is-menu-open .u-theme-nav{border-top-color:rgba(16,24,40,.12);color:#3a4150}

/* 白色单色 logo 在浅底上反成黑色 */
:root[data-theme="light"] .unified-brand img,
:root[data-theme="light"] img[src$="logo-mono.png"],
:root[data-theme="light"] img[src$="logo-white.png"]{filter:invert(1)}

/* 404、隐私页二级页头的 logo 原图是黑色，深色模式里反成白色，浅色模式还原 */
:root[data-theme="light"] .detail-brand img{filter:none}

/* 滚动条：深色那套的灰蓝滑块在白底上太重 */
html[data-theme="light"]{scrollbar-color:#c3c9d4 transparent}
html[data-theme="light"]::-webkit-scrollbar-thumb,:root[data-theme="light"] body::-webkit-scrollbar-thumb{background:#c3c9d4}

/* 深色底上的噪点纹理，浅色模式不要 */
:root[data-theme="light"] body::before{display:none}

/* 案例页“视觉展示 / 项目复盘”标签里的小字：原来靠 .7 透明度变淡，白底上淡过头 */
:root[data-theme="light"] .case-tab small{opacity:.85}
