/* ==========================================================================
   CANNBot Skills — 设计系统（一比一复刻 DeepSeek Harness 深色主题）
   令牌值提取自 https://www.deepseek.com/harness/ 官方 CSS 的 [data-theme=dark] 块
   ========================================================================== */

/* ---------- 字体（与 harness 同源自托管） ---------- */
@font-face { font-family: "Edit Undo"; src: url("../fonts/edit-undo.ttf") format("truetype"); font-weight: 400; font-style: normal; }
@font-face { font-family: "Host Grotesk"; src: url("../fonts/host-grotesk-latin.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Host Grotesk"; src: url("../fonts/host-grotesk-latin-ext.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Host Grotesk"; src: url("../fonts/host-grotesk-italic-latin.woff2") format("woff2"); font-weight: 300 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Host Grotesk"; src: url("../fonts/host-grotesk-italic-latin-ext.woff2") format("woff2"); font-weight: 300 800; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("../fonts/fragment-mono-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("../fonts/fragment-mono-latin-ext.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- 设计令牌（深色，与 harness [data-theme=dark] 一致） ---------- */
:root {
  --ds-color-brand: #6799fe;
  --ds-color-brand-deep: #fff;
  --ds-color-brand-medium-reverse: #fff;
  --ds-color-brand-light-reverse: #73a3d2;
  --ds-color-text-primary: #fff;
  --ds-color-text-primary-bluish: #fff;
  --ds-color-text-secondary: hsla(0, 0%, 100%, .8);
  --ds-color-text-description: hsla(0, 0%, 100%, .5);
  --ds-color-text-inverse: #0a0a0a;
  --ds-color-text-placeholder: hsla(0, 0%, 100%, .3);
  --ds-color-text-link-blue: #6799fe;
  --ds-color-bg-page: #0a0a0a;
  --ds-color-bg-surface-1: hsla(0, 0%, 100%, .06);
  --ds-color-bg-surface-2: hsla(0, 0%, 100%, .04);
  --ds-color-bg-surface-3: hsla(0, 0%, 100%, .02);
  --ds-color-bg-surface-4: hsla(0, 0%, 100%, .015);
  --ds-color-bg-surface-5: hsla(0, 0%, 100%, .12);
  --ds-color-bg-overlay: #262626;
  --ds-color-bg-surface-raised: hsla(0, 0%, 100%, .25);
  --ds-color-bg-hero-cta: hsla(0, 0%, 100%, .12);
  --ds-color-bg-code: rgba(0, 0, 0, .35);
  --ds-color-bg-hover: hsla(0, 0%, 100%, .06);
  --ds-color-bg-input: hsla(0, 0%, 100%, .08);
  --ds-color-bg-input-hover: hsla(0, 0%, 100%, .12);
  --ds-color-border-input: hsla(0, 0%, 100%, .2);
  --ds-color-border-input-focus: hsla(0, 0%, 100%, .25);
  --ds-color-bg-dark: #fff;
  --ds-color-border-subtle: hsla(0, 0%, 100%, .08);
  --ds-color-border-default: hsla(0, 0%, 100%, .06);
  --ds-color-border-divider: hsla(0, 0%, 100%, .25);
  --ds-color-border-hover: hsla(0, 0%, 100%, .2);
  --ds-color-border-strong: hsla(0, 0%, 100%, .24);
  --ds-color-border-secondary: hsla(0, 0%, 100%, .2);

  --ds-btn-primary-bg: #fff;
  --ds-btn-primary-text: #0a0a0a;
  --ds-btn-primary-border: transparent;
  --ds-btn-primary-hover-bg: rgba(0, 0, 0, .2);
  --ds-btn-secondary-bg: var(--ds-color-bg-surface-1);
  --ds-btn-secondary-text: #fff;
  --ds-btn-secondary-border: hsla(0, 0%, 100%, .15);
  --ds-btn-secondary-hover-bg: hsla(0, 0%, 100%, .2);
  --ds-btn-secondary-hover-border: hsla(0, 0%, 100%, .6);
  --ds-btn-ghost-bg: transparent;
  --ds-btn-ghost-text: #fff;
  --ds-btn-ghost-border: transparent;
  --ds-btn-ghost-hover-bg: hsla(0, 0%, 100%, .08);
  --ds-btn-ghost-hover-border: hsla(0, 0%, 100%, .2);
  --ds-btn-liquid-bg: #fff;
  --ds-btn-liquid-hover-bg: rgba(0, 0, 0, .2);

  --ds-radius-pill: 100px;
  --ds-radius-card: 24px;
  --ds-radius-panel: 16px;
  --ds-radius-media: 10px;
  --ds-radius-input: 10px;
  --ds-radius-sm: 8px;

  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-5: 24px;
  --ds-space-6: 32px;
  --ds-space-7: 40px;
  --ds-space-8: 56px;
  --ds-space-9: 80px;
  --ds-space-10: 120px;
  --ds-space-11: 160px;

  --ds-blur-glass: 12px;
  --ds-shadow-card: hsla(0, 0%, 100%, .12) 0 1px 0 0 inset;

  --ds-font-body: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", sans-serif;
  --ds-font-display: "Host Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ds-font-mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace;
  --ds-font-sans: var(--ds-font-body);
  --ds-font-harness: "Edit Undo", monospace;
}

@property --border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ds-color-bg-page);
  color: var(--ds-color-text-primary);
  font-family: var(--ds-font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--ds-color-text-link-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--ds-font-mono);
  font-size: 0.9em;
  background: var(--ds-color-bg-code);
  border-radius: 4px;
  padding: 0.15em 0.4em;
}

/* ---------- 排版（与 harness 一致） ---------- */
.ds-text-hero {
  font-family: "Montserrat", var(--ds-font-sans);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 150%;
  margin: 0;
}
@media (min-width: 768px) {
  .ds-text-hero { font-size: 46px; }
}

.ds-text-heading1 {
  font-family: "Montserrat", var(--ds-font-sans);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 150%;
  margin: 0;
}
@media (min-width: 768px) {
  .ds-text-heading1 { font-size: 36px; }
}

.ds-text-title {
  font-family: var(--ds-font-sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 150%;
}

.ds-text-subtitle {
  font-family: var(--ds-font-sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 150%;
}

.ds-text-body { font-size: 16px; line-height: 160%; text-wrap: pretty; }
.ds-text-caption { font-size: 14px; line-height: 150%; }
.ds-text-body, .ds-text-caption { font-family: var(--ds-font-sans); font-weight: 400; }

.text-ds-primary { color: var(--ds-color-text-primary); }
.text-ds-description { color: var(--ds-color-text-description); }
.text-ds-brand { color: var(--ds-color-brand); }
.text-ds-inverse { color: var(--ds-color-text-inverse); }

.font-mono { font-family: var(--ds-font-mono); }

/* ---------- 词标（Edit Undo 描边字） ---------- */
.ds-font-harness {
  font-family: var(--ds-font-harness);
  font-size: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ds-color-text-primary);
  -webkit-text-stroke: 0.04em var(--ds-color-bg-page);
}

/* ---------- 容器 ---------- */
.ds-container { width: min(100% - 48px, 1140px); margin-inline: auto; }

/* ==========================================================================
   顶部导航（悬浮胶囊毛玻璃）
   ========================================================================== */
.ds-header-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0;
  margin: 0 auto;
  z-index: 50;
  width: min(100% - 48px, 1140px);
  padding: var(--ds-space-2) 0 0;
}

.ds-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 4px 8px 4px 20px;
  border-radius: var(--ds-radius-pill);
  border: 1px solid transparent;
  position: relative;
}

.ds-header-bar::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--ds-color-bg-surface-raised);
  backdrop-filter: blur(var(--ds-blur-glass));
  -webkit-backdrop-filter: blur(var(--ds-blur-glass));
  z-index: -1;
  opacity: 0.9;
  transition: opacity 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  border: 1px solid transparent;
}
.ds-header-bar.is-scrolled::before {
  opacity: 1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-color: var(--ds-color-border-default);
}

