/* 可交互组件：data-tabs 为独立作用域。 */
.tab-strip, [role="tablist"] {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
[role="tab"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 2px;
  border: 0;
  background: var(--clear);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
[role="tab"]::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; border-radius: var(--r-sm); background: var(--grad); color: var(--white); transform: scaleX(0); transition: transform var(--fast); }
[role="tab"][aria-selected="true"] { color: var(--text-hi); }
[role="tab"][aria-selected="true"]::after { transform: scaleX(1); }
[role="tabpanel"] { min-width: 0; }
[role="tabpanel"]:focus-visible { outline-offset: 6px; }
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 64px; }
.toc { position: sticky; top: 24px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); padding-left: 20px; font-size: 14px; }
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding-block: 8px; color: var(--muted); }
.toc a:hover, .toc a[aria-current] { color: var(--accent-soft); }
.toc-tabs { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-block: 20px; border-block: 1px solid var(--line); }
.toc-tabs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item summary { position: relative; padding: 24px 36px 24px 0; list-style: none; cursor: pointer; color: var(--text-hi); font-size: 17px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; top: 24px; right: 4px; color: var(--muted); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 24px; color: var(--muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { border-top: 1px solid var(--line); padding-top: 24px; padding-bottom: 28px; }
.term-card h3 { margin-bottom: 8px; }
.term-card .term-key { display: block; font: 13px var(--f-mono); color: var(--muted); margin-bottom: 18px; }
.term-card p { color: var(--muted); margin-bottom: 0; }
.badge, .tag, .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: normal;
  vertical-align: middle;
}
.badge--first, .badge--recommended { border-color: var(--accent-dark); color: var(--accent-soft); }
.badge--archived { color: var(--muted); border-style: dashed; }
.badge--success { color: var(--success); }
.badge--warn { color: var(--warn); }
.badge--error { color: var(--error); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.client-card__head { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.client-card__head > div { min-width: 0; flex: 1; }
.client-card__head h3 { margin-bottom: 8px; }
.app-logo { width: 56px; height: 56px; flex-shrink: 0; }
.client-card__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.client-card__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 13px; }
[data-rev]:empty { display: none; }
.post-card { display: flex; flex-direction: column; align-items: flex-start; }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin-bottom: 24px; }
.post-card h3 a { color: var(--text-hi); }
.post-card .more { margin-top: auto; padding-top: 16px; }
.callout { margin: 28px 0; padding: 20px 24px; border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--r-sm); background: var(--panel); color: var(--text); }
.callout p { margin: 0; }
.callout p + p { margin-top: 12px; }
.callout--warn { border-left-color: var(--warn); }
.callout--error { border-left-color: var(--error); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--line); border-radius: var(--r-md); }
.data-table { width: 100%; border-collapse: collapse; color: var(--text); font-size: 14px; text-align: left; }
.data-table caption { padding: 14px 16px; text-align: left; color: var(--muted); }
.data-table th, .data-table td, .prose table th, .prose table td, .article-body table th, .article-body table td {
  min-width: 7em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: top;
}
.data-table th { background: var(--panel-2); color: var(--text-hi); font-weight: 500; }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .article-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  overscroll-behavior-inline: contain;
}
.prose table code, .article-body table code, .data-table code { overflow-wrap: anywhere; }
.article-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); margin-top: 56px; padding-top: 32px; padding-bottom: 16px; }
.article-download > div { flex: 1 1 240px; min-width: 0; }
.article-download h2 { font-size: 24px; margin: 0 0 8px; }
.article-download p { color: var(--muted); margin: 0; }
.dl-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: calc(100vw - 40px);
  min-height: 56px;
  padding: 12px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--panel-2);
  color: var(--text-hi);
  box-shadow: var(--shadow-card);
  font-size: 14px;
}
.dl-fab svg { color: var(--accent-soft); flex-shrink: 0; }
.dl-fab:hover { border-color: var(--accent); text-decoration: none; }
.dl-fab small { display: block; color: var(--muted); font-size: 12px; }
.has-dl-fab .site-footer { padding-bottom: 112px; }

