/* 本地可变字体覆盖英文与数字；中文使用系统无衬线字体。 */
@font-face{font-family:Inter;src:url('/assets/fonts/inter/InterVariable.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
html body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;font-optical-sizing:auto;font-feature-settings:'liga' 1,'calt' 1;-webkit-font-smoothing:antialiased}
html :is(button,select,input,textarea){font-family:inherit}
html :is(.hero h1,.hero h2,.page-heading h1){letter-spacing:-.04em}
.brand{white-space:nowrap;flex-shrink:0}
.icon-slot{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;flex-shrink:0;line-height:1}
.ui-icon{display:block;width:1em;height:1em;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;margin-inline:auto}
/* 共享开关：两种模式采用相同的双图标滑块。 */
:root{color-scheme:light;--button-radius:100px}
:root[data-theme="dark"]{color-scheme:dark}
.nav-actions{display:flex;align-items:center;gap:10px;flex:none}
.theme-toggle{position:relative;display:inline-flex;align-items:center;justify-content:space-between;min-width:64px;width:64px;height:36px;padding:4px;border:0;border-radius:999px;background:#242833;color:#858fa2;font:inherit;line-height:1;cursor:pointer;isolation:isolate;flex:none;transition:background .25s}
.theme-toggle[hidden]{display:none}
.theme-toggle:hover{background:#303746}
.theme-toggle:focus-visible{outline:2px solid #1677ff;outline-offset:4px}
.theme-toggle svg{position:relative;z-index:1;width:28px;height:28px;padding:5px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none;transition:color .25s}
.theme-toggle::before{content:"";position:absolute;inset:4px auto 4px 4px;width:28px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(22,40,71,.12);transition:transform .25s cubic-bezier(.2,.7,.2,1),background .25s}
.theme-toggle [data-theme-label]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
[data-theme="dark"] .theme-toggle::before{transform:translateX(28px);background:#46536b}
[data-theme="dark"] .theme-toggle .theme-sun{color:#8c96a8}
[data-theme="dark"] .theme-toggle .theme-moon{color:#f1f4fc}
html :is(.nav-btn,.nav-back,.button,.btn,.launch,.download-link,.viewer-close,.viewer-zoom,.case-navigation button,.demo-navigation button){border-radius:var(--button-radius)}
.error-theme{position:fixed;right:24px;top:24px;z-index:10}
html:not([data-theme="dark"]){
  --bg:#f5f7fa;--text:#1f2937;--muted:#596579;
  --accent:#245ed0;--accent2:#08979c;--accent3:#cf1322;--cyan:#087f8c;--lilac:#0958d9;--rose:#b4233c;
  --panel:#fff;--panel-2:#f0f4f9;--line:#e5eaf0;
  --button-primary:#1670e8;--button-hover:#1265d5;--button-soft:#eaf4ff;--button-soft-hover:#dcedff;--button-ink:#1668dc;
  --shadow:0 3px 18px rgba(31,53,82,.045);--day-soft:#f0f4f9;--day-link:#0958d9;
}
html:not([data-theme="dark"]) body{background:var(--bg);color:var(--text)}
html:not([data-theme="dark"]) :is(p,figcaption){color:var(--muted)}
html:not([data-theme="dark"]) :is(b,strong){color:var(--text)}
html:not([data-theme="dark"]) :is(.site-nav,body>nav){background:rgba(255,255,255,.97);box-shadow:0 2px 14px rgba(31,53,82,.05);border-radius:10px;backdrop-filter:blur(12px)}
html:not([data-theme="dark"]) .brand-dot{background:#245ed0;box-shadow:none}
html:not([data-theme="dark"]) .nav-meta{letter-spacing:.02em;color:#667085;text-transform:none}
html:not([data-theme="dark"]) :is(.nav-btn,.nav-back){display:inline-flex;align-items:center;gap:9px;font-weight:550;color:#46546a;background:#f0f4f9;border-radius:var(--button-radius);box-shadow:none;transition:color .2s,background .2s;white-space:nowrap}
html:not([data-theme="dark"]) :is(.nav-btn,.nav-back):hover{color:#0958d9;background:#e6f4ff;transform:none}
html:not([data-theme="dark"]) :is(.nav-btn,.nav-back) .icon-slot{margin-left:0}
html:not([data-theme="dark"]) .theme-toggle{background:#eaf0f8;color:#8190a7}
html:not([data-theme="dark"]) .theme-toggle:hover{background:#e0e9f6}
html:not([data-theme="dark"]) .theme-toggle .theme-sun{color:#245ed0}
html:not([data-theme="dark"]) :is(.breadcrumb,.project-meta,.source-note,footer,.publication-note){color:#667085}
html:not([data-theme="dark"]) :is(.breadcrumb a:hover,footer a:hover,.reader-toolbar a:hover){color:#0958d9}
html:not([data-theme="dark"]) :is(.button,.btn){padding:15px 20px;color:#fff;background:var(--button-primary);border-radius:var(--button-radius);box-shadow:0 2px 6px rgba(22,112,232,.08);transition:transform .2s,box-shadow .2s,background .2s}
html:not([data-theme="dark"]) :is(.button,.btn):hover{color:#fff;background:var(--button-hover);transform:translateY(-2px);box-shadow:0 4px 10px rgba(22,112,232,.14)}
html:not([data-theme="dark"]) :is(.text-link,.image-preview-link,.read-action){color:#0958d9}
html:not([data-theme="dark"]) :is(.text-link,.image-preview-link):hover{color:#003eb3}
html:not([data-theme="dark"]) :is(.progress,.reading-progress){background:#e5eaf0}
html:not([data-theme="dark"]) :is(.progress,.reading-progress) span{background:#245ed0;box-shadow:none}
html:not([data-theme="dark"]) :is(button,select){color-scheme:light}
html:not([data-theme="dark"]) select{background:#f0f4f9;color:#344054;border-radius:6px}
html:not([data-theme="dark"]) :is(a,button,summary,select):focus-visible{outline-color:#1677ff}
html:not([data-theme="dark"]) .image-viewer{background:#fff;box-shadow:0 24px 80px rgba(31,53,82,.2);border-radius:12px}
html:not([data-theme="dark"]) .image-viewer::backdrop{background:rgba(31,41,55,.5);backdrop-filter:blur(4px)}
html:not([data-theme="dark"]) .viewer-stage{background:#f0f2f5}
html:not([data-theme="dark"]) :is(.viewer-close,.viewer-zoom){background:#f0f4f9;color:#344054;border-radius:var(--button-radius)}
html:not([data-theme="dark"]) .viewer-hint{color:#596579}
html:not([data-theme="dark"]) code{color:#0958d9}
html:not([data-theme="dark"]) .skip-link{background:#fff;color:#0958d9}
html:not([data-theme="dark"]) :is(.bg-grad,.noise,.orb,.grid){display:none}
html[data-page="error"]:not([data-theme="dark"]) .card{background:#fff;border:0;border-radius:12px;box-shadow:var(--shadow)}
html[data-page="error"]:not([data-theme="dark"]) .code{background:none;color:#245ed0}
@media(max-width:860px){.nav-meta{display:none}}
@media(max-width:600px){
  .nav-actions{gap:6px}
  .theme-toggle{min-width:56px;width:56px;height:32px}
  .theme-toggle svg{width:24px;height:24px;padding:4px}
  .theme-toggle::before{width:24px}
  [data-theme="dark"] .theme-toggle::before{transform:translateX(24px)}
  html :is(.site-nav,body>nav){gap:8px;padding:10px 12px}
  .error-theme{right:16px;top:16px}
}
@media(max-width:400px){
  html :is(.site-nav,body>nav) .brand{font-size:11.5px;gap:5px}
  .nav-actions :is(.nav-btn,.nav-back){font-size:11px;gap:5px;padding:8px 6px}
  .nav-actions :is(.nav-btn,.nav-back) .icon-slot{font-size:17px;margin-left:0}
}
@media(prefers-reduced-motion:reduce){.theme-toggle,.theme-toggle::before,.theme-toggle svg{transition:none}html :is(.arrow,.arrow-mark,.arrow-back,.arrow-forward){animation:none!important;transition:none!important}}
@media print{.theme-toggle{display:none}}
@media(max-width:360px){html[data-page="project"] .hero h1{font-size:clamp(54px,17.5vw,60px)}}