.ds-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ds-color-text-primary);
  text-decoration: none;
  flex-shrink: 0;
}
.ds-logo:hover { text-decoration: none; }
.ds-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--ds-radius-sm);
  background: var(--ds-color-brand);
  color: #fff;
  font-family: var(--ds-font-harness);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.ds-logo-text {
  font-family: var(--ds-font-harness);
  font-size: 17px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ds-color-text-primary);
  -webkit-text-stroke: 0.04em var(--ds-color-bg-page);
}
.ds-logo-sub { color: var(--ds-color-text-description); font-size: 13px; margin-left: 2px; }

.ds-nav {
  display: flex;
  align-items: center;
  gap: var(--ds-space-5);
  margin-left: var(--ds-space-6);
}
.ds-nav a {
  color: var(--ds-color-text-description);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.ds-nav a:hover { color: var(--ds-color-text-primary); }

.ds-header-right {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
}

/* ==========================================================================
   按钮（含涟漪 hover，与 harness 一致）
   ========================================================================== */
.ds-btn, .ds-btn-primary, .ds-btn-secondary, .ds-btn-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--ds-radius-pill);
  box-sizing: border-box;
  font-family: var(--ds-font-sans);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.ds-btn:hover { text-decoration: none; }

.ds-btn::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 150%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  z-index: -1;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.36s ease, opacity 0.36s ease;
}
.ds-btn:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.ds-btn-m { font-size: 15px; padding: 11px 18px; }
.ds-btn-m svg { width: 16px; height: 16px; }
.ds-btn-s { font-size: 14px; padding: var(--ds-space-2) var(--ds-space-3); }
.ds-btn-s svg { width: 14px; height: 14px; }
.ds-btn img { display: block; flex-shrink: 0; }

