/* Shared adapter for the separately served documentation, support, education and Studio UIs.
 * 同步约定：这里的令牌值与 app/src/styles/tokens.css 必须保持一致，改一处要同步另一处。
 * 静态页运行时拿不到 app/src 里的文件，所以只能靠这条约定。 */
@font-face{font-family:'Inter Variable';src:url('/fonts/inter-latin-var.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:'Geist Mono Variable';src:url('/fonts/geist-mono-latin-var.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
html[data-tf-page]{--bg:#f5f6f3;--surface:#fff;--paper:#f5f6f3;--ink:#0f1a1c;--muted:#55636a;--line:#dde1dc;--border:#dde1dc;--soft:#eceeea;--pale:#eceeea;--cream:#eceeea;--accent:#0a6a74;--green:#0a6a74;--teal:#0a6a74;--code-bg:#f0f2ee;--hover:#e2e5e0;color-scheme:light}
html[data-tf-theme=dark]{--bg:#0c1214;--surface:#11181a;--paper:#0c1214;--ink:#edf1f0;--muted:#9aa7aa;--line:#263135;--border:#263135;--soft:#161e21;--pale:#161e21;--cream:#161e21;--accent:#6cc6ce;--green:#6cc6ce;--teal:#6cc6ce;--code-bg:#0e1517;--hover:#212b2f;color-scheme:dark}
html[data-tf-page] body{background:var(--bg);color:var(--ink);font-family:'Inter Variable','PingFang SC','HarmonyOS Sans SC','Microsoft YaHei UI','Microsoft YaHei','Noto Sans SC',system-ui,sans-serif;letter-spacing:0}
html[data-tf-page] :is(pre,code,kbd,samp){font-family:'Geist Mono Variable',ui-monospace,'SF Mono','Cascadia Mono',Consolas,'PingFang SC','Microsoft YaHei UI','Microsoft YaHei',monospace}
html[data-tf-page] :is(h1,h2,h3){font-family:'Inter Variable','PingFang SC','HarmonyOS Sans SC','Microsoft YaHei UI','Microsoft YaHei','Noto Sans SC',system-ui,sans-serif;letter-spacing:-.01em;font-weight:600}
html[data-tf-page] :is(a,button,input,textarea,select,summary):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
html[data-tf-page] :is(input,textarea,select){background:var(--surface);color:var(--ink);border-color:var(--line);border-radius:6px}
html[data-tf-page] button{background:var(--surface);color:var(--ink);border-color:var(--line);border-radius:6px;box-shadow:none}
html[data-tf-page] button:hover:not(:disabled){background:var(--hover);color:var(--ink)}
html[data-tf-page] :is(.primary,.login,.primary-link){background:var(--ink);color:var(--bg);border-color:transparent;border-radius:6px}
html[data-tf-page] :is(.primary,.login,.primary-link):hover{background:var(--ink);color:var(--bg);filter:brightness(.9)}
html[data-tf-page] :is(header,.topbar){background:var(--bg);color:var(--ink);border-color:var(--line)}
html[data-tf-page] :is(.brand,.brand small,.privacy,.side-label,.sidefoot,.eyebrow,.muted,.quiet){color:var(--muted)}
html[data-tf-page] .brand{color:var(--ink);font-weight:600;letter-spacing:-.5px}
html[data-tf-page] :is(.brand-mark,.logo){background:var(--ink);color:var(--bg);border:0;border-radius:5px;font-family:'Inter Variable','PingFang SC','HarmonyOS Sans SC','Microsoft YaHei UI','Microsoft YaHei','Noto Sans SC',system-ui,sans-serif;font-style:normal}
/* 文档页标志：与主站 BrandMark 同一图形，墨色部分随文字色，两枚小块用强调色 */
html[data-tf-page] .mark{background:none;color:var(--ink);border:0;border-radius:0;box-shadow:none}
html[data-tf-page] .mark svg{display:block;width:32px;height:32px}
html[data-tf-page] :is(.sidebar,aside){background:var(--code-bg);border-color:var(--line)}
html[data-tf-page] :is(.card,.claim,.composer,.note,.context-bar,.directory-body,.code,.tablewrap,details){background:var(--surface);border-color:var(--line);border-radius:8px;box-shadow:none}
html[data-tf-page] :is(nav,nav a,.suggestions,.suggestions button,.side-footer,footer,.card-head,.input-footer,.account,.school,.rules,.campaign){border-color:var(--line)}
html[data-tf-page] :is(.secondary,.button.secondary,.drop,.account,.availability,.format-help,.notice,.mode,.empty-state,.empty){background:var(--soft);color:var(--muted);border-color:var(--line)}
html[data-tf-page] :is(.nav.active,.side-link.active,.os-switch button.active,.client-switch button.active,.mode.chosen){background:var(--hover);color:var(--ink);border-color:var(--line);box-shadow:none}
html[data-tf-page] :is(table,pre,code){font-variant-numeric:tabular-nums}
html[data-tf-page] :is(pre,.codehead,th){background:var(--code-bg);color:var(--ink);border-color:var(--line)}
html[data-tf-page] :is(td,tr){border-color:var(--line)}
html[data-tf-page] .tf-standalone-theme{position:fixed;right:18px;bottom:18px;z-index:60;font-size:12px;min-height:36px;padding:8px 12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:6px}

html[data-tf-page=documentation] body{font-size:15px;line-height:1.95}
html[data-tf-page=documentation] header{height:68px}
html[data-tf-page=documentation] :is(.context-bar,.stage-entry,.quick-connect,.search-results,.on-this-page,.generator,.linkgrid a){background:var(--surface);border-color:var(--line);color:var(--ink);box-shadow:none}
/* 导语区、摘要段落与地址行没有边框，直接落在页面底色上，不再拼出白色补丁 */
html[data-tf-page=documentation] :is(.hero,.summary,.address){background:none;border-color:var(--line);color:var(--ink);box-shadow:none}
html[data-tf-page=documentation] .hero{background:none;border-radius:0}
html[data-tf-page=documentation] :is(.hero h1,.article-title){font-size:36px;letter-spacing:-.04em}
html[data-tf-page=documentation] .hero>p{color:var(--muted)}
html[data-tf-page=documentation] :is(.context-bar,.stage-entry,.linkgrid a,.on-this-page){border-radius:7px}
html[data-tf-page=documentation] .stage-entry:hover{background:var(--hover);transform:none}
html[data-tf-page=documentation] .side-link:hover{background:var(--soft);color:var(--ink)}
html[data-tf-page=documentation] :is(nav a,.side-link){color:var(--muted)}
html[data-tf-page=documentation] nav a:hover{background:var(--soft);color:var(--ink)}
html[data-tf-page=documentation] nav a.active{background:var(--hover);color:var(--ink);font-weight:600}
html[data-tf-page=documentation] :is(.context-row,.address,.pager,.on-this-page a){border-color:var(--line)}
html[data-tf-page=documentation] :is(.os-switch,.client-switch){background:var(--code-bg);border-color:var(--line)}
html[data-tf-page=documentation] .note{border-left:2px solid var(--accent)}
html[data-tf-page=documentation] a:hover{color:var(--accent)}
html[data-tf-page=documentation] :is(.muted,.context-current,.context-hint,.context-label,.breadcrumb,.navcaption,.codehead,.summary p){color:var(--muted)}

html[data-tf-page=edu-gift] main{max-width:1184px}
html[data-tf-page=edu-gift] h1{font-size:clamp(32px,4vw,48px);line-height:1.4}
html[data-tf-page=edu-gift] .claim{border-radius:9px;padding:28px;border:1px solid var(--line)}
html[data-tf-page=edu-gift] :is(.wallet-rules,.wallet-example,.domains,.receipt,.directory-results){background:var(--soft);border-color:var(--line);color:var(--ink)}
html[data-tf-page=edu-gift] :is(.receipt>span,.suffix-button){background:var(--surface);border-color:var(--line);color:var(--accent)}
html[data-tf-page=edu-gift] .journey{border-color:var(--line)}
html[data-tf-page=edu-gift] .rules span{font-family:'Geist Mono Variable',ui-monospace,'SF Mono','Cascadia Mono',Consolas,'PingFang SC','Microsoft YaHei UI','Microsoft YaHei',monospace;font-style:normal;color:var(--accent)}

html[data-tf-page=session-studio] header{height:68px;border-bottom:1px solid var(--line)}
html[data-tf-page=session-studio] .shell{min-height:calc(100vh - 68px)}
html[data-tf-page=session-studio] .card{border-radius:9px}
html[data-tf-page=session-studio] :is(.stats-title,.side-note,.input-meta,.format-help,.stats-grid,.empty-state,.privacy,.section-title){color:var(--muted)}
html[data-tf-page=session-studio] :is(.card-head,.drop,.mode,.mode.chosen,.input-footer,.result-toolbar,.table-head){border-color:var(--line)}
html[data-tf-page=session-studio] :is(.drop-icon,.nav-dot,.status,.side-note,.side-footer,.stats-grid,.format-help){background:var(--soft);color:var(--muted)}
html[data-tf-page=session-studio] :is(dialog,.modal,.modal-box,.modal-card){background:var(--surface);color:var(--ink);border-color:var(--line);border-radius:9px}
html[data-tf-page=session-studio] .page-head h1{font-size:29px}
html[data-tf-page=session-studio] .notice{border-left-color:var(--accent)}
html[data-tf-page=session-studio] textarea{background:var(--code-bg)}
html[data-tf-page=session-studio] :is(.input-footer,.result-footer,thead){background:var(--code-bg);color:var(--muted)}
html[data-tf-page=session-studio] :is(dd,.empty h3,.side-note b,.execution strong){color:var(--ink)}
html[data-tf-page=session-studio] :is(dl>div,.mode small,.drop small,.empty p,.empty-steps,.section-title span,.bottom-note,dialog p,dialog li){color:var(--muted)}
html[data-tf-page=session-studio] :is(.empty-art,.empty-art::before,.empty-art::after){background:var(--soft);border-color:var(--line);box-shadow:none;transform:none}
html[data-tf-page=session-studio] .empty-art span{color:var(--accent);transform:none}
html[data-tf-page=session-studio] :is(h2>span,.filter.current,.mode b span){background:var(--hover);color:var(--ink)}

html[data-tf-page=support] .shell{grid-template-columns:260px minmax(0,1fr)}
html[data-tf-page=support] .sidebar{padding:30px 26px}
html[data-tf-page=support] .main{padding-left:48px;padding-right:48px}
html[data-tf-page=support] .topbar{min-height:70px}
html[data-tf-page=support] .welcome h1{font-size:39px;letter-spacing:-.04em}
html[data-tf-page=support] .sidebar h2{font-size:25px;letter-spacing:-.03em}
html[data-tf-page=support] .message.user .message-body{background:var(--soft);border:1px solid var(--line);border-radius:8px}
html[data-tf-page=support] .sources a{background:var(--soft);color:var(--accent);border-color:var(--line)}
html[data-tf-page=support] .composer{background:var(--surface);border-color:var(--line);border-radius:9px}
html[data-tf-page=support] .composer-area{background:var(--bg)}
html[data-tf-page=support] :is(.composer textarea,.composer-footer){background:var(--surface);color:var(--ink)}
html[data-tf-page=support] :is(.ticket-panel,.ticket-card,.staff-login,.human-card,.attachment-list){background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-tf-page=support] :is(.send-button,.send){background:var(--ink);color:var(--bg)}
html[data-tf-page=support] .ai-hero{background:var(--surface);border:1px solid var(--line);border-radius:9px;box-shadow:none;color:var(--ink)}
html[data-tf-page=support] .ai-hero::before,html[data-tf-page=support] .ai-hero::after,html[data-tf-page=support] .ai-hero-glow{display:none}
html[data-tf-page=support] .ai-hero h1{color:var(--ink)}
html[data-tf-page=support] .ai-hero h1 em{color:var(--muted)}
html[data-tf-page=support] :is(.ai-hero p,.ai-hero-badge){color:var(--muted)}
html[data-tf-page=support] .ai-hero-spark{color:var(--accent)}
html[data-tf-page=support] :is(.hero-primary,.topbar-cta,.composer button[type=submit]){background:var(--ink);color:var(--bg);box-shadow:none;border:0}
html[data-tf-page=support] :is(.hero-primary,.topbar-cta):hover{background:var(--ink);color:var(--bg);filter:brightness(.9);transform:none}
html[data-tf-page=support] .support-spotlight{background:var(--soft);border:1px solid var(--line);box-shadow:none;color:var(--ink);border-radius:7px}
html[data-tf-page=support] :is(.support-spotlight-copy,.support-spotlight-copy strong){color:var(--ink)}
html[data-tf-page=support] :is(.support-spotlight-copy small,.support-spotlight-arrow){color:var(--muted)}
html[data-tf-page=support] :is(.support-spotlight-icon,.orbit-core){background:var(--soft);color:var(--accent);border:1px solid var(--line);box-shadow:none}
html[data-tf-page=support] .orbit-ring{border-color:var(--line)}
html[data-tf-page=support] .orbit-label{background:var(--code-bg);border-color:var(--line);color:var(--muted)}
#tf-preview-bar details{margin:0;padding:0;border:0;background:transparent;border-radius:0;color:inherit}
#tf-preview-bar summary{margin:0;padding:0;border:0;background:transparent;min-height:0;line-height:1.5;font-size:11px;font-weight:400;color:inherit}

@media(max-width:800px){
 html[data-tf-page=support] .shell{grid-template-columns:1fr}
 html[data-tf-page=support] .sidebar{display:none}
 html[data-tf-page=support] .main{padding:0 22px}
 html[data-tf-page=support] .welcome h1{font-size:32px}
 html[data-tf-page=documentation] :is(.hero h1,.article-title){font-size:29px}
 html[data-tf-page=edu-gift] .claim{padding:22px}
 html[data-tf-page] .tf-standalone-theme{bottom:64px;right:12px}
}
@media(prefers-reduced-motion:reduce){html[data-tf-page]{scroll-behavior:auto}html[data-tf-page] *,html[data-tf-page] *::before,html[data-tf-page] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
