/* ============================================================
   SQ 密钥授权系统 · 产品宣传页
   设计方向：授权白皮书 / 编辑级排版 / 瓷白纸面 + 墨黑 + 朱红
   ============================================================ */

:root {
  color-scheme: light;
  --paper: #f4f6fa;
  --paper-2: #ffffff;
  --paper-3: #f8fafd;
  --ink: #0d1117;
  --ink-2: #1f2630;
  --ink-3: #121722;
  --muted: #5a6472;
  --muted-2: #8b95a3;
  --line: #e2e7ef;
  --line-2: #d2d9e4;
  --accent: #2f6be4;
  --accent-2: #1f4fc0;
  --accent-soft: rgba(47, 107, 228, 0.1);
  --cyan: #0aa5a0;
  --green: #15805f;
  --red: #d84040;
  --amber: #c9a227;
  --blue: #2748c7;
  --header-bg: rgba(244, 246, 250, 0.86);
  --shadow-soft: 0 12px 26px rgba(13, 17, 23, 0.1);
  --shadow-strong: 0 36px 70px rgba(13, 17, 23, 0.22);
  --radius: 8px;
  --radius-sm: 6px;
  --shell: min(1240px, calc(100% - 48px));
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    sans-serif;
  --mono: "Cascadia Mono", Consolas, "JetBrains Mono", "SF Mono", monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b0e14;
  --paper-2: #11151d;
  --paper-3: #151a23;
  --ink: #eef2f8;
  --ink-2: #c9d2de;
  --ink-3: #0d1117;
  --muted: #96a1b0;
  --muted-2: #6e7a8a;
  --line: #222a36;
  --line-2: #2e3846;
  --accent: #4a86ff;
  --accent-2: #2f6be4;
  --accent-soft: rgba(74, 134, 255, 0.16);
  --cyan: #22d3c5;
  --green: #34c78d;
  --red: #ff6b6b;
  --amber: #e0a13a;
  --blue: #7aa2ff;
  --header-bg: rgba(11, 14, 20, 0.88);
  --shadow-soft: 0 12px 26px rgba(0, 0, 0, 0.5);
  --shadow-strong: 0 36px 70px rgba(0, 0, 0, 0.62);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  display: block;
}

/* 内联图标统一为描边风格（fill/stroke 会继承进 <use> 的影子树） */
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

code,
pre {
  font-family: var(--mono);
}

section[id] {
  scroll-margin-top: 84px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

/* ---------------- progress ---------------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  background: transparent;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(23, 64, 196, 0.18);
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand strong {
  font-size: 0.95rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(15, 18, 22, 0.05);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, box-shadow 0.18s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-lg {
  min-height: 50px;
  padding: 0 24px;
  font-size: 0.98rem;
}

.btn-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn-ink:hover {
  background: #000;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-2);
}

.btn-line {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}

.btn-line:hover {
  border-color: var(--ink);
}

.btn-light {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.btn-ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-ghost-light:hover {
  border-color: #fff;
}

/* ---------------- rail ---------------- */
.rail {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--muted-2);
  transition: color 0.2s ease;
}

.rail i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.66rem;
  width: 18px;
}

.rail span {
  font-size: 0.72rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rail a:hover,
.rail a.is-active {
  color: var(--accent);
}

.rail a:hover span,
.rail a.is-active span {
  opacity: 1;
  transform: translateX(0);
}

/* ---------------- hero ---------------- */
.hero {
  padding: 92px 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  padding-bottom: 72px;
}

.kicker {
  margin: 0 0 22px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.hero-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 5vw, 4.35rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: 0;
}

.hero-copy h1 em {
  color: var(--accent);
  font-style: normal;
}

.lead {
  margin: 0 0 30px;
  max-width: 36em;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 42px 0 0;
  border-top: 1px solid var(--line-2);
}

.hero-meta div {
  padding: 16px 18px 0 0;
}

.hero-meta div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.hero-meta dt {
  font-family: var(--mono);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
}

.hero-meta dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------------- hero mockup ---------------- */
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 16px -16px -16px 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  transform: rotate(1.4deg);
  z-index: 0;
}

.app-window {
  position: relative;
  z-index: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink-3);
  border: 1px solid #252b33;
  box-shadow: 0 36px 70px rgba(15, 18, 22, 0.28);
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: #0c0f13;
  border-bottom: 1px solid #232830;
}

.app-bar .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2c333c;
}

.app-bar .dot:first-child {
  background: #4a86ff;
}

.app-bar .dot:nth-child(2) {
  background: #22d3c5;
}

.app-bar .dot:nth-child(3) {
  background: #3a4250;
}

.app-title {
  margin-left: 8px;
  color: #aab2bc;
  font-size: 0.72rem;
}

.app-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6f7a86;
  font-family: var(--mono);
  font-size: 0.66rem;
}

.app-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #37b97c;
}

.app-body {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
}

.app-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 10px;
  background: #0c0f13;
  border-right: 1px solid #232830;
}