.ds-btn-primary { background: var(--ds-btn-primary-bg); color: var(--ds-btn-primary-text); border: 1px solid var(--ds-btn-primary-border); }
.ds-btn-primary::after { background: var(--ds-btn-primary-hover-bg); }

.ds-btn-secondary {
  background: var(--ds-btn-secondary-bg);
  color: var(--ds-btn-secondary-text);
  border: 1px solid var(--ds-btn-secondary-border);
  backdrop-filter: blur(var(--ds-blur-glass));
  -webkit-backdrop-filter: blur(var(--ds-blur-glass));
}
.ds-btn-secondary::after { background: var(--ds-btn-secondary-hover-bg); }
.ds-btn-secondary:hover { border-color: var(--ds-btn-secondary-hover-border); }

.ds-btn-ghost { background: var(--ds-btn-ghost-bg); color: var(--ds-btn-ghost-text); border: 1px solid var(--ds-btn-ghost-border); font-weight: 400; }
.ds-btn-ghost::after { background: var(--ds-btn-ghost-hover-bg); }
.ds-btn-ghost:hover { border-color: var(--ds-btn-ghost-hover-border); }

/* ==========================================================================
   徽章（渐变描边胶囊）
   ========================================================================== */
.ds-badge-wrap {
  display: inline-flex;
  align-items: center;
  border-radius: var(--ds-radius-sm);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.08) 35%, rgba(255, 255, 255, 0.04) 65%, rgba(255, 255, 255, 0.28) 100%);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.08), 0 0 32px rgba(255, 255, 255, 0.04);
}
.ds-badge {
  padding: 6px 9px 5px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.25);
  font-family: var(--ds-font-mono);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ==========================================================================
   Hero（左对齐双栏 + 背景光效 + 全屏垂直居中）
   ========================================================================== */
