/* 晴空首屏：只对标题执行一次入场，装置始终静止。 */
.sky {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg,var(--sky-top) 0%,var(--sky) 42%,var(--sky-fade) 100%);
  color: var(--text);
}
.sky::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(36% 24% at 6% 76%,var(--cloud) 0%,var(--cloud-mid) 40%,var(--cloud-0) 72%),
    radial-gradient(28% 22% at 97% 50%,var(--cloud) 0%,var(--cloud-mid) 42%,var(--cloud-0) 72%),
    radial-gradient(24% 14% at 15% 20%,var(--cloud-mid) 0%,var(--cloud-0) 70%);
  color: var(--text);
}
.sky > * { position: relative; z-index: 1; }
.sky > #site-header { z-index: 40; }
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 24px 0; }
.notice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 4px 16px 4px 6px;
  margin: 0 0 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.notice-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 22px;
  padding-inline: 10px;
  border-radius: var(--r-pill);
  background: var(--success);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.headline {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px,3.4vw,48px);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--text);
}
.headline .row { display: block; }
.w { display: inline-block; animation: workbench-rise .62s var(--ease) both; }
.w1 { animation-delay: 0s; }
.w2 { animation-delay: .07s; }
.w3 { animation-delay: .14s; }
.w4 { animation-delay: .21s; }
.w5 { animation-delay: .34s; }
.w6 { animation-delay: .42s; }
.w7 { animation-delay: .5s; }
.w-mark { position: relative; }
.w-mark::after {
  content: "";
  position: absolute;
  left: .02em;
  right: .02em;
  bottom: -.05em;
  height: .12em;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--text);
  transform-origin: 0 50%;
  animation: workbench-underline .46s .64s var(--ease) both;
}
@keyframes workbench-rise {
  from { opacity: 0; transform: translateY(.55em); }
  to { opacity: 1; transform: none; }
}
@keyframes workbench-underline {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.lede { margin: 0 0 22px; max-width: 860px; font-size: 16px; line-height: 1.65; color: var(--text-muted); }
.lede strong { color: var(--text); font-weight: 700; }
.os-row { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.os-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 14px 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.os-row a:hover { background: var(--glass-strong); color: var(--accent); }
.os-row svg { width: 15px; height: 15px; flex-shrink: 0; display: block; }
.rig { height: clamp(400px,calc(100svh - 475px),720px); overflow: hidden; perspective: 2200px; }
.notebook { width: min(70vw,1060px); margin: 6px auto 0; transform: rotateX(7deg); transform-origin: 50% 100%; }
.lid { position: relative; padding: 9px; border-radius: var(--r-lid); background: linear-gradient(180deg,var(--alu-1),var(--alu-2)); color: var(--text); box-shadow: var(--shadow-device); }
.lid::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid var(--alu-edge); pointer-events: none; }
.lid-frame { padding: 3px; border-radius: var(--r-frame); background: linear-gradient(180deg,var(--alu-3),var(--alu-1)); color: var(--text); }
.bezel { position: relative; padding: 6px; border-radius: var(--r-bezel); background: var(--text); color: var(--bg-panel); }
.bezel::before { content: ""; position: absolute; top: 1px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: var(--r-circle); background: var(--cam); color: var(--bg-panel); }
.screen {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: var(--r-screen);
  overflow: hidden;
  background:
    radial-gradient(60% 46% at 74% 88%,var(--cloud-mid),var(--cloud-0) 70%),
    radial-gradient(44% 36% at 16% 18%,var(--cloud-mid),var(--cloud-0) 70%),
    linear-gradient(175deg,var(--wall-top),var(--wall-bottom));
  color: var(--text);
}
.taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; display: flex; align-items: center; justify-content: center; gap: 9px; background: var(--glass-strong); color: var(--text); border-top: 1px solid var(--glass-line); }
.tb-start { width: 22px; height: 22px; display: grid; place-items: center; color: var(--navy-2); }
.tb-start svg { width: 17px; height: 17px; display: block; }
.tb-app { width: 22px; height: 22px; border-radius: var(--r-xs); flex-shrink: 0; }
.tb-a0 { background: var(--ink-2); color: var(--bg-panel); }
.tb-a1 { background: var(--navy-2); color: var(--bg-panel); }
.tb-a2 { background: var(--ice); color: var(--text); border: 1px solid var(--glass-line); }
.tb-a3 { background: var(--lavender); color: var(--text); }
.tb-a4 { background: var(--blush); color: var(--text); }
.notebook-base { position: relative; height: 20px; margin: 0 -5%; background: linear-gradient(180deg,var(--alu-1),var(--alu-2)); color: var(--text); clip-path: polygon(1.6% 0,98.4% 0,100% 100%,0 100%); border-radius: var(--r-base); }
.notebook-base::before { content: ""; position: absolute; top: 0; left: 50%; width: 14%; height: 6px; transform: translateX(-50%); border-radius: var(--r-notch); background: var(--alu-2); color: var(--text); }
.notebook-base::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 30%; height: 4px; transform: translateX(-50%); border-radius: var(--r-trackpad); background: var(--alu-3); color: var(--text); }
.scene { position: absolute; top: 30px; left: 50%; width: min(90%,870px); transform: translateX(-50%); }
.appwin { width: calc(100% - 214px); border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-win); }
.appwin-bar { height: 34px; display: flex; align-items: center; padding-left: 14px; border-bottom: 1px solid var(--border); }
.appwin-mark { width: 14px; height: 14px; border-radius: var(--r-xs); background: var(--ink-2); color: var(--bg-panel); flex-shrink: 0; }
.appwin-title { margin-left: 8px; font-size: 12px; font-weight: 600; }
.appwin-ctrl { margin-left: auto; display: flex; }
.appwin-ctrl span { width: 42px; height: 34px; display: grid; place-items: center; color: var(--text-muted); font-size: 14px; }
.appwin-body { display: grid; grid-template-columns: 150px minmax(0,1fr); }
.appwin-side { list-style: none; margin: 0; padding: 10px 8px; background: var(--bg-panel2); color: var(--text-muted); border-right: 1px solid var(--border); }
.appwin-side li { position: relative; height: 32px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--r-control); font-size: 12.5px; font-weight: 500; }
.appwin-side li.is-current { background: var(--sel); color: var(--text); font-weight: 700; }
.appwin-side li.is-current::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 3px; border-radius: var(--r-pill); background: var(--navy-2); color: var(--bg-panel); }
.appwin-pane { padding: 8px 22px 8px 20px; }
.opt { min-height: 33px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--bg-panel2); font-size: 12.5px; font-weight: 500; }
.opt:last-child { border-bottom: 0; }
.opt-box { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-control); border: 1px solid var(--border); background: var(--bg-panel2); color: var(--text); font-family: var(--font-mono); font-size: 11.5px; }
.opt-group { display: inline-flex; align-items: center; gap: 8px; }
.opt-sub { font-size: 11.5px; color: var(--text-muted); }
.sw { position: relative; width: 30px; height: 17px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--toggle-off); color: var(--text); }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: var(--r-circle); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-knob); }
.sw-on { background: var(--success); color: var(--text); }
.sw-on::after { left: 15px; }
.yaml-chip { position: absolute; right: 0; bottom: -26px; width: 226px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-float); transform: rotate(-4deg); }
.yaml-head { height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--bg-panel2); color: var(--text); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.yaml-tag { padding: 1px 7px; border-radius: var(--r-xs); border: 1px solid var(--border); background: var(--bg-panel); color: var(--text-muted); font-family: var(--font-body); font-size: 10.5px; font-weight: 500; }
.yaml-code { margin: 0; padding: 10px 12px 12px; background: var(--bg-panel); color: var(--text); font-family: var(--font-mono); font-size: 12px; line-height: 1.75; border-radius: 0; }
.yaml-code .ln { display: inline-block; width: 18px; color: var(--text-muted); }
.yaml-code .k { color: var(--navy-2); }
.yaml-code .v { font-weight: 700; }