.app-side-brand {
  width: 30px;
  height: 30px;
  margin: 2px 0 12px 8px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #1f3f9e;
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.app-side .item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  color: #77828f;
  font-size: 0.74rem;
}

.app-side .item svg {
  width: 14px;
  height: 14px;
}

.app-side .item.is-active {
  background: #1a2027;
  color: #e8ecef;
}

.app-main {
  padding: 14px;
  background: #12161b;
}

.app-main-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.app-main-head strong {
  color: #e8ecef;
  font-size: 0.86rem;
}

.app-main-head span {
  color: #6f7a86;
  font-family: var(--mono);
  font-size: 0.64rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stat {
  padding: 10px;
  border: 1px solid #242b33;
  border-radius: 6px;
  background: #171c22;
}

.stat small {
  display: block;
  color: #6f7a86;
  font-size: 0.62rem;
}

.stat b {
  display: block;
  margin: 4px 0 2px;
  color: #f2f4f6;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.1;
}

.stat b.warn {
  color: #ff7d7d;
}

.stat em {
  display: block;
  color: #6f7a86;
  font-style: normal;
  font-size: 0.58rem;
}

.stat em.ok {
  color: #37b97c;
}

.app-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr);
  gap: 8px;
  margin-top: 8px;
}

.table-card,
.side-card {
  border: 1px solid #242b33;
  border-radius: 6px;
  background: #171c22;
  overflow: hidden;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr 0.9fr;
  gap: 8px;
  padding: 8px 10px;
  font-size: 0.64rem;
}

.table-head {
  color: #6f7a86;
  border-bottom: 1px solid #242b33;
}

.table-row {
  color: #c3cad2;
  border-bottom: 1px solid #1e242b;
  font-family: var(--mono);
}

.table-row:last-child {
  border-bottom: 0;
}

.tag {
  justify-self: start;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid;
  font-family: var(--font);
  font-size: 0.6rem;
}

.tag-ok {
  color: #46c98a;
  border-color: rgba(70, 201, 138, 0.35);
}

.tag-warn {
  color: #e0b34a;
  border-color: rgba(224, 179, 74, 0.35);
}

.tag-dim {
  color: #8a94a0;
  border-color: rgba(138, 148, 160, 0.3);
}

.tag-bad {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.35);
}

.side-head {
  padding: 8px 10px;
  color: #6f7a86;
  font-size: 0.64rem;
  border-bottom: 1px solid #242b33;
}

.rule-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid #1e242b;
  color: #aab3bc;
  font-size: 0.64rem;
}

.rule-row b {
  color: #e8ecef;
  font-family: var(--mono);
  font-weight: 500;
}

.alert-live {
  display: flex;
  gap: 8px;
  margin: 8px;
  padding: 8px;
  border: 1px solid rgba(74, 134, 255, 0.4);
  border-radius: 6px;
  background: rgba(74, 134, 255, 0.1);
  color: #b9cdfb;
  font-size: 0.64rem;
}

.alert-live svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #7aa2ff;
}

.alert-live em {
  display: block;
  color: #8d7a75;
  font-style: normal;
}

.float-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 14px 30px rgba(15, 18, 22, 0.12);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  white-space: nowrap;
}

.float-chip svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.chip-a {
  top: -18px;
  right: -10px;
  animation: floaty 5.5s ease-in-out infinite;
}