.ds-hero {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--ds-space-11) 0;
  overflow: hidden;
}

/* 背景光效层（近似 harness 的 canvas 层） */
.ds-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  mask: linear-gradient(#000000fc 0%, #000000e8 8.98%, transparent 100%);
  -webkit-mask: linear-gradient(#000000fc 0%, #000000e8 8.98%, transparent 100%);
}
.ds-hero-bg .ds-bg-grid {
  position: absolute;
  inset: -50%;
  background-image:
    radial-gradient(circle at 1px 1px, hsla(0, 0%, 100%, .05) 1px, transparent 0);
  background-size: 42px 42px;
  animation: ds-grid-drift 60s linear infinite;
}
@keyframes ds-grid-drift { to { transform: translate(42px, 42px); } }

.ds-hero-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ds-space-9);
  align-items: center;
}

@media (min-width: 768px) {
  .ds-hero-grid { grid-template-columns: 60fr 40fr; }
}

.ds-hero-col { display: flex; flex-direction: column; gap: var(--ds-space-7); }

.ds-hero-label {
  font-family: var(--ds-font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0;
  padding-left: 3px;
}
@media (min-width: 768px) { .ds-hero-label { font-size: 18px; } }

.ds-hero-title { margin: 0; letter-spacing: 0.2px; }

.ds-hero-desc {
  max-width: 580px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
}
.ds-hero-desc p { margin: 0; }

.ds-hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
}

/* Hero 入场动画（--enter-y / --enter-blur，与 harness 一致） */
.ds-hero-enter {
  opacity: 0;
  transform: translateY(var(--enter-y, 20px));
  filter: blur(var(--enter-blur, 0));
  animation: ds-hero-enter 0.8s ease-out forwards;
}
@keyframes ds-hero-enter {
  from { opacity: 0; transform: translateY(var(--enter-y, 20px)); filter: blur(var(--enter-blur, 0)); }
  to { opacity: 1; transform: none; filter: none; }
}

/* 右侧光球视觉（近似 harness 的 mix-blend screen 光效） */
.ds-hero-visual {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 420px;
}
@media (min-width: 768px) {
  .ds-hero-visual { display: flex; }
}
.ds-orb {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(103, 153, 254, 0.55) 0%, rgba(103, 153, 254, 0.16) 42%, transparent 70%);
  filter: blur(6px);
  animation: ds-orb-pulse 6s ease-in-out infinite alternate;
}
.ds-orb-ring {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid hsla(0, 0%, 100%, .14);
  box-shadow: inset 0 0 40px rgba(103, 153, 254, 0.12);
  animation: ds-orb-pulse 6s ease-in-out infinite alternate-reverse;
}
@keyframes ds-orb-pulse {
  from { transform: scale(1); opacity: 0.85; }
  to { transform: scale(1.08); opacity: 1; }
}

/* ==========================================================================
   Hero 安装终端（深色玻璃终端）
   ========================================================================== */
.ds-hero-join {
  width: 100%;
  max-width: 640px;
  cursor: pointer;
  background-color: var(--ds-color-bg-input);
  border-color: var(--ds-color-border-input);
  border-radius: var(--ds-radius-media);
  will-change: transform;
  transform: translateZ(0);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.5s ease-out;
  position: relative;
}
.ds-hero-join:hover {
  background-color: var(--ds-color-bg-input-hover);
  border-color: var(--ds-color-border-input-focus);
  transform: translateY(-4px) translateZ(0);
}

.ds-term-tabs {
  display: flex;
  gap: var(--ds-space-1);
  padding: 0 var(--ds-space-1);
  margin-left: 6px;
}
.ds-term-tab {
  padding: var(--ds-space-2) var(--ds-space-4);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--ds-font-sans);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  color: var(--ds-color-text-description);
  transition: all 0.2s ease;
}
.ds-term-tab:hover { color: var(--ds-color-text-primary); }
.ds-term-tab.is-active {
  color: var(--ds-color-text-primary);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(255, 255, 255, 0.08);
}