/* 首屏：按确认稿保留双设备、窗口尺寸与右上偏置微光，无动画。 */
.hero { position: relative; min-height: calc(100svh - var(--nav-h)); display: grid; align-content: center; padding-top: 28px; padding-bottom: 28px; overflow-x: clip; }
.hero__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "copy act" "stage stage"; column-gap: 64px; row-gap: clamp(32px, 4.6vh, 48px); align-items: end; }
.hero__copy { grid-area: copy; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.chips li { max-width: 100%; font-family: var(--f-mono); font-size: 12px; line-height: 1.4; color: var(--muted); padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel); overflow-wrap: anywhere; }
.hero__title { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(34px, 1rem + 2.2vw, 48px); line-height: 1.12; letter-spacing: -.01em; color: var(--text-hi); }
.lead { margin: 16px 0 0; max-width: 35em; font-size: 17px; line-height: 1.65; color: var(--muted); }
.lead strong { color: var(--text-hi); font-weight: 500; }
.hero__act { grid-area: act; display: flex; flex-direction: column; gap: 22px; padding-bottom: 4px; }
.platforms { display: flex; flex-wrap: wrap; gap: 22px; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; }
.platforms a { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.platforms a:hover { color: var(--text-hi); text-decoration: none; }
.platforms svg { width: 15px; height: 15px; flex-shrink: 0; fill: currentColor; }
.stage { grid-area: stage; position: relative; margin: 0 0 52px; min-width: 0; }
.glow { position: absolute; z-index: 0; left: calc(88% - 270px); top: -190px; width: 580px; height: 460px; pointer-events: none; background: var(--glow); color: var(--text); }
.win { position: relative; z-index: 1; width: 88%; height: clamp(420px, 55.5vh, 560px); display: grid; grid-template-rows: 38px minmax(0, 1fr); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-win); overflow: hidden; }
.win__bar { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--panel-0); color: var(--muted); border-bottom: 1px solid var(--line); }
.win__dot { width: 11px; height: 11px; flex-shrink: 0; border-radius: var(--r-round); background: var(--line-2); color: var(--text); }
.win__title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.win__body { display: grid; grid-template-columns: 184px minmax(0, 1fr) 39%; min-height: 0; }
.pane { display: grid; grid-template-rows: 36px minmax(0, 1fr); min-width: 0; min-height: 0; }
.pane + .pane { border-left: 1px solid var(--line); }
.pane__head { display: flex; align-items: flex-end; gap: 2px; padding: 0 10px; background: var(--panel-0); color: var(--muted); border-bottom: 1px solid var(--line); }
.pane--side .pane__head { align-items: center; gap: 14px; padding: 0 16px; }
.pane__main { position: relative; min-height: 0; min-width: 0; }
.pane--side .pane__main { background: var(--panel); color: var(--text); padding: 10px 8px; }
.pane--edit .pane__main { background: var(--panel-1); color: var(--text); padding-top: 14px; }
.pane--topo .pane__main { background: var(--panel-1); color: var(--text); }
.ftab { display: flex; align-items: center; gap: 8px; height: 29px; margin-bottom: -1px; padding: 0 12px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--clear); border-radius: var(--r-sm) var(--r-sm) 0 0; white-space: nowrap; }
.ftab.is-on { background: var(--panel-1); color: var(--text); border-color: var(--line); border-bottom-color: var(--panel-1); }
.ftab__x { color: var(--muted); font-size: 11px; }
.snav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.snav li { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--r-sm); font-size: 13px; color: var(--muted); }
.snav li.is-on { background: var(--panel-2); color: var(--text-hi); }
.side-foot { position: absolute; left: 8px; right: 8px; bottom: 0; display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.dot-ok { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-round); background: var(--success); color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, var(--clear)); }
.mock-code { position: relative; max-width: 100%; height: calc(100% - 28px); overflow: auto; font-family: var(--f-mono); font-size: 12.5px; }
.mock-code pre { margin: 0; padding: 0 18px 18px 58px; border: 0; border-radius: 0; background: var(--clear); color: var(--text); font-size: inherit; line-height: 21px; min-width: max-content; overflow: visible; }
.mock-code pre::before { content: "1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9\A 10\A 11\A 12\A 13\A 14\A 15"; position: absolute; top: 0; left: 10px; white-space: pre; text-align: right; width: 30px; color: var(--muted); }
.mock-code::after { content: ""; position: absolute; top: 87px; left: 50px; width: 2px; height: 78px; background: var(--grad); color: var(--white); border-radius: var(--r-sm); }
.k { color: var(--accent-soft); }
.c { color: var(--muted); }
.ed-status { position: absolute; left: 0; right: 0; bottom: 0; min-height: 28px; display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 4px 16px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.topo { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-ring { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 5; }
.t-edge { fill: none; stroke: var(--line-2); stroke-width: 1; }
.t-dot { fill: var(--silver); }
.t-dot--w { fill: var(--text); }
.t-dot--g { fill: var(--success); }
.t-out { fill: var(--white); }
.t-label { fill: var(--muted); font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; }
.phone { position: absolute; z-index: 3; left: calc(88% - 178px); bottom: -52px; width: 210px; height: 424px; padding: 5px; border-radius: var(--r-phone); background: var(--ink); color: var(--text); border: 1px solid var(--silver); box-shadow: var(--shadow-phone); transform: rotate(3deg); transform-origin: 50% 100%; }
.phone__screen { position: relative; height: 100%; padding: 10px 14px 0; border-radius: calc(var(--r-phone) - 6px); background: var(--ink); color: var(--text); overflow: hidden; }
.phone__status { display: flex; justify-content: flex-end; align-items: center; gap: 5px; height: 20px; padding-right: 4px; color: var(--text); }
.phone__status svg { height: 9px; width: auto; }
.sb-fill { fill: currentColor; }
.sb-line { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.phone__bar { display: flex; justify-content: space-between; margin-top: 10px; }
.pbtn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-round); background: var(--panel); color: var(--muted); font-size: 12px; }
.pbtn--pill { width: auto; padding: 0 12px; border-radius: var(--r-pill); letter-spacing: .12em; }
.phone__title { margin: 16px 0 14px 2px; font-size: 20px; font-weight: 500; color: var(--text-hi); line-height: 1.4; }
.phone__label { margin: 0 0 6px 4px; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.plist { list-style: none; margin: 0 0 16px; padding: 0 12px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-xl); }
.plist li { display: flex; justify-content: space-between; align-items: center; height: 40px; font-size: 12.5px; color: var(--text); }
.plist li + li { border-top: 1px solid var(--line); }
.tg { position: relative; flex-shrink: 0; width: 30px; height: 18px; border-radius: var(--r-pill); background: var(--line-2); color: var(--text); }
.tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: var(--r-round); background: var(--muted); color: var(--ink); }
.tg.is-on { background: var(--grad); color: var(--white); }
.tg.is-on::after { left: 14px; background: var(--white); color: var(--ink); }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: 12px; }
.seg3 span { display: grid; place-items: center; height: 28px; border-radius: var(--r-sm); color: var(--muted); }
.seg3 .is-on { background: var(--panel-2); color: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--line-2); }
.phone__dock { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 40px; display: flex; justify-content: space-around; align-items: center; border-radius: var(--r-pill); background: var(--panel); color: var(--muted); border: 1px solid var(--line); }
.phone__dock .is-on { color: var(--text-hi); }
.manifesto { border-top: 1px solid var(--line); padding-top: clamp(96px, 14vh, 160px); padding-bottom: clamp(96px, 14vh, 160px); }
.manifesto__in { display: grid; grid-template-columns: 58fr 42fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.claim { padding-block: 28px; border-top: 1px solid var(--line); }
.claim:first-child { padding-top: 0; border-top: 0; }
.claim:last-child { padding-bottom: 0; }
.claim h2 { margin: 0 0 10px; font-size: 20px; font-weight: 500; line-height: 1.4; }
.claim p { margin: 0; max-width: 34em; font-size: 16px; line-height: 1.75; color: var(--muted); }
.tile-col { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tile { width: min(100%, 400px); aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--r-tile); border: 1px solid var(--line); background: var(--panel-2); color: var(--text); box-shadow: var(--shadow-card); }
.tile img { width: 46%; height: auto; }
.tile__name { margin: 32px 0 6px; font-size: 22px; font-weight: 500; color: var(--text-hi); }
.tile__link { font-size: 18px; color: var(--accent-soft); }
.bento-heading { margin-bottom: 40px; font-weight: 400; }
.bento .card { display: flex; flex-direction: column; }
.bento .table-scroll { margin-top: 24px; }
.flow-diagram { width: 100%; height: auto; margin-top: 24px; }
.flow-diagram rect { fill: var(--panel-2); stroke: var(--line-2); }
.flow-diagram path { fill: none; stroke: var(--muted); stroke-width: 1.2; }
.flow-diagram text { fill: var(--text); font: 12px var(--f-body); text-anchor: middle; }

/* 设计预览家具，不参与正式页面内容。 */
.preview-title { font-size: 13px; font-family: var(--f-mono); color: var(--muted); margin-bottom: 24px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.swatch { min-width: 0; font-size: 12px; font-family: var(--f-mono); color: var(--muted); }
.swatch i { display: block; height: 64px; margin-bottom: 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--swatch); color: var(--text); }
.swatch--bg { --swatch: var(--bg); }
.swatch--p0 { --swatch: var(--panel-0); }
.swatch--p { --swatch: var(--panel); }
.swatch--p1 { --swatch: var(--panel-1); }
.swatch--p2 { --swatch: var(--panel-2); }
.swatch--line { --swatch: var(--line); }
.swatch--line2 { --swatch: var(--line-2); }
.swatch--accent { --swatch: var(--accent); }
.swatch--dark { --swatch: var(--accent-dark); }
.swatch--soft { --swatch: var(--accent-soft); }
.swatch--text { --swatch: var(--text); }
.swatch--hi { --swatch: var(--text-hi); }
.swatch--muted { --swatch: var(--muted); }
.swatch--dim { --swatch: var(--dim); }
.swatch--silver { --swatch: var(--silver); }
.swatch--white { --swatch: var(--white); }
.swatch--ink { --swatch: var(--ink); }
.swatch--success { --swatch: var(--success); }
.swatch--warn { --swatch: var(--warn); }
.swatch--error { --swatch: var(--error); }
.swatch--grad { --swatch: var(--grad); }
.preview-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.preview-drawer { display: none; position: relative; }
.preview-drawer > summary { list-style: none; }
.preview-drawer[open] > nav { display: block; }
.preview-drawer nav { position: absolute; top: calc(100% + 10px); right: 0; width: min(280px, calc(100vw - 40px)); padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); color: var(--text); max-height: calc(100dvh - 90px); overflow-y: auto; }
.preview-drawer nav a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 12px; color: var(--text); }
@media (max-width: 1080px) {
  .hero__in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "act" "stage"; }
  .hero__act { padding-bottom: 0; }
}
@media (max-width: 960px) {
  .preview-drawer { display: block; }
}
@media (max-width: 900px) {
  .win { width: 100%; }
  .win__body { grid-template-columns: 150px minmax(0, 1fr); }
  .pane--topo { display: none; }
  .phone { left: auto; right: -6px; transform: rotate(3deg) scale(.82); transform-origin: 100% 100%; }
  .glow { left: auto; right: -260px; }
  .manifesto__in { grid-template-columns: minmax(0, 1fr); }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .toc { position: static; max-height: none; }
}
@media (max-width: 768px) {
  .hero__title { font-size: clamp(24px, 4vw, 30px); }
}
@media (max-width: 640px) {
  .lead { font-size: 15.5px; }
  .platforms { gap: 12px 18px; }
  .pane--side { display: none; }
  .pane--edit { border-left: 0; }
  .win__body { grid-template-columns: minmax(0, 1fr); }
  .win { height: 380px; }
  .phone { transform: scale(.62); bottom: -40px; }
  .stage { margin-bottom: 40px; }
  .win__title { left: auto; right: 12px; transform: none; font-size: 11px; }
  .tab-strip, [role="tablist"] { gap: 12px; }
  .badge-row { flex-direction: row; flex-wrap: wrap; }
}