.chip-b {
  bottom: -16px;
  left: -14px;
  animation: floaty 6.5s ease-in-out 0.8s infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 20px 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.hero-strip span {
  position: relative;
  padding-left: 14px;
}

.hero-strip span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

/* ---------------- sections ---------------- */
.section {
  padding: clamp(72px, 8vw, 112px) 0;
}

.section-alt {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-dark {
  background: #0e1114;
  color: #edeff2;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 4.5vw, 56px);
}

.sec-no {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.section-head h2 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 3.3vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-head p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
}

.section-dark .section-head p {
  color: #9aa3ad;
}

.section-dark .sec-no {
  color: #6ea0ff;
}

/* ---------------- tabs ---------------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line-2);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab svg {
  width: 16px;
  height: 16px;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.tab-panels {
  padding-top: 44px;
}

.tab-panel {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.tab-panel.is-active {
  display: grid;
}

.end-copy h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.end-copy > p {
  margin: 0 0 20px;
  color: var(--muted);
}

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.ticks li {
  position: relative;
  padding-left: 24px;
  color: var(--ink-2);
  font-size: 0.93rem;
}

.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

.end-mock {
  padding: 20px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
}

.mock-head b {
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
}

.mock-field {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.8rem;
}

.mock-field span {
  color: var(--muted);
}

.mock-field code {
  color: var(--ink-2);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.mock-log {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.mock-log i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.mock-table {
  display: grid;
  gap: 6px;
}

.mock-tr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.76rem;
}

.mock-tr em {
  font-family: var(--font);
  font-style: normal;
  font-size: 0.66rem;
  padding: 1px 7px;
  border: 1px solid;
  border-radius: 4px;
}

.tag-ok {
  color: var(--green);
  border-color: rgba(30, 107, 82, 0.35);
}

.tag-warn {
  color: var(--amber);
  border-color: rgba(201, 162, 39, 0.35);
}

.tag-dim {
  color: var(--muted);
  border-color: var(--line-2);
}

.tag-bad {
  color: var(--red);
  border-color: rgba(216, 64, 64, 0.35);
}

.mock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mock-actions span {
  padding: 6px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  font-size: 0.74rem;
  cursor: default;
}

.mock-tabs {
  display: inline-flex;
  margin-bottom: 14px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  overflow: hidden;
}

.mock-tabs span {
  padding: 7px 14px;
  font-size: 0.76rem;
  color: var(--muted);
}

.mock-tabs span.on {
  background: var(--ink);
  color: #fff;
}

/* ---------------- feature grid ---------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card {
  position: relative;
  padding: 30px 30px 26px;
  background: var(--paper-2);
  transition: background 0.2s ease;
}

.feature-card:hover {
  background: var(--paper-3);
}

.feature-card::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 0;
  width: 34px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.feature-card header svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.feature-card header span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.feature-card h3 {
  margin: 0 0 14px;
  font-size: 1.12rem;
}

.feature-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.feature-card li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.feature-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1px;
  background: var(--line-2);
}

/* ---------------- security ---------------- */
.layer-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #23282f;
  border: 1px solid #23282f;
  border-radius: var(--radius);
  overflow: hidden;
}

.layer {
  padding: 30px;
  background: #12161b;
}

.layer-no {
  display: inline-block;
  margin-bottom: 16px;
  color: #6ea0ff;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.layer h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.layer p {
  margin: 0 0 16px;
  color: #9aa3ad;
  font-size: 0.86rem;
}

.layer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.layer li {
  position: relative;
  padding-left: 16px;
  color: #c3cad2;
  font-size: 0.84rem;
}

.layer li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1px;
  background: #46505a;
}

.terminal {
  margin-top: 26px;
  border: 1px solid #23282f;
  border-radius: var(--radius);
  background: #0a0c0f;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid #23282f;
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2c333c;
}

.terminal-bar em {
  margin-left: 8px;
  color: #6f7a86;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-style: normal;
}

.terminal pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  color: #cfd6de;
  font-size: 0.78rem;
  line-height: 1.8;
}

.t-dim {
  color: #6f7a86;
}

.t-bad {
  color: #ff6b6b;
}

.t-ok {
  color: #46c98a;
}

/* ---------------- alerts ---------------- */
.alert-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.metric-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
}

.metric-head,
.metric-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.metric-head {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  background: var(--paper-3);
}

.metric-row:last-child {
  border-bottom: 0;
}

.metric-row b {
  color: var(--ink);
}

.metric-row span {
  color: var(--muted);
}

.risk-col {
  display: grid;
  gap: 14px;
}

.risk-card {
  padding: 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.risk-card svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.risk-card h3 {
  margin: 12px 0 8px;
  font-size: 1rem;
}

.risk-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.channel-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 40px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.channel {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: var(--paper-2);
}

.channel svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--ink);
}

.channel b {
  display: block;
  font-size: 0.9rem;
}

.channel span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

/* ---------------- accounts ---------------- */
.flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.flow li {
  padding: 20px 18px;
  background: var(--paper-2);
}

.flow span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.flow b {
  display: block;
  margin: 10px 0 6px;
  font-size: 0.92rem;
}

.flow p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  padding: 28px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
}

/* ---------------- deploy ---------------- */
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.deploy-card {
  padding: 28px;
  background: var(--paper-2);
}

.deploy-card svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.deploy-card h3 {
  margin: 14px 0 8px;
  font-size: 1rem;
}

.deploy-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.code-block {
  margin-top: 30px;
  border: 1px solid #23282f;
  border-radius: var(--radius);
  background: #0e1114;
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid #23282f;
  color: #8a94a0;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.copy {
  padding: 4px 10px;
  border: 1px solid #333a43;
  border-radius: 5px;
  background: transparent;
  color: #aab3bc;
  font-size: 0.7rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.copy:hover {
  border-color: var(--accent);
  color: #fff;
}

.code-block pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  color: #cfd6de;
  font-size: 0.78rem;
  line-height: 1.8;
}

/* ---------------- integration ---------------- */
.api-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.api-list {
  border-top: 1px solid #23282f;
}

.api-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #23282f;
  font-size: 0.82rem;
}

.api-row b {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: #6ea0ff;
}

.api-row code {
  color: #e8ecef;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.api-row span {
  color: #8a94a0;
  font-size: 0.8rem;
}

.code-block.on-dark {
  margin-top: 0;
}

.switch-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  background: #23282f;
  border: 1px solid #23282f;
  border-radius: var(--radius);
  overflow: hidden;
}

.switch-row div {
  padding: 18px 20px;
  background: #12161b;
}

