/* 标签与徽章：动态文本允许完整换行，不裁切文字。 */
.badge,.chip,.tag { display:inline-flex; align-items:center; gap:8px; max-width:100%; min-width:0; overflow-wrap:anywhere; border:1px solid var(--border); border-radius:var(--r-ctl); background:var(--bg-panel); color:var(--text-muted); font-family:var(--font-mono-zh); font-size:11px; line-height:1.5; padding:3px 10px; }
.badge { min-height:26px; letter-spacing:.08em; text-transform:uppercase; }
.badge-dot { width:6px; height:6px; border-radius:var(--r-round); flex-shrink:0; background:var(--accent); color:var(--text); box-shadow:0 0 0 3px var(--accent-ring); }
.chip { padding:2px 7px; font-size:11.5px; }
.tag { padding:3px 8px; font-size:11px; text-decoration:none; }
.badge--primary { background:var(--text); color:var(--on-dark); border-color:var(--text); }
.badge--recommended { background:var(--bg-panel-2); color:var(--accent-dark); border-color:var(--accent-line); }
.badge--retired { background:var(--bg-sunk); color:var(--text-muted); border-color:var(--border-strong); }

/* 控制台分栏与通用 tabs。 */
.tab-list { display:flex; align-items:stretch; gap:4px; overflow-x:auto; max-width:100%; padding:4px; margin:0 0 24px; border-bottom:1px solid var(--border); scrollbar-width:thin; }
.tab-list [role="tab"] { flex-shrink:0; min-height:44px; padding:10px 18px; border:0; border-bottom:2px solid var(--clear); border-radius:var(--r-ctl) var(--r-ctl) 0 0; background:var(--clear); color:var(--text-muted); font-family:var(--font-mono-zh); font-size:12px; }
.tab-list [role="tab"]:hover { background:var(--bg-sunk); color:var(--text); }
.tab-list [role="tab"][aria-selected="true"] { background:var(--bg-panel-2); color:var(--accent-dark); border-bottom-color:var(--accent); }
[role="tabpanel"] { min-width:0; }
.console { display:grid; grid-template-columns:260px minmax(0,1fr); gap:40px; align-items:start; }
.console .tab-list { display:flex; flex-direction:column; gap:2px; padding:0; border:0; margin:0; }
.console .tab-list [role="tab"] { text-align:left; border:0; border-left:2px solid var(--clear); border-radius:var(--r-ctl); min-height:76px; padding:16px 20px; font-family:var(--font-mono); letter-spacing:.05em; }
.console .tab-list [role="tab"] span { display:block; margin-top:6px; font-family:var(--font-body); font-size:12px; letter-spacing:0; }
.console .tab-list [aria-selected="true"] { border-left-color:var(--accent); background:var(--bg-panel-2); color:var(--accent-dark); }
.console-window { min-width:0; border:1px solid var(--border); border-radius:var(--r-win); background:var(--bg-panel); color:var(--text); box-shadow:var(--shadow-window); overflow:hidden; }
.window-chrome { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; min-height:38px; padding:0 14px; border-bottom:1px solid var(--border); background:var(--bg); color:var(--text-muted); font-family:var(--font-mono); font-size:12px; }
.chrome-dots,.app-dots { display:flex; gap:7px; }
.chrome-dots span,.app-dots span { width:10px; height:10px; flex-shrink:0; border-radius:var(--r-round); background:var(--chrome-dot); color:var(--text); }
.console-content { padding:32px; }
.console-content p { color:var(--text-muted); line-height:1.9; }
.console-content pre { margin-bottom:0; }
.toc { position:sticky; top:16px; z-index:10; display:flex; flex-wrap:wrap; gap:6px 18px; max-width:100%; padding:16px 20px; margin-bottom:40px; background:var(--bg-panel); color:var(--text); border:1px solid var(--border); border-radius:var(--r-ctl); }
.toc a { display:inline-flex; align-items:center; min-height:32px; font-size:13px; color:var(--text-muted); text-decoration:none; }
.toc a:hover,.toc a[aria-current] { color:var(--accent-dark); text-decoration:underline; }
.faq-item { min-width:0; border-bottom:1px solid var(--border); background:var(--bg); color:var(--text); }
.faq-item summary { position:relative; list-style:none; cursor:pointer; padding:22px 36px 22px 0; font-size:16px; }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item summary::after { content:"+"; position:absolute; right:4px; top:20px; font-family:var(--font-mono); color:var(--text-muted); }
.faq-item[open] summary::after { content:"−"; }
.faq-answer { padding-bottom:24px; color:var(--text-muted); max-width:760px; }
.faq-answer p:last-child { margin-bottom:0; }
.term-card { display:grid; grid-template-columns:170px minmax(0,1fr); gap:28px; padding:28px 0; border-top:1px solid var(--border); min-width:0; }
.term-card > * { min-width:0; }
.term-card h3 { margin:0 0 6px; font-family:var(--font-mono); font-size:18px; }
.term-category { font-size:12px; color:var(--text-muted); }
.term-card p { margin:0; color:var(--text-muted); }
.download-card { min-width:0; padding:32px; border:1px solid var(--border); border-radius:var(--r-win); background:var(--bg-panel); color:var(--text); }
.download-card--lead { border-top:2px solid var(--text); }
.download-card-head { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:20px; }
.download-card-head h3 { margin:0 0 6px; }
.download-card p { color:var(--text-muted); }
.download-options { display:flex; flex-wrap:wrap; gap:12px; margin-top:24px; }
.download-meta { font:var(--weight-regular) 12px/1.7 var(--font-mono-zh); color:var(--text-muted); }
.article-card { min-width:0; padding-top:24px; padding-bottom:28px; border-top:1px solid var(--border); }
.article-meta { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:18px; font-family:var(--font-mono-zh); font-size:11px; color:var(--text-muted); }
.article-card h3 { margin-bottom:14px; }
.article-card p { color:var(--text-muted); font-size:14px; }
.callout { margin:28px 0; padding:22px 24px; border:1px solid var(--border); border-left:2px solid var(--accent); border-radius:var(--r-ctl); background:var(--bg-panel-2); color:var(--text); }
.callout p:last-child { margin-bottom:0; }
.callout-title { display:block; margin-bottom:8px; font-size:14px; font-weight:var(--weight-medium); }
.callout--warning { background:var(--bg-panel); color:var(--text); border-left-color:var(--warn); }
.callout--error { background:var(--bg-panel); color:var(--text); border-left-color:var(--error); }
.callout--success { background:var(--bg-panel); color:var(--text); border-left-color:var(--success); }
.table-scroll { max-width:100%; min-width:0; overflow-x:auto; -webkit-overflow-scrolling:touch; margin-block:24px; }
.data-table { width:100%; border-collapse:collapse; text-align:left; font-size:14px; }
.data-table th,.data-table td,.prose table th,.prose table td { min-width:7em; padding:14px 18px; border:1px solid var(--border); overflow-wrap:normal; word-break:normal; vertical-align:top; }
.data-table th,.prose table th { background:var(--bg-sunk); color:var(--text); font-weight:var(--weight-medium); }
.data-table td,.prose table td { background:var(--bg-panel); color:var(--text-muted); }
.prose table { display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; max-width:100%; min-width:0; width:100%; border-collapse:collapse; margin-block:24px; }
.download-guide { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:24px; padding:28px; margin-top:48px; border:1px solid var(--border); border-radius:var(--r-win); background:var(--bg-panel-2); color:var(--text); }
.download-guide > div { min-width:0; flex:1 1 260px; }
.download-guide h2 { font-size:24px; margin-bottom:8px; }
.download-guide p { margin:0; font-size:14px; color:var(--text-muted); }
.dl-fab { position:fixed; right:24px; bottom:24px; z-index:30; display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:0 15px; border-radius:var(--r-ctl); background:var(--text); color:var(--on-dark); font-family:var(--font-mono-zh); font-size:12.5px; letter-spacing:.05em; text-decoration:none; box-shadow:var(--shadow-fab); transition:background-color var(--ease); }
.dl-fab:hover { background:var(--ink-hover); color:var(--on-dark); }
.dl-fab svg { width:14px; height:14px; }

