/* 阅读与条目 */
.tabs, .toc, .toc-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-block: 0 18px;
}
.tabs [role="tab"], :is(.toc, .toc-tabs) a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  max-width: 100%;
  padding: 8px 14px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  text-align: center;
}
.tabs [role="tab"]:hover, :is(.toc, .toc-tabs) a:hover { background: var(--panel-2); color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tabs-blue [role="tab"][aria-selected="true"] { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }
[role="tabpanel"] { min-width: 0; }
.toc-sticky {
  position: sticky;
  z-index: var(--z-toc);
  top: 0;
  padding-block: 10px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px var(--border);
}
.toc-sticky ~ section[id] { scroll-margin-top: 100px; }
.toc-static { position: static; }
@media (max-width: 768px), (max-height: 680px) {
  .toc-sticky { position: static; }
  .toc-sticky ~ section[id] { scroll-margin-top: 0; }
}

.prose { line-height: 1.8; }
.prose :is(h2, h3) { margin-block-start: 1.5em; }
.prose > :first-child { margin-block-start: 0; }
.prose :is(ul, ol) { padding-inline-start: 1.45em; }
.prose li + li { margin-top: .4em; }
.faq-item {
  margin-block: 10px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.faq-item summary {
  position: relative;
  display: block;
  padding: 14px 44px 14px 16px;
  font-weight: var(--weight-medium);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; inset-inline-end: 16px; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 12px 16px 16px; border-top: 1px solid var(--border); }
.faq-answer > :last-child { margin-bottom: 0; }
.callout {
  margin: 1.4em 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--panel-3);
  color: var(--text);
}
.callout > :last-child { margin-bottom: 0; }
.term-card .tag, .post-meta { margin-bottom: 12px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--size-small); color: var(--text-muted); }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }
.client-head { display: flex; align-items: flex-start; gap: 14px; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-name { min-width: 0; }
.client-name h3 { margin-bottom: 6px; }
.client-card .client-head + p { margin-top: 12px; }
.badge, .tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--panel-3);
  color: var(--text);
  font-size: 12px;
}
.badge-first { border-color: var(--badge); background: var(--panel); color: var(--text); }
.badge-recommended { border-color: var(--border-strong); background: var(--panel); color: var(--text); }
.badge-archived { background: var(--panel-2); color: var(--text); border-style: dashed; }
[data-version]:empty { display: none; }
.article-download { margin-block: 32px; border-inline-start: 3px solid var(--ink); }
.dl-fab {
  position: fixed;
  inset-inline-end: max(var(--gutter),env(safe-area-inset-right));
  inset-block-end: max(20px,env(safe-area-inset-bottom));
  z-index: var(--z-fab);
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-drawer);
}
.dl-fab:hover { background: var(--ink-hover); color: var(--on-ink); }
.has-dl-fab { padding-block-end: 82px; }
html.nav-open .dl-fab { visibility: hidden; }

.table-wrap, main table, .prose table, .reading table {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
main table, .data-table, .prose table, .reading table {
  display: block;
  border-collapse: collapse;
  font-size: 14px;
}
.table-wrap > table { display: table; width: 100%; }
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--panel); color: var(--text); }
:where(main, .prose, .reading, .table-wrap) :is(th, td), .data-table :is(th, td) {
  min-width: 7em;
  padding: 10px 14px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
}
:where(main, .prose, .reading) th, .data-table th { background: var(--panel-2); color: var(--text); font-weight: var(--weight-medium); }
table caption { padding: 10px 14px; text-align: start; color: var(--text-muted); }
table tbody tr:last-child > * { border-bottom: 0; }