.switch-row code {
  display: block;
  margin-bottom: 6px;
  color: #7aa2ff;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.switch-row span {
  color: #8a94a0;
  font-size: 0.76rem;
}

/* ---------------- faq ---------------- */
.faq {
  border-top: 1px solid var(--line-2);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 20px 44px 20px 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.1rem;
}

.faq details[open] summary::after {
  content: "−";
}

.faq p {
  margin: 0;
  padding: 0 60px 22px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.faq code {
  padding: 1px 6px;
  background: rgba(15, 18, 22, 0.06);
  border-radius: 4px;
  color: var(--ink-2);
  font-size: 0.84rem;
}

/* ---------------- cta ---------------- */
.cta-band {
  position: relative;
  padding: clamp(72px, 8vw, 110px) 0;
  background: #0e1114;
  color: #fff;
  border-top: 3px solid var(--accent);
}

.cta-inner {
  text-align: center;
}

.cta-inner h2 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.1;
}

.cta-inner p {
  margin: 0 auto 30px;
  max-width: 52ch;
  color: #9aa3ad;
}

.cta-inner .hero-actions {
  justify-content: center;
}

/* ---------------- footer ---------------- */
.site-footer {
  padding: 28px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.footer-brand strong {
  display: block;
  font-size: 0.92rem;
}

.footer-brand span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.footer-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

/* ---------------- reveal ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- responsive ---------------- */
@media (max-width: 1320px) {
  .rail {
    display: none;
  }
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    max-width: 720px;
  }

  .hero-meta {
    max-width: 640px;
  }

  .tab-panel.is-active {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .layer-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .alert-grid,
  .api-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .deploy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .switch-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .nav {
    position: absolute;
    top: calc(100% + 2px);
    left: 24px;
    right: 24px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 20px 44px rgba(15, 18, 22, 0.12);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-cta .btn {
    display: none;
  }

  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --shell: calc(100% - 32px);
  }

  .hero {
    padding-top: 64px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-meta div:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .app-body {
    grid-template-columns: 1fr;
  }

  .app-side {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid #232830;
  }

  .app-side-brand {
    margin: 2px 6px 2px 0;
  }

  .app-cols,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chip-a,
  .chip-b {
    display: none;
  }

  .flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deploy-grid,
  .switch-row,
  .channel-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-head,
  .metric-row {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .api-row {
    grid-template-columns: 52px minmax(0, 1fr);
    row-gap: 4px;
  }

  .api-row span {
    grid-column: 2;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-row p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------- 404 ---------------- */
.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 40px 24px;
  text-align: center;
}

.not-found img {
  margin: 0 auto 8px;
  border-radius: 12px;
}

.not-found h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.not-found p {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
}

.not-found .btn {
  margin-top: 14px;
}

/* ============================================================
   双主题 · 测试阶段 · 3D 与动效增强
   ============================================================ */

/* 顶部测试阶段条 */
.beta-bar {
  background: #0d1117;
  border-bottom: 1px solid #1f2733;
}

.beta-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  font-size: 0.74rem;
}

.beta-inner b {
  color: #ffffff;
  font-weight: 600;
}

.beta-text {
  color: #8b95a3;
}

.beta-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #4a86ff;
  animation: betaPulse 2.2s ease-out infinite;
}

@keyframes betaPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 134, 255, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(74, 134, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 134, 255, 0);
  }
}

/* 主题切换 */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

html.theme-switching,
html.theme-switching * {
  transition: background-color 0.35s ease, color 0.35s ease,
    border-color 0.35s ease !important;
}

/* 深色主题细节 */
html[data-theme="dark"] .btn-ink {
  background: #eef2f8;
  border-color: #eef2f8;
  color: #0b0e14;
}

html[data-theme="dark"] .btn-ink:hover {
  background: #ffffff;
}

html[data-theme="dark"] .section-dark {
  background: #080b10;
}

html[data-theme="dark"] .cta-band {
  background: #080b10;
}

html[data-theme="dark"] .app-window {
  box-shadow: 0 36px 70px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .hero-visual::before {
  background: var(--paper-3);
}

html[data-theme="dark"] .float-chip {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .mock-field,
html[data-theme="dark"] .mock-tr,
html[data-theme="dark"] .mock-actions span {
  border-color: var(--line);
}

/* 3D 粒子画布 */
.fx-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

html[data-theme="dark"] .fx-canvas {
  opacity: 1;
}

.hero-grid,
.hero-strip,
.marquee,
.scroll-hint {
  position: relative;
  z-index: 1;
}

/* 滚动提示 */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: -14px auto 24px;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.scroll-hint svg {
  width: 16px;
  height: 16px;
  animation: hintBounce 1.8s ease-in-out infinite;
}

@keyframes hintBounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(5px);
    opacity: 1;
  }
}

/* 3D 倾斜容器 */
[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

@keyframes floaty {
  0%,
  100% {
    transform: translate3d(0, 0, 48px);
  }
  50% {
    transform: translate3d(0, -7px, 48px);
  }
}

@keyframes chipIn {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 48px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 48px);
  }
}