/* Tabs：常规面板与横向陈列轨共用交互契约。 */
.tabs, [role="tablist"] { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 20px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--bg-panel2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.tab:hover { color: var(--accent); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--bg-panel); }
.tabpanels { margin-top: 28px; min-width: 0; }
[role="tabpanel"]:focus-visible { outline-offset: 6px; }
.shelf { background: var(--bg-panel); color: var(--text); padding-top: 88px; padding-bottom: 96px; text-align: center; }
.shelf h2 { margin: 0 0 14px; }
.section-intro { margin: 0 auto 28px; max-width: 620px; font-size: 16px; line-height: 1.65; color: var(--text-muted); }
.shelf-toolbar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px; margin-bottom: 32px; }
.rail-arrows { display: flex; gap: 10px; }
.rail-arrow { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: var(--r-circle); background: var(--bg-panel2); color: var(--text); font-size: 25px; }
.feature-rail {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 4px var(--gutter) 28px;
  text-align: left;
  overscroll-behavior-inline: contain;
}
.feature-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 clamp(300px,32vw,420px);
  min-width: 0;
  padding: 30px;
  border-radius: var(--r-lg);
  scroll-snap-align: start;
  box-shadow: var(--shadow-card);
  transition: transform var(--quick);
}
.feature-card:hover { transform: translateY(-2px); }
.feature-card h3 { margin: 20px 0 8px; }
.feature-card p { font-size: 15px; }
.feature-card pre { margin-top: auto; }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--glass-strong); color: var(--text); }
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tone-navy { background: linear-gradient(145deg,var(--navy),var(--navy-2)); color: var(--bg-panel); }
.tone-ice { background: linear-gradient(145deg,var(--bg-panel2),var(--ice)); color: var(--text); }
.tone-lavender { background: linear-gradient(155deg,var(--lavender),var(--bg-panel2)); color: var(--text); }
.tone-blush { background: linear-gradient(155deg,var(--blush),var(--bg-panel)); color: var(--text); }
.feature-card .btn-line { align-self: flex-start; background: var(--bg-panel); color: var(--text); }
.feature-card .btn-line:hover { color: var(--accent); }