/* 首页首屏；景观上只有日志光标在动 */
.hero {
  min-height: calc(100svh - var(--nav-h) - 40px);
  display: grid;
  align-content: center;
  padding-block: 24px;
  overflow-x: clip;
}
.hero-grid { display: grid; grid-template-columns: 460px minmax(0,1fr); gap: 56px; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
  padding: 5px 13px 5px 10px;
  background: var(--panel);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-xs);
  font-size: 12.5px;
}
.pill-dot { width: 7px; height: 7px; border-radius: var(--r-round); background: var(--accent); }
.hero-title {
  margin: 0 0 20px;
  font-size: var(--size-hero);
  color: var(--text);
  text-wrap: wrap;
}
.hero-title .ln { display: block; }
.hero-title .ln-soft { color: var(--text-muted); }
.lede { margin: 0 0 30px; max-width: 440px; font-size: 15.5px; line-height: 1.8; color: var(--text-muted); }
.lede strong { color: var(--text); font-weight: var(--weight-medium); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.plats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 20px 0 0;
  margin: 0 0 18px;
  border-top: 1px solid var(--border);
  list-style: none;
}
.plats a { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-muted); text-decoration: none; transition: color var(--ease-ui); }
.plats a:hover { color: var(--text); }
.plats svg { width: 15px; height: 15px; flex-shrink: 0; display: block; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--badge);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text);
  background: var(--panel);
}
.fact-k { font-size: 10.5px; font-weight: var(--weight-label); letter-spacing: .08em; color: var(--badge-text); }

.stage { position: relative; margin: 0; height: clamp(560px,calc(100svh - 190px),740px); }
.scene {
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(ellipse 40% 20% at 66% 47%,var(--scene-sun) 0%,var(--clear) 72%),
    linear-gradient(180deg,var(--scene-sky) 0%,var(--scene-sky-mid) 28%,var(--scene-haze) 50%,var(--scene-haze) 100%);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--scene-edge);
}
.cloud { position: absolute; border-radius: var(--r-round); background: radial-gradient(closest-side,var(--scene-cloud),var(--clear)); filter: blur(10px); }
.c1 { width: 440px; height: 170px; left: -90px; top: -46px; opacity: .9; }
.c2 { width: 480px; height: 160px; right: -120px; top: -34px; opacity: .85; }
.c3 { width: 280px; height: 110px; right: -70px; top: 170px; opacity: .6; }
.c4 { width: 250px; height: 96px; left: -70px; top: 214px; opacity: .55; }
.land { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hill-far { fill: var(--scene-hill-far); }
.hill-near { fill: var(--scene-hill-near); }
.glint { fill: var(--scene-water-lit); opacity: .85; }
.st-bank { stop-color: var(--scene-bank); }
.st-bank-deep { stop-color: var(--scene-bank-deep); }
.st-water-lit { stop-color: var(--scene-water-lit); }
.st-water { stop-color: var(--scene-water); }
.st-water-deep { stop-color: var(--scene-water-deep); }
.riv { fill: none; stroke: var(--scene-water); stroke-linecap: round; }
.riv-hi { fill: none; stroke: var(--scene-water-lit); stroke-width: 1.6; stroke-linecap: round; opacity: .75; }
.lead { fill: none; stroke: var(--scene-line); stroke-width: 1; }
.pin { fill: var(--scene-label); }
.lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; fill: var(--scene-label); }