/* 旋转 3D 立方体 */
.sec-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  margin-bottom: clamp(36px, 4.5vw, 56px);
}

.sec-head-row .section-head {
  margin-bottom: 0;
}

.cube-stage {
  display: grid;
  place-items: center;
  width: 170px;
  height: 170px;
  perspective: 900px;
}

.cube {
  position: relative;
  width: 132px;
  height: 132px;
  transform-style: preserve-3d;
  animation: cubeSpin 20s linear infinite;
}

.cube-stage:hover .cube {
  animation-play-state: paused;
}

@keyframes cubeSpin {
  from {
    transform: rotateX(-18deg) rotateY(0deg);
  }
  to {
    transform: rotateX(-18deg) rotateY(360deg);
  }
}

.cube .face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(74, 134, 255, 0.4);
  border-radius: 8px;
  background: rgba(17, 21, 29, 0.92);
  box-shadow: inset 0 0 24px rgba(74, 134, 255, 0.12);
}

.cube .face svg {
  width: 22px;
  height: 22px;
  color: #6ea0ff;
}

.cube .face span {
  color: #8fa3c8;
  font-family: var(--mono);
  font-size: 0.64rem;
}

.f1 {
  transform: translateZ(66px);
}

.f2 {
  transform: rotateY(180deg) translateZ(66px);
}

.f3 {
  transform: rotateY(90deg) translateZ(66px);
}

.f4 {
  transform: rotateY(-90deg) translateZ(66px);
}

.f5 {
  transform: rotateX(90deg) translateZ(66px);
}

.f6 {
  transform: rotateX(-90deg) translateZ(66px);
}

/* 测试阶段提示 */
.phase-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.phase-note svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

.phase-note b {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.phase-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

/* 深色区块网格动效 */
.section-dark {
  position: relative;
  overflow: hidden;
}

.section-dark::before {
  content: "";
  position: absolute;
  inset: -48px;
  background-image: linear-gradient(
      rgba(74, 134, 255, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(74, 134, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.7;
  animation: gridPan 22s linear infinite;
  pointer-events: none;
}

.section-dark .shell {
  position: relative;
  z-index: 1;
}

@keyframes gridPan {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(48px, 48px, 0);
  }
}

/* 渐显方向变体 */
.reveal-left,
.reveal-right,
.reveal-scale {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
  transform: translateX(-26px);
}

.reveal-right {
  transform: translateX(26px);
}

.reveal-scale {
  transform: scale(0.96);
}

.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-scale.is-visible {
  opacity: 1;
  transform: none;
}

/* 顶部条与主题按钮的滚动锚点修正 */
section[id] {
  scroll-margin-top: 120px;
}

/* 安卓 / 移动端适配 */
@media (max-width: 880px) {
  .site-header {
    backdrop-filter: none;
    background: var(--paper);
  }

  .fx-canvas {
    opacity: 0.6;
  }

  .hero-visual::before {
    inset: 12px -10px -12px 10px;
  }

  .cube-stage {
    width: 130px;
    height: 130px;
  }

  .cube {
    width: 104px;
    height: 104px;
  }

  .f1 {
    transform: translateZ(52px);
  }

  .f2 {
    transform: rotateY(180deg) translateZ(52px);
  }

  .f3 {
    transform: rotateY(90deg) translateZ(52px);
  }

  .f4 {
    transform: rotateY(-90deg) translateZ(52px);
  }

  .f5 {
    transform: rotateX(90deg) translateZ(52px);
  }

  .f6 {
    transform: rotateX(-90deg) translateZ(52px);
  }

  .nav {
    top: calc(100% + 2px);
  }
}

@media (max-width: 640px) {
  .beta-inner {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 7px 0;
    min-height: 40px;
  }

  .scroll-hint,
  .cube-stage {
    display: none;
  }

  .sec-head-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (hover: none) {
  .feature-card:hover,
  .use-grid article:hover,
  .deploy-item:hover {
    background: inherit;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cube,
  .section-dark::before,
  .scroll-hint svg,
  .beta-dot {
    animation: none !important;
  }

  .fx-canvas {
    opacity: 0.35;
  }
}

/* ============================================================
   交互演示区
   ============================================================ */
.playground-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.sim-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.sim-wide {
  grid-column: 1 / -1;
}

.sim-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.sim-tag {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.sim-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.sim-head p {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.sim-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 20px;
}

.sim-client {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-3);
}

.sim-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #0d1117;
  border-bottom: 1px solid #222a36;
}

.sim-window-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39424f;
}

.sim-window-bar span:first-child {
  background: #4a86ff;
}

.sim-window-bar span:nth-child(2) {
  background: #22d3c5;
}

.sim-window-bar em {
  margin-left: 6px;
  color: #8fa3c8;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-style: normal;
}

.sim-state {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sim-state.is-active {
  color: var(--green);
  border-color: rgba(21, 128, 95, 0.4);
}

.sim-state.is-frozen {
  color: var(--red);
  border-color: rgba(216, 64, 64, 0.45);
}

.sim-field {
  display: grid;
  gap: 6px;
  padding: 12px 14px 0;
}

.sim-field span {
  color: var(--muted);
  font-size: 0.72rem;
}

.sim-field input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.sim-field input:read-only {
  color: var(--muted);
}

.sim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
}

.sim-actions .btn {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.82rem;
}

.sim-hint {
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 0.74rem;
}

.sim-hint.is-ok {
  color: var(--green);
}

.sim-hint.is-warn {
  color: var(--red);
}

.sim-server {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-3);
}

.sim-server-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.84rem;
  font-weight: 600;
}

.sim-reset {
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sim-reset:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sim-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.sim-facts div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-2);
}