.ds-term {
  margin-top: -13px;
  border-radius: var(--ds-radius-media);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  text-align: left;
}
.ds-term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-3) var(--ds-space-4);
  border-bottom: 1px solid var(--ds-color-border-default);
}
.ds-term-dots { display: flex; align-items: center; gap: 7px; }
.ds-dot { width: 11px; height: 11px; border-radius: 50%; }
.ds-dot-red { background: #ff5f57; }
.ds-dot-yellow { background: #febc2e; }
.ds-dot-green { background: #28c840; }

.ds-term-copy {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  background: none;
  border: none;
  font-family: var(--ds-font-sans);
  font-size: 12px;
  color: var(--ds-color-text-description);
  cursor: pointer;
  transition: color 0.2s ease;
}
.ds-term-copy:hover { color: var(--ds-color-text-primary); }
.ds-term-copy.copied { color: #28c840; }

.ds-term-body { padding: var(--ds-space-5); }
.ds-term-body pre {
  margin: 0;
  font-family: var(--ds-font-mono);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
}
.ds-term-body pre code { background: none; padding: 0; color: rgba(255, 255, 255, 0.9); }

.tk-prompt { color: rgba(255, 255, 255, 0.4); }
.tk-cmd { color: rgba(255, 255, 255, 0.9); }
.tk-comment { color: rgba(255, 255, 255, 0.4); }

/* ==========================================================================
   声明条（词标 + 标题）
   ========================================================================== */
.ds-statement {
  padding: var(--ds-space-9) 0 var(--ds-space-11);
  text-align: center;
}

.ds-statement-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-space-6);
}

.ds-statement-title {
  max-width: 820px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-4);
  flex-wrap: wrap;
}

.ds-wordmark {
  font-family: var(--ds-font-harness);
  color: var(--ds-color-brand);
  font-size: 34px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  -webkit-text-stroke: 0.04em var(--ds-color-bg-page);
  display: inline-block;
  vertical-align: middle;
  transform: translateY(-0.08em);
}
@media (min-width: 768px) {
  .ds-wordmark { font-size: 50px; }
}

.ds-statement-desc {
  max-width: 760px;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.ds-statement-desc p { margin: 0; }

/* ==========================================================================
   通用 Section
   ========================================================================== */
.ds-section { padding: var(--ds-space-10) 0; }

.ds-section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--ds-space-4);
  margin-bottom: var(--ds-space-9);
}
.ds-section-header .ds-text-heading1 { max-width: 680px; }

/* ==========================================================================
   能力卡片
   ========================================================================== */
.ds-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ds-space-5);
  width: 100%;
}
@media (max-width: 860px) {
  .ds-card-grid { grid-template-columns: 1fr; }
}

.ds-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ds-color-border-default);
  border-radius: var(--ds-radius-card);
  background: var(--ds-color-bg-surface-1);
  padding: var(--ds-space-6);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.ds-card:hover {
  box-shadow: var(--ds-shadow-card);
  border-color: var(--ds-color-border-hover);
}

.ds-card-icon {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ds-color-brand);
  margin-bottom: var(--ds-space-4);
}
.ds-card-icon svg { width: 28px; height: 28px; }

.ds-card-kicker {
  font-family: var(--ds-font-mono);
  font-size: 11px;
  color: var(--ds-color-text-description);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin: var(--ds-space-3) 0;
}

.ds-card h3 { margin: 0; }
.ds-card p { margin: 0; }

.ds-card::after, .ds-install-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), hsla(0, 0%, 100%, 0.05), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.ds-card:hover::after, .ds-install-card:hover::after { opacity: 1; }

/* ==========================================================================
   设计思路（双栏：编号条目 + 粘性深色演示面板）
   ========================================================================== */