/* 已确认首屏：排版画布 + 全宽字符场产品展示带。 */
.hero { height:calc(100vh - var(--nav-h)); min-height:800px; display:flex; flex-direction:column; overflow-x:clip; }
.intro { width:100%; max-width:calc(var(--content) + var(--gutter)*2); margin:0 auto; padding:48px var(--gutter) 36px; display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:64px; align-items:end; }
.hero h1 { margin:18px 0 0; font-size:clamp(30px,2.2vw + 16px,48px); line-height:1.1; letter-spacing:-.02em; }
.h1-line { display:block; }
.h1-line--sub { color:var(--text-muted); }
.lede { margin:18px 0 0; max-width:640px; font-size:16px; line-height:1.7; color:var(--text-muted); }
.lede strong { font-weight:var(--weight-medium); color:var(--text); text-decoration:underline; text-decoration-color:var(--border-strong); text-decoration-thickness:1px; text-underline-offset:4px; }
.platforms { display:flex; align-items:center; gap:16px; margin-top:22px; min-height:22px; }
.platforms-label { font-family:var(--font-mono-zh); font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-muted); }
.platforms-rule { width:16px; height:1px; flex-shrink:0; background:var(--border-strong); color:var(--text); }
.platform-list { display:flex; align-items:center; gap:24px; margin:0; padding:0; list-style:none; }
.platform-list a { display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--text-muted); text-decoration:none; }
.platform-list a:hover { color:var(--text); }
.pf-ico { width:14px; height:14px; }
.pf-ico--tux { width:13px; height:15px; }
.spec { margin:0; border-top:1px solid var(--border); }
.spec-row { display:grid; grid-template-columns:92px minmax(0,1fr); align-items:center; padding:9px 0; border-bottom:1px dashed var(--border); }
.spec dt { font-family:var(--font-mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-muted); }
.spec dd { margin:0; display:flex; flex-wrap:wrap; gap:6px; }
.band { position:relative; flex:1; min-height:340px; overflow:hidden; background:linear-gradient(180deg,var(--bg-panel-2) 0%,var(--bg-panel-3) 100%); color:var(--text); border-top:1px solid var(--accent-line); }
.field { position:absolute; inset:10px 0 0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr); font-family:var(--font-mono); font-size:12.5px; line-height:21px; color:var(--field-1); pointer-events:none; user-select:none; -webkit-mask-image:var(--field-mask); mask-image:var(--field-mask); }
.field i,.field em { font-style:normal; }
.field i { color:var(--field-2); }
.field em { color:var(--field-3); }
.fcol { display:flex; flex-direction:column; min-width:0; overflow:hidden; white-space:pre; }
.fcol > span { display:block; }
.fcol--l { align-items:flex-start; padding-left:12px; }
.fcol--m { align-items:center; }
.fcol--r { align-items:flex-end; padding-right:12px; }
.app { position:absolute; top:54px; bottom:-10px; left:50%; width:min(calc(var(--content)*.88),calc(100% - 48px)); transform:translateX(-50%); display:grid; grid-template-rows:36px minmax(0,1fr) 46px; padding-bottom:10px; background:var(--bg-panel); color:var(--text); border:1px solid var(--border); border-radius:var(--r-win); box-shadow:var(--shadow-window); overflow:hidden; font-size:13px; }
.app-bar { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; padding:0 14px; border-bottom:1px solid var(--border); background:var(--bg); color:var(--text); }
.app-title { font-family:var(--font-mono); font-size:12px; letter-spacing:.02em; color:var(--text-muted); }
.app-body { display:grid; grid-template-columns:184px minmax(0,1fr) 300px; min-height:0; }
.app-side { display:flex; flex-direction:column; gap:2px; padding:12px 10px; border-right:1px solid var(--border); }
.side-item { display:flex; align-items:center; gap:10px; min-height:34px; padding:0 10px; border-radius:var(--r-ctl); color:var(--text-muted); }
.side-item svg { width:15px; height:15px; }
.side-item.is-current { background:var(--bg-sunk); color:var(--text); }
.app-main { display:flex; flex-direction:column; min-width:0; min-height:0; }
.app-tabs { display:flex; align-items:stretch; justify-content:space-between; min-height:40px; padding:0 16px; border-bottom:1px solid var(--border); }
.app-tab { position:relative; display:flex; align-items:center; color:var(--text); }
.app-tab::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px; background:var(--accent); }
.app-search { align-self:center; display:flex; align-items:center; gap:6px; width:168px; height:26px; padding:0 8px; border:1px solid var(--border); border-radius:var(--r-ctl); color:var(--text-muted); font-size:12px; }
.app-search svg { width:12px; height:12px; }
.app-cols { display:grid; grid-template-columns:56px 1.4fr 1.4fr 56px 72px 48px; align-items:center; min-height:30px; padding:0 16px; border-bottom:1px solid var(--border); background:var(--bg); color:var(--text-muted); font-size:11.5px; }
.app-empty { flex:1; min-height:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:16px; text-align:center; }
.empty-ico { display:flex; align-items:center; justify-content:center; width:40px; height:40px; flex-shrink:0; border:1px dashed var(--border-strong); border-radius:var(--r-win); color:var(--text-muted); }
.empty-ico svg { width:18px; height:18px; }
.empty-text { margin:0; font-size:13.5px; color:var(--text-muted); }
.empty-hint { display:flex; align-items:center; flex-wrap:wrap; justify-content:center; gap:8px; font-family:var(--font-mono-zh); font-size:12px; color:var(--text-muted); }
.key { display:inline-flex; align-items:center; min-height:24px; padding:0 8px; border:1px solid var(--border); border-radius:var(--r-ctl); background:var(--bg-panel); color:var(--text-muted); box-shadow:var(--shadow-key); }
.app-detail { display:flex; flex-direction:column; min-height:0; border-left:1px solid var(--border); }
.detail-head { display:flex; align-items:center; justify-content:space-between; min-height:40px; padding:0 16px; border-bottom:1px solid var(--border); }
.detail-preset { display:flex; align-items:center; gap:7px; font-family:var(--font-mono-zh); font-size:11.5px; color:var(--text-muted); }
.detail-preset::before { content:""; width:6px; height:6px; border-radius:var(--r-round); background:var(--accent); color:var(--text); box-shadow:0 0 0 3px var(--accent-ring); }
.code { margin:14px 16px 0; padding:10px 0; border:1px solid var(--border); border-radius:var(--r-ctl); background:var(--bg-code); color:var(--text); font-family:var(--font-mono); font-size:12px; line-height:19px; overflow:auto; }
.ln { display:grid; grid-template-columns:30px minmax(0,1fr); white-space:pre; }
.ln .no { padding-right:12px; text-align:right; color:var(--text-muted); }
.tk-k { color:var(--text); }
.tk-s { color:var(--accent-dark); }
.tk-p { color:var(--text-muted); }
.detail-note { margin:10px 16px 0; font-size:12px; line-height:1.55; color:var(--text-muted); }
.app-status { display:flex; align-items:center; padding:0 2px; border-top:1px solid var(--border); background:var(--bg); color:var(--text); font-size:12.5px; white-space:nowrap; overflow-x:auto; }
.sgroup { display:flex; align-items:center; gap:10px; height:26px; padding:0 16px; flex-shrink:0; }
.sgroup + .sgroup { border-left:1px solid var(--border); }
.slabel { color:var(--text-muted); }
.seg { display:flex; gap:2px; padding:2px; border:1px solid var(--border); border-radius:var(--r-ctl); background:var(--bg-panel); color:var(--text); }
.seg span { display:flex; align-items:center; min-height:24px; padding:0 10px; border:1px solid var(--clear); border-radius:var(--r-knob); color:var(--text-muted); }
.seg span.is-on { border-color:var(--accent); background:var(--bg-panel-3); color:var(--accent-dark); }
.select { display:flex; align-items:center; gap:18px; min-height:30px; padding:0 8px 0 10px; border:1px solid var(--border); border-radius:var(--r-ctl); background:var(--bg-panel); color:var(--text); }
.select svg { width:12px; height:12px; color:var(--text-muted); }
.switch { position:relative; width:30px; height:16px; flex-shrink:0; border-radius:var(--r-ctl); background:var(--border-strong); color:var(--text); }
.switch::after { content:""; position:absolute; top:2px; left:2px; width:12px; height:12px; border-radius:var(--r-knob); background:var(--bg-panel); }
.switch-state { font-family:var(--font-mono-zh); font-size:11.5px; color:var(--text-muted); }