.sim-facts span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
}

.sim-facts b {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.sim-risk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.sim-risk > span {
  color: var(--muted);
  font-size: 0.72rem;
}

.sim-risk button {
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 0.72rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.sim-risk button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sim-alert {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 64, 64, 0.4);
  border-radius: 6px;
  background: rgba(216, 64, 64, 0.08);
  color: var(--red);
  font-size: 0.78rem;
  animation: alertIn 0.3s ease;
}

.sim-alert.is-info {
  border-color: rgba(74, 134, 255, 0.4);
  background: rgba(74, 134, 255, 0.08);
  color: var(--accent);
}

@keyframes alertIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sim-log {
  max-height: 150px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d1117;
  color: #9fb0c8;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.7;
}

.sim-log-line {
  animation: logIn 0.25s ease;
}

.sim-log-line .ok {
  color: #34c78d;
}

.sim-log-line .warn {
  color: #e0b34a;
}

.sim-log-line .bad {
  color: #ff6b6b;
}

.sim-log-line .dim {
  color: #6e7a8a;
}

@keyframes logIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 告警规则沙盒 */
.sim-rule-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.sim-rule-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
}

.sim-rule-controls select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 0.78rem;
}

.sim-rule-controls input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.sim-rule-controls b {
  color: var(--accent);
  font-family: var(--mono);
}

.rule-chart {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-3);
}

.rule-chart svg {
  display: block;
  width: 100%;
  height: 150px;
}

.rule-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

.rule-area {
  fill: var(--accent-soft);
  stroke: none;
}

.rule-threshold {
  stroke: var(--red);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.rule-point {
  fill: var(--red);
}

.rule-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.68rem;
}

.dot-series,
.dot-threshold,
.dot-point {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
}

.dot-series {
  background: var(--accent);
}

.dot-threshold {
  background: var(--red);
}

.dot-point {
  background: #e0b34a;
}

.sim-evaluate {
  width: 100%;
  margin-top: 14px;
}

.rule-result {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-3);
  color: var(--muted);
  font-size: 0.8rem;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.rule-result.is-fired {
  border-color: rgba(216, 64, 64, 0.4);
  background: rgba(216, 64, 64, 0.07);
  color: var(--red);
}

.rule-result.is-clear {
  border-color: rgba(21, 128, 95, 0.35);
  background: rgba(21, 128, 95, 0.06);
  color: var(--green);
}

/* 方案推荐器 */
.rec-questions {
  display: grid;
  gap: 12px;
}

.rec-q {
  display: grid;
  gap: 6px;
}

.rec-q > span {
  color: var(--muted);
  font-size: 0.72rem;
}

.seg {
  display: inline-flex;
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  overflow: hidden;
}

.seg button {
  flex: 1;
  padding: 8px 10px;
  border: 0;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 0.76rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.seg button + button {
  border-left: 1px solid var(--line-2);
}

.seg button.on {
  background: var(--accent);
  color: #ffffff;
}

.rec-output {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.rec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rec-chips span {
  padding: 4px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--ink-2);
  font-size: 0.7rem;
  animation: chipPop 0.25s ease;
}

@keyframes chipPop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rec-summary {
  position: relative;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1117;
}

.rec-summary pre {
  max-height: 150px;
  margin: 0;
  overflow: auto;
  color: #a9c0e8;
  font-size: 0.7rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rec-summary .copy {
  position: absolute;
  top: 8px;
  right: 8px;
}

@media (max-width: 1080px) {
  .playground-grid,
  .sim-two-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .sim-head {
    flex-direction: column;
  }

  .sim-head p {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .sim-rule-controls,
  .sim-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============================================================
   SQ 标识 · 开发中标注 · 背景互动 · 更多交互
   ============================================================ */
#playground {
  position: relative;
  overflow: hidden;
}

.sq-watermark {
  position: absolute;
  top: 30px;
  right: -30px;
  z-index: 0;
  color: var(--accent);
  font-size: clamp(170px, 24vw, 340px);
  font-weight: 800;
  line-height: 1;
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
}

#playground .shell {
  position: relative;
  z-index: 1;
}

.dev-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.66rem;
  vertical-align: middle;
  animation: devPulse 2.4s ease-in-out infinite;
}

@keyframes devPulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

.sim-dev {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px dashed var(--line-2);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  vertical-align: middle;
}

.sim-card {
  position: relative;
}

.sim-sq {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, #4a86ff, #1740c4);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
}

/* 样本密钥 */
.sim-samples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 14px 0;
}