.win {
  position: absolute;
  left: 10%;
  width: 80%;
  top: 60px;
  height: 488px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-window);
  z-index: 2;
}
.win-bar {
  flex: 0 0 36px;
  display: grid;
  grid-template-columns: 80px minmax(0,1fr) 80px;
  align-items: center;
  padding-inline: 14px;
  background: var(--panel-3);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.dots { display: flex; gap: 7px; }
.dots i { width: 10px; height: 10px; flex-shrink: 0; border-radius: var(--r-round); background: var(--border-strong); }
.win-title { text-align: center; font-size: 12px; letter-spacing: .01em; }
.win-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 108px minmax(0,1fr) 196px; }
.vside { padding: 14px 10px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.vside span { display: block; padding: 7px 10px; font-size: 12.5px; color: var(--text-muted); border-radius: var(--r-sm); }
.vside .on { background: var(--accent-soft); color: var(--accent-dark); font-weight: var(--weight-medium); }
.vmain { padding: 16px 20px; }
.vh { margin: 0 0 4px; font-size: 15px; font-weight: var(--weight-medium); line-height: 1.5; }
.grp { margin: 12px 0 2px; font-size: 11px; color: var(--text-muted); letter-spacing: .04em; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 34px; border-bottom: 1px solid var(--panel-2); }
.row:last-child { border-bottom: 0; }
.row-l { font-size: 12.5px; color: var(--text); }
.row-sub { margin-inline-start: 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
.tg { position: relative; flex: 0 0 auto; width: 28px; height: 16px; border-radius: var(--r-pill); background: var(--border-strong); }
.tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: var(--r-round); background: var(--panel); box-shadow: var(--shadow-xs); }
.tg.on { background: var(--accent); }
.tg.on::after { left: 14px; }
.fld {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.fld .chev { width: 8px; height: 8px; color: var(--text-muted); }
.vcheck { padding: 16px 14px; background: var(--panel-3); color: var(--text); border-left: 1px solid var(--border); border-radius: 0 0 var(--r-lg) 0; }
.ck-title { margin: 0; font-size: 13px; font-weight: var(--weight-medium); }
.ck-sym { margin: 2px 0 10px; font-size: 10.5px; letter-spacing: .06em; color: var(--badge-text); }
.ck { display: grid; grid-template-columns: 14px minmax(0,1fr); gap: 9px; padding: 9px 0; border-top: 1px solid var(--border); }
.box { width: 14px; height: 14px; margin-top: 2px; border: 1.5px solid var(--border-strong); border-radius: var(--r-xs); background: var(--panel); color: var(--text); display: grid; place-items: center; }
.box.done { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.box svg { width: 10px; height: 10px; display: block; }
.tick { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ck-t { font-size: 12px; line-height: 1.45; color: var(--text); }
.ck-t code { font-size: 11px; }
.ck-h { display: block; margin-top: 2px; font-size: 10.5px; line-height: 1.4; color: var(--text-muted); }
.ck-link { display: inline-block; margin-top: 8px; font-size: 11.5px; text-decoration: none; }

.drawer {
  position: absolute;
  right: -36px;
  top: 446px;
  width: 320px;
  max-width: calc(100% - 20px);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-drawer);
  z-index: 3;
}
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--panel-3); color: var(--text); border-bottom: 1px solid var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.dr-name { font-size: 12px; font-weight: var(--weight-medium); }
.dr-state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
.dot-ok { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-round); background: var(--success); }
.dr-body { padding: 9px 12px 11px; font-family: var(--font-mono); font-size: 10.5px; line-height: 1.62; }
.ln-log { display: grid; grid-template-columns: 36px minmax(0,1fr); color: var(--text); }
.lv { color: var(--text-muted); }
.caret { display: inline-block; width: 6px; height: 12px; margin-top: 3px; background: var(--text-muted); animation: estuary-caret 1.1s steps(1) 4; }
@keyframes estuary-caret { 50% { opacity: 0; } }

.next { padding-block: 24px 80px; }
.sec-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 12px; letter-spacing: .1em; color: var(--badge-text); }
.sec-tag::before { content: ""; flex: 0 0 16px; height: 1px; background: var(--badge); }
.sec-title { margin: 0; font-size: 32px; line-height: 1.3; letter-spacing: -.01em; }

/* 五平台细线列表与雾化演示台 */
.platform-list { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--border); }
.platform-list li {
  display: grid;
  grid-template-columns: 18px minmax(76px,.36fr) minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  padding-block: 15px;
  border-bottom: 1px solid var(--border);
}
.platform-list svg { width: 18px; height: 18px; }
.platform-list a { min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.feature-title { margin-bottom: 28px; font-size: var(--size-feature); text-wrap: wrap; }
.feature-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  padding: clamp(14px,6vw,74px);
  min-height: 430px;
}
.feature-stage > .scene { z-index: -1; opacity: .58; }
.feature-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,260px); align-items: center; gap: 20px; }
.feature-layout > * { min-width: 0; }
.feature-window { border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-window); background: var(--panel); color: var(--text); }
.feature-body { padding: clamp(12px,3vw,28px); }
.feature-note { align-self: end; }
.feature-note h3 { margin-top: 0; }
.demo-field { flex: 1 1 190px; min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--panel-3); color: var(--text); }
.feature-body > :last-child { margin-bottom: 0; }