.ds-design-grid {
  display: grid;
  grid-template-columns: 42fr 58fr;
  gap: var(--ds-space-9);
  width: 100%;
}
@media (max-width: 860px) {
  .ds-design-grid { grid-template-columns: 1fr; }
}

.ds-principles { display: flex; flex-direction: column; }

.ds-principle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--ds-space-4);
  min-height: 35vh;
  padding: 11vh 0;
  cursor: pointer;
}
.ds-principle-head { display: flex; align-items: center; gap: var(--ds-space-2); }
.ds-principle-icon { color: var(--ds-color-text-description); transition: color 0.5s ease; flex-shrink: 0; }
.ds-principle-icon svg { width: 28px; height: 28px; }
.ds-principle.is-active .ds-principle-icon { color: var(--ds-color-brand); }
.ds-principle h3 { margin: 0; font-size: 22px; font-weight: 400; }
.ds-principle p { margin: 0; }
.ds-principle p strong { color: var(--ds-color-text-primary); font-weight: 500; }

.ds-demo-sticky { position: sticky; top: 20vh; }

.ds-demo-frame {
  display: grid;
  min-width: 0;
  max-width: 760px;
  aspect-ratio: 8 / 5;
  background: var(--ds-color-bg-surface-3);
  border: 1px solid var(--ds-color-border-default);
  border-radius: var(--ds-radius-media);
  overflow: hidden;
}

/* 深色演示终端（复刻 dsh-demo 样式） */
.ds-demo {
  display: flex;
  flex-direction: column;
  margin: var(--ds-space-3);
  border-radius: var(--ds-radius-sm);
  background: #101113;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.ds-demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8em 1em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ds-demo-label {
  font-family: var(--ds-font-mono);
  font-size: 0.75em;
  color: #81858c;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ds-demo-mode {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.8125em;
  color: #e6e8ea;
}
.ds-demo-mode svg { width: 1em; height: 1em; color: #81858c; }

.ds-demo-body {
  padding: 0.75em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.ds-demo-row {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8em 0.75em;
  border-radius: 0.625em;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}
.ds-demo-row:hover { background: rgba(255, 255, 255, 0.12); }
.ds-demo-row.is-active { border-color: rgba(103, 158, 254, 0.35); }
.ds-demo-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125em; }
.ds-demo-row-title {
  color: #e6e8ea;
  font-size: 0.875em;
  line-height: 1.55;
  font-weight: 500;
  font-family: var(--ds-font-sans);
}
.ds-demo-row-desc {
  color: #81858c;
  font-size: 0.8125em;
  line-height: 1.55;
  font-family: var(--ds-font-sans);
}
.ds-demo-check { width: 1em; height: 1em; flex-shrink: 0; opacity: 0; transition: opacity 0.2s ease; }
.ds-demo-row.is-active .ds-demo-check { opacity: 1; }

/* ==========================================================================
   快速开始（安装卡片）
   ========================================================================== */
.ds-install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-5);
  width: 100%;
  margin-top: var(--ds-space-5);
}
@media (max-width: 860px) {
  .ds-install-grid { grid-template-columns: 1fr; }
}

.ds-install-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ds-color-border-default);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-color-bg-surface-3);
  padding: var(--ds-space-6);
  overflow: hidden;
}

.ds-install-step {
  font-family: var(--ds-font-mono);
  font-size: 11px;
  color: var(--ds-color-text-description);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--ds-space-3);
}

.ds-install-card h3 { margin: 0 0 var(--ds-space-2); }

.ds-install-desc {
  margin: 0 0 var(--ds-space-5);
  color: var(--ds-color-text-description);
}

/* 代码块 */
.ds-code {
  position: relative;
  border: 1px solid var(--ds-color-border-default);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-color-bg-code);
  margin-bottom: var(--ds-space-3);
  overflow: hidden;
}
.ds-code pre {
  margin: 0;
  padding: var(--ds-space-4);
  overflow-x: auto;
  font-family: var(--ds-font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--ds-color-text-primary);
}
.ds-code pre code { background: none; padding: 0; }