/* 长文与内容卡片 */
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); margin-bottom: 32px; }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-pill); text-decoration: none; font-size: 14px; }
.toc a:hover { background: var(--bg-panel2); color: var(--accent); }
.toc-sticky { position: sticky; top: 12px; z-index: 10; }
.faq-item { border-bottom: 1px solid var(--border); padding-block: 6px; }
.faq-item summary { list-style: none; position: relative; padding: 18px 36px 18px 0; font-weight: 700; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 22px; color: var(--text-muted); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 28px 18px 0; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { background: var(--bg-panel2); color: var(--text); border: 0; }
.term-card dt { font-size: 21px; font-weight: 800; margin-bottom: 8px; }
.term-card dd { margin: 0; color: var(--text-muted); }
.term-en { display: block; font-size: 12px; font-family: var(--font-mono); font-weight: 500; color: var(--text-muted); margin-top: 4px; }
.client-card { position: relative; box-shadow: var(--shadow-card); }
.client-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.client-head > div { min-width: 0; }
.client-head h3 { margin: 0 0 8px; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; color: var(--text-muted); font-size: 13px; }
[data-ver]:empty { display: none; }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.badge, .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-panel2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: normal;
}
.badge::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--text-muted); color: var(--text); }
.badge-first, .badge-recommended { background: var(--bg-panel2); color: var(--text); }
.badge-first::before, .badge-recommended::before { background: var(--success); color: var(--text); }
.badge-archived { background: var(--bg-panel2); color: var(--text-muted); }
.badge-archived::before { background: var(--warn); color: var(--text); }
.badge-error::before { background: var(--error); color: var(--bg-panel); }
.post-card { display: flex; flex-direction: column; }
.post-card h3 { margin: 18px 0 12px; font-size: 22px; }
.post-card h3 a { text-decoration: none; }
.post-card p { color: var(--text-muted); font-size: 15px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 12px; color: var(--text-muted); }
.post-card .post-link { margin-top: auto; padding-top: 16px; font-weight: 700; font-size: 14px; }
.callout { margin: 24px 0; padding: 22px 24px; border-left: 4px solid var(--navy-2); border-radius: var(--r-sm); background: var(--bg-panel2); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout-warn { border-left-color: var(--warn); }
.article-download { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; margin-top: 40px; background: linear-gradient(140deg,var(--ice),var(--bg-panel2)); color: var(--text); }
.article-download > div { flex: 1 1 260px; min-width: 0; }
.article-download h2 { font-size: 24px; margin: 0 0 10px; }
.article-download p { margin: 0; color: var(--text-muted); }
.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-sm); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; background: var(--bg-panel); color: var(--text); }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: top;
}
.data-table th, .prose table th { background: var(--bg-panel2); color: var(--text); font-weight: 700; }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .article-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
}
.article-body table th, .article-body table td { min-width: 7em; padding: 14px 18px; overflow-wrap: normal; word-break: normal; }
.data-table code, .prose table code, .article-body table code { overflow-wrap: anywhere; white-space: normal; }
.dl-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px 10px 16px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg-panel);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: var(--shadow-float);
}
.dl-fab:hover { background: var(--ink-2); color: var(--bg-panel); }