.sim-samples > span {
  color: var(--muted);
  font-size: 0.72rem;
}

.sim-samples button {
  padding: 4px 9px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 0.7rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.sim-samples button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sim-samples .sim-rand {
  border-color: rgba(74, 134, 255, 0.5);
  color: var(--accent);
}

/* 模拟进度条 */
.sim-progress {
  height: 3px;
  margin: 0 14px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

.sim-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.16s linear;
}

/* 设备操作 */
.sim-device-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.sim-device-actions > span {
  color: var(--muted);
  font-size: 0.72rem;
}

.sim-device-actions button {
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 0.72rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.sim-device-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-5px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(3px);
  }
}

.sim-field input.is-error {
  border-color: var(--red);
  animation: shake 0.35s ease;
}

/* 密钥批量生成器 */
.keygen-controls {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.3fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.keygen-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
}

.keygen-controls b {
  color: var(--accent);
  font-family: var(--mono);
}

.keygen-controls select {
  padding: 7px 9px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 0.78rem;
}

.keygen-controls input[type="range"] {
  accent-color: var(--accent);
}

.keygen-output {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.keygen-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}

.keygen-empty {
  padding: 18px;
  border: 1px dashed var(--line-2);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.keygen-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-3);
  animation: rowIn 0.25s ease;
}

.keygen-row code {
  color: var(--ink);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.keygen-row .scramble {
  color: var(--muted);
}

.keygen-idx {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.66rem;
}

.keygen-row button {
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 0.66rem;
  cursor: pointer;
}

.keygen-row button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.keygen-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* CTA 反向滚动带 */
.cta-marquee {
  position: relative;
  z-index: 1;
  margin-top: 46px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cta-marquee .marquee-group span {
  color: #7c8798;
}

.cta-marquee .marquee-group span::before {
  background: #4a86ff;
}

.marquee-track.reverse {
  animation-direction: reverse;
  animation-duration: 52s;
}

/* HUD：SQ + 开发阶段 */
.hud {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 54;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--paper-2);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hud.is-visible {
  opacity: 1;
  transform: none;
}

.hud-logo {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(135deg, #4a86ff, #1740c4);
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 700;
}

.hud-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: betaPulse 2.2s ease-out infinite;
}

/* 点击涟漪 */
.ripple-host {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: rippleOut 0.55s ease-out forwards;
  pointer-events: none;
}

.btn-line .ripple,
.sim-risk button .ripple,
.sim-samples button .ripple,
.seg button .ripple,
.tab .ripple,
.keygen-row button .ripple {
  background: rgba(74, 134, 255, 0.3);
}

@keyframes rippleOut {
  to {
    transform: scale(14);
    opacity: 0;
  }
}

/* 图表扫描线 */
.rule-chart {
  position: relative;
  overflow: hidden;
}

.rule-chart::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(74, 134, 255, 0.12),
    transparent
  );
  animation: scanX 4.2s linear infinite;
}

@keyframes scanX {
  from {
    left: -60px;
  }
  to {
    left: 100%;
  }
}

/* 卡片悬浮倾斜 */
.tilt-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease;
  will-change: transform;
}

.tilt-card.is-tilting {
  box-shadow: var(--shadow-soft);
}

@media (max-width: 1080px) {
  .keygen-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .keygen-output {
    grid-template-columns: minmax(0, 1fr);
  }

  .keygen-actions {
    flex-direction: row;
  }
}