/* 仅预览页使用的色板；值仍来自全站令牌。 */
.swatches { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.swatch { min-width:0; border:1px solid var(--border); border-radius:var(--r-ctl); overflow:hidden; }
.swatch-sample { height:64px; background:var(--bg); color:var(--text); }
.swatch code { display:block; padding:10px; font-size:11px; }
.sw-bg { background:var(--bg); }
.sw-panel { background:var(--bg-panel); }
.sw-panel2 { background:var(--bg-panel-2); }
.sw-panel3 { background:var(--bg-panel-3); }
.sw-sunk { background:var(--bg-sunk); }
.sw-code { background:var(--bg-code); }
.sw-border { background:var(--border); }
.sw-border-strong { background:var(--border-strong); }
.sw-dot { background:var(--chrome-dot); }
.sw-accent { background:var(--accent); }
.sw-accent-dark { background:var(--accent-dark); }
.sw-ring { background:var(--accent-ring); }
.sw-line { background:var(--accent-line); }
.sw-text { background:var(--text); }
.sw-muted { background:var(--text-muted); }
.sw-faint { background:var(--text-faint); }
.sw-white { background:var(--on-dark); }
.sw-hover { background:var(--ink-hover); }
.sw-success { background:var(--success); }
.sw-warn { background:var(--warn); }
.sw-error { background:var(--error); }
.sw-veil { background:var(--veil); }
.sw-clear { background:var(--clear); }
.sw-field1 { background:var(--field-1); }
.sw-field2 { background:var(--field-2); }
.sw-field3 { background:var(--field-3); }
@media (max-width:1180px) {
  .intro { grid-template-columns:minmax(0,1fr); }
  .spec { display:none; }
  .app-body { grid-template-columns:160px minmax(0,1fr) 260px; }
}
@media (max-width:900px) {
  .app-detail { display:none; }
  .app-body { grid-template-columns:150px minmax(0,1fr); }
  .console { grid-template-columns:minmax(0,1fr); gap:24px; }
  .console .tab-list { flex-direction:row; overflow-x:auto; }
  .console .tab-list [role="tab"] { min-height:64px; border-left:0; border-bottom:2px solid var(--clear); }
  .console .tab-list [aria-selected="true"] { border-bottom-color:var(--accent); }
}
@media (max-width:768px) {
  .hero h1 { font-size:clamp(24px,4vw,30px); }
}
@media (max-width:640px) {
  .hero { height:auto; min-height:0; }
  .intro { padding-top:36px; }
  .platforms { flex-wrap:wrap; gap:10px 16px; }
  .platforms-rule { display:none; }
  .platform-list { flex-wrap:wrap; gap:12px 18px; }
  .band { flex:none; height:440px; }
  .field { display:none; }
  .app { width:calc(100% - 28px); top:44px; }
  .app-side { display:none; }
  .app-body { grid-template-columns:minmax(0,1fr); }
  .app-search,.app-cols { display:none; }
  .sgroup--route,.sgroup--tun { display:none; }
  .sgroup--proxy { padding-inline:10px; width:100%; gap:6px; white-space:normal; }
  .sgroup--proxy .seg { flex:1; min-width:0; }
  .seg span { padding-inline:5px; font-size:10px; }
  .term-card { grid-template-columns:minmax(0,1fr); gap:12px; }
  .console-content,.download-card { padding:22px; }
  .swatches { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dl-fab { right:16px; bottom:16px; }
}