.preview-ruler { border-top: 1px solid var(--border); }
.swatches { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,156px),1fr)); gap: 10px; }
.swatches li { min-width: 0; }
.swatches li::before { content: ""; display: block; height: 34px; margin-bottom: 4px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--swatch); }
.sw-bg { --swatch: var(--bg); }
.sw-panel { --swatch: var(--panel); }
.sw-panel-2 { --swatch: var(--panel-2); }
.sw-panel-3 { --swatch: var(--panel-3); }
.sw-border { --swatch: var(--border); }
.sw-border-strong { --swatch: var(--border-strong); }
.sw-accent { --swatch: var(--accent); }
.sw-accent-dark { --swatch: var(--accent-dark); }
.sw-accent-soft { --swatch: var(--accent-soft); }
.sw-text { --swatch: var(--text); }
.sw-text-muted { --swatch: var(--text-muted); }
.sw-text-faint { --swatch: var(--text-faint); }
.sw-success { --swatch: var(--success); }
.sw-warn { --swatch: var(--warn); }
.sw-error { --swatch: var(--error); }
.sw-badge { --swatch: var(--badge); }
.sw-badge-text { --swatch: var(--badge-text); }
.sw-ink { --swatch: var(--ink); }
.sw-ink-hover { --swatch: var(--ink-hover); }
.sw-on-ink { --swatch: var(--on-ink); }
.sw-veil { --swatch: var(--veil); }
.sw-clear { --swatch: var(--clear); }
.sw-sky { --swatch: var(--scene-sky); }
.sw-sky-mid { --swatch: var(--scene-sky-mid); }
.sw-haze { --swatch: var(--scene-haze); }
.sw-sun { --swatch: var(--scene-sun); }
.sw-cloud { --swatch: var(--scene-cloud); }
.sw-hill-far { --swatch: var(--scene-hill-far); }
.sw-hill-near { --swatch: var(--scene-hill-near); }
.sw-bank { --swatch: var(--scene-bank); }
.sw-bank-deep { --swatch: var(--scene-bank-deep); }
.sw-water { --swatch: var(--scene-water); }
.sw-water-deep { --swatch: var(--scene-water-deep); }
.sw-water-lit { --swatch: var(--scene-water-lit); }
.sw-label { --swatch: var(--scene-label); }
.sw-line { --swatch: var(--scene-line); }
.sw-edge { --swatch: var(--scene-edge); }
.sample-display { font: var(--weight-regular) var(--size-h1)/1.2 var(--font-display); letter-spacing: -.015em; }
.preview-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.preview-hover:not(:disabled) { background: var(--ink-hover); color: var(--on-ink); }
.preview-active:not(:disabled) { background: var(--panel); color: var(--text); border-color: var(--border-strong); box-shadow: inset 0 0 0 1px var(--border-strong); }

@media (max-width: 1279px) {
  .hero-grid { grid-template-columns: 400px minmax(0,1fr); gap: 48px; }
  .drawer { right: -16px; }
}
@media (min-width: 1101px) and (max-width: 1199px) {
  .win-body { grid-template-columns: 76px minmax(0,1fr) 148px; }
  .vside { padding-inline: 6px; }
  .vmain { padding-inline: 12px; }
  .vcheck { padding-inline: 10px; }
}
@media (max-width: 1100px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: minmax(0,1fr); gap: 44px; }
  .stage { height: 640px; }
  .win { left: 5%; width: 90%; }
  .drawer { right: 16px; }
}
@media (max-width: 720px) {
  .stage { height: 560px; }
  .win { left: 4%; width: 92%; top: 40px; height: 420px; }
  .win-body { grid-template-columns: 88px minmax(0,1fr); }
  .vcheck { display: none; }
  .drawer { right: 10px; top: 400px; width: 260px; }
  .sec-title { font-size: 24px; }
  .feature-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
  .facts { justify-content: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
  .hero-copy .ctas { order: -1; order: 0; margin-bottom: 18px; }
  .hero-copy .lede { order: 1; margin-bottom: 20px; }
  .hero-copy :is(.plats, .facts) { order: 2; width: 100%; }
  .hero-copy .pill { margin-bottom: 16px; }
  .platform-list li { grid-template-columns: 18px minmax(0,1fr) auto; gap: 2px 9px; }
  .platform-list li .muted { grid-row: 2; grid-column: 2 / -1; }
  .platform-list li a { grid-column: 3; grid-row: 1; }
}
@media (max-width: 420px) {
  .win-body { grid-template-columns: 62px minmax(0,1fr); }
  .vside { padding-inline: 4px; }
  .vside span { padding-inline: 6px; }
  .vmain { padding-inline: 10px; }
  .win-bar { grid-template-columns: 50px minmax(0,1fr) 50px; }
  .plats { column-gap: 15px; }
}