.ds-code-copy {
  position: absolute;
  top: var(--ds-space-2);
  right: var(--ds-space-2);
  border: 1px solid var(--ds-color-border-default);
  background: var(--ds-color-bg-surface-raised);
  color: var(--ds-color-text-description);
  font-family: var(--ds-font-sans);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--ds-radius-pill);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.ds-code:hover .ds-code-copy { opacity: 1; }
.ds-code-copy:hover { color: var(--ds-color-text-primary); }
.ds-code-copy.copied { color: #28c840; border-color: rgba(40, 200, 64, 0.4); }

.ds-code .tk-prompt { color: var(--ds-color-text-placeholder); }
.ds-code .tk-cmd { color: var(--ds-color-text-primary); }
.ds-code .tk-comment { color: var(--ds-color-text-placeholder); }

.ds-install-hint {
  margin: var(--ds-space-3) 0 0;
  color: var(--ds-color-text-description);
  font-size: 14px;
}

/* ==========================================================================
   社区
   ========================================================================== */
.ds-community-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-4);
  width: 100%;
}
@media (max-width: 860px) {
  .ds-community-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .ds-community-grid { grid-template-columns: 1fr; }
}

.ds-community-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ds-color-border-default);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-color-bg-surface-1);
  padding: var(--ds-space-5);
  color: var(--ds-color-text-primary);
  text-decoration: none;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.ds-community-card:hover {
  box-shadow: var(--ds-shadow-card);
  border-color: var(--ds-color-border-hover);
  text-decoration: none;
}
.ds-community-card h3 { margin: 0 0 var(--ds-space-2); }
.ds-community-card p { margin: 0 0 var(--ds-space-4); color: var(--ds-color-text-description); font-size: 14px; line-height: 1.6; }
.ds-community-more {
  margin-top: auto;
  font-size: 14px;
  color: var(--ds-color-brand);
  font-weight: 500;
}

/* ==========================================================================
   页脚
   ========================================================================== */
.ds-footer {
  border-top: 1px solid var(--ds-color-border-divider);
  padding: var(--ds-space-8) 0 var(--ds-space-9);
}

.ds-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-5);
  flex-wrap: wrap;
}

.ds-footer-logo { display: flex; align-items: center; gap: var(--ds-space-3); }
.ds-footer-logo .ds-logo-text { font-size: 15px; }

.ds-footer-links { display: flex; gap: var(--ds-space-5); flex-wrap: wrap; }
.ds-footer-links a { color: var(--ds-color-text-description); font-size: 14px; }
.ds-footer-links a:hover { color: var(--ds-color-text-primary); }

.ds-footer-legal {
  flex-basis: 100%;
  margin-top: var(--ds-space-6);
  padding-top: var(--ds-space-5);
  border-top: 1px solid var(--ds-color-border-divider);
  color: var(--ds-color-text-description);
  font-size: 13px;
  line-height: 1.7;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
}

/* ==========================================================================
   滚动渐显
   ========================================================================== */
.ds-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.ds-reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 860px) {
  .ds-nav { display: none; }
  .ds-logo-sub { display: none; }
  .ds-header-wrapper { width: min(100% - 24px, 1140px); }
  .ds-header-bar { padding: 4px 6px 4px 14px; }
  .ds-header-right .ds-btn-ghost { padding: var(--ds-space-2) 10px; }
  .ds-hero { padding: var(--ds-space-9) 0; }
  .ds-statement { padding: var(--ds-space-9) 0; }
  .ds-section { padding: var(--ds-space-8) 0; }
  .ds-demo-sticky { position: static; }
  .ds-principle { min-height: 0; padding: var(--ds-space-7) 0; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ds-reveal { opacity: 1; transform: none; }
}