/* 预览色板 */
.token-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 16px; }
.token { margin: 0; min-width: 0; }
.token-sample { display: block; height: 64px; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); }
.token figcaption { font-size: 12px; margin-top: 8px; font-family: var(--font-mono); overflow-wrap: anywhere; }
.swatch-sky { background: var(--sky); }
.swatch-sky-top { background: var(--sky-top); }
.swatch-sky-fade { background: var(--sky-fade); }
.swatch-panel { background: var(--bg-panel); }
.swatch-panel2 { background: var(--bg-panel2); }
.swatch-border { background: var(--border); }
.swatch-accent { background: var(--accent); }
.swatch-accent-dark { background: var(--accent-dark); }
.swatch-text { background: var(--text); }
.swatch-ink2 { background: var(--ink-2); }
.swatch-muted { background: var(--text-muted); }
.swatch-success { background: var(--success); }
.swatch-warn { background: var(--warn); }
.swatch-error { background: var(--error); }
.swatch-navy { background: var(--navy); }
.swatch-navy2 { background: var(--navy-2); }
.swatch-ice { background: var(--ice); }
.swatch-lavender { background: var(--lavender); }
.swatch-blush { background: var(--blush); }
.swatch-sel { background: var(--sel); }
.swatch-off { background: var(--toggle-off); }
.swatch-line { background: var(--line-num); }
.swatch-cam { background: var(--cam); }
.swatch-glass { background: var(--glass); }
.swatch-glass-strong { background: var(--glass-strong); }
.swatch-glass-line { background: var(--glass-line); }
.swatch-cloud { background: var(--cloud); }
.swatch-cloud-mid { background: var(--cloud-mid); }
.swatch-cloud0 { background: var(--cloud-0); }
.swatch-alu1 { background: var(--alu-1); }
.swatch-alu2 { background: var(--alu-2); }
.swatch-alu3 { background: var(--alu-3); }
.swatch-alu-edge { background: var(--alu-edge); }
.swatch-wall-top { background: var(--wall-top); }
.swatch-wall-bottom { background: var(--wall-bottom); }
.swatch-veil { background: var(--veil); }
.preview-states { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.preview-type h1 { margin-top: 0; }
.preview-language summary { list-style: none; }
.preview-language summary::-webkit-details-marker { display: none; }
@media (max-width: 1100px) {
  .yaml-chip { display: none; }
  .appwin { width: 100%; }
  .scene { width: min(86%,640px); }
}
@media (max-width: 768px) {
  .headline { font-size: clamp(24px,7vw,30px); }
  .lede { font-size: 15px; }
}
@media (max-width: 760px) {
  .rig { height: 320px; }
  .notebook { width: 94vw; transform: rotateX(5deg); }
  .scene { top: 14px; width: 94%; }
  .appwin-body { grid-template-columns: 96px minmax(0,1fr); }
  .appwin-side li { padding-inline: 10px; font-size: 11px; }
  .appwin-pane { padding: 6px 12px; }
  .opt { font-size: 11px; }
  .shelf { padding-top: 56px; padding-bottom: 56px; }
}
@media (max-width: 640px) {
  .yaml-chip { transform: none; }
  .hero-copy { padding-inline: var(--gutter); }
  .notice { font-size: 12px; gap: 7px; }
  .os-row { gap: 8px; }
  .os-row a { font-size: 12px; padding-inline: 10px; }
  .feature-card { flex-basis: min(86vw,360px); padding: 24px; }
  .dl-fab { right: 16px; bottom: 16px; }
  .toc-sticky { position: static; }
}
@media (max-width: 380px) {
  .appwin-body { grid-template-columns: 80px minmax(0,1fr); }
  .appwin-side { padding-inline: 4px; }
  .appwin-side li { padding-inline: 8px; font-size: 10px; }
  .appwin-title { font-size: 10px; }
  .appwin-ctrl span { width: 23px; }
  .appwin-pane { padding-inline: 8px; }
  .opt { font-size: 10px; gap: 4px; }
  .opt-sub { font-size: 9px; }
  .opt-group { gap: 4px; }
}