@media (max-width: 640px) {
  .keygen-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .hud {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rule-chart::after,
  .dev-badge,
  .hud-dot {
    animation: none !important;
  }
}

/* ============================================================
   动效与商业感系统
   ============================================================ */

/* ---- 首屏文字逐行升起 ---- */
.hero-copy h1 .line {
  display: block;
  overflow: hidden;
}

.hero-copy h1 .line i {
  display: block;
  font-style: normal;
  transform: translateY(112%);
  animation: lineRise 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-copy h1 .line:nth-child(1) i {
  animation-delay: 0.05s;
}

.hero-copy h1 .line:nth-child(2) i {
  animation-delay: 0.17s;
}

.hero-copy h1 .line:nth-child(3) i {
  animation-delay: 0.29s;
}

.hero-copy h1 .line.is-accent i {
  color: var(--accent);
}

@keyframes lineRise {
  to {
    transform: translateY(0);
  }
}

.kicker,
.lead,
.hero-actions,
.hero-meta {
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.kicker {
  animation-delay: 0.35s;
}

.lead {
  animation-delay: 0.45s;
}

.hero-actions {
  animation-delay: 0.55s;
}

.hero-meta {
  animation-delay: 0.65s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-visual {
  opacity: 0;
  animation: fadeInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.float-chip {
  opacity: 0;
  animation: chipIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards,
    floaty 5.5s ease-in-out infinite;
}

.chip-a {
  animation-delay: 0.95s, 1.5s;
}

.chip-b {
  animation-delay: 1.15s, 1.7s;
}

@keyframes chipIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- 首屏模拟界面入场 ---- */
.stat {
  opacity: 0;
  animation: statIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stat:nth-child(1) {
  animation-delay: 0.7s;
}

.stat:nth-child(2) {
  animation-delay: 0.79s;
}

.stat:nth-child(3) {
  animation-delay: 0.88s;
}

.stat:nth-child(4) {
  animation-delay: 0.97s;
}

@keyframes statIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.app-window .table-row {
  opacity: 0;
  animation: rowIn 0.45s ease forwards;
}

.app-window .table-row:nth-child(2) {
  animation-delay: 0.85s;
}

.app-window .table-row:nth-child(3) {
  animation-delay: 0.95s;
}

.app-window .table-row:nth-child(4) {
  animation-delay: 1.05s;
}

.app-window .table-row:nth-child(5) {
  animation-delay: 1.15s;
}

.app-window .table-row:nth-child(6) {
  animation-delay: 1.25s;
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.alert-live {
  animation: alertPulse 2.6s ease-in-out infinite;
}

@keyframes alertPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(74, 134, 255, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(74, 134, 255, 0.16);
  }
}

/* ---- 无限滚动能力带 ---- */
.marquee {
  overflow: hidden;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 15px 18px;
}

.marquee-group span {
  position: relative;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  white-space: nowrap;
}

.marquee-group span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---- 滚动阶梯递进 ---- */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.62s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.62s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 72ms);
}

[data-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}

/* ---- 章节编号下划线 ---- */
.sec-no::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-top: 6px;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.section-head.is-visible .sec-no::after {
  width: 28px;
}

/* ---- 流程管线递进 ---- */
.flow li {
  position: relative;
}

.flow li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 110ms + 100ms);
}

.flow.is-visible li::before {
  width: 100%;
}

/* ---- 终端逐行打字 ---- */
.terminal .tl {
  display: block;
  opacity: 0;
  transform: translateY(6px);
}

.terminal.is-visible .tl {
  animation: termLine 0.34s ease forwards;
}

.terminal.is-visible .tl:nth-child(1) {
  animation-delay: 0.15s;
}

.terminal.is-visible .tl:nth-child(2) {
  animation-delay: 0.32s;
}

.terminal.is-visible .tl:nth-child(4) {
  animation-delay: 0.55s;
}

.terminal.is-visible .tl:nth-child(5) {
  animation-delay: 0.72s;
}

.terminal.is-visible .tl:nth-child(7) {
  animation-delay: 0.95s;
}

.terminal.is-visible .tl:nth-child(8) {
  animation-delay: 1.1s;
}

.terminal.is-visible .tl:nth-child(9) {
  animation-delay: 1.25s;
}

@keyframes termLine {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- 标签面板切换 ---- */
.tab-panel.is-active {
  animation: panelIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- 鼠标聚光 ---- */
.hero {
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    520px circle at var(--mx, 72%) var(--my, 30%),
    rgba(47, 107, 228, 0.08),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero:hover::after {
  opacity: 1;
}

/* ---- 按钮掠光 ---- */
.btn-accent,
.btn-ink {
  position: relative;
  overflow: hidden;
}

.btn-accent::after,
.btn-ink::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );
  transform: skewX(-18deg);
  transition: left 0.55s ease;
}

.btn-accent:hover::after,
.btn-ink:hover::after {
  left: 120%;
}

/* ---- 回到顶部 ---- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 55;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(15, 18, 22, 0.12);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease,
    color 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.to-top svg {
  width: 18px;
  height: 18px;
  transform: rotate(-90deg);
}

/* ---- 适用场景 ---- */
.use-cases {
  margin-top: 56px;
}

.use-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding-top: 28px;
  border-top: 1px solid var(--line-2);
}

.use-head h3 {
  margin: 0;
  font-size: 1.3rem;
}

.use-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.use-grid article {
  padding: 24px;
  background: var(--paper-2);
  transition: background 0.2s ease;
}

.use-grid article:hover {
  background: var(--paper-3);
}

.use-grid svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.use-grid h4 {
  margin: 12px 0 8px;
  font-size: 0.98rem;
}

.use-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

/* ---- 动效响应式与降级 ---- */
@media (max-width: 1080px) {
  .use-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .use-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .use-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy h1 .line i,
  .kicker,
  .lead,
  .hero-actions,
  .hero-meta,
  .hero-visual,
  .float-chip,
  .stat,
  .app-window .table-row {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .marquee-track,
  .alert-live {
    animation: none !important;
  }

  [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .flow li::before {
    width: 100% !important;
  }

  .terminal .tl {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .sec-no::after {
    width: 28px !important;
  }
}
