/* ============================================================
   Clash下载 · 基础样式(设计令牌 / reset / 排版 / 头尾 / 通用面板)
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  /* 纸面层次 */
  --paper: #FFFFFF;
  --paper-mist: #F4F7FB;
  --paper-deep: #EAF1F9;
  --hero-tint: #EAF2FD;

  /* 线条与描边 */
  --hairline: #D7E3F2;

  /* 蓝图主色 */
  --blueprint: #155EEF;
  --blueprint-deep: #0E45B5;
  --blueprint-wash: rgba(21, 94, 239, 0.08);

  /* 文字 */
  --ink: #16233B;
  --ink-soft: #5C6B85;

  /* 语义色 */
  --tone-ok: #0E9F6E;
  --tone-warn: #D97706;
  --tone-err: #DC2626;
  --ok-wash: rgba(14, 159, 110, 0.1);
  --warn-wash: rgba(217, 119, 6, 0.1);
  --err-wash: rgba(220, 38, 38, 0.08);

  /* 字体栈 */
  --font-head: 'Inter', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-copy: 'Inter', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-code: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* 圆角 */
  --r-pill: 999px;
  --r-card: 14px;
  --r-tiny: 8px;

  /* 投影 */
  --lift: 0 2px 12px rgba(22, 35, 59, 0.07);
  --lift-accent: 0 6px 18px rgba(21, 94, 239, 0.28);

  /* 版心 */
  --gutter: 24px;
  --frame-max: 1128px;
  --top-h: 64px;
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html.nav-open {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font-copy);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

img {
  display: inline-block;
}

button {
  font-family: inherit;
}

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

/* ---------- 版心容器(移动端防贴边:padding-inline 永不归零) ---------- */
.frame {
  max-width: var(--frame-max);
  margin-left: auto;
  margin-right: auto;
  padding-inline: var(--gutter);
}

.frame-slim {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-inline: var(--gutter);
}

/* ---------- 排版 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 0.6em;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.05rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
}

p {
  margin-top: 0;
  margin-bottom: 1em;
  overflow-wrap: break-word;
}

a {
  color: var(--blueprint);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blueprint-deep);
}

ul, ol {
  padding-left: 1.4em;
  margin-top: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin-top: 32px;
  margin-bottom: 32px;
}

blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--hairline);
  background: var(--paper-mist);
  border-radius: var(--r-tiny);
  color: var(--ink-soft);
}

/* 行内代码与代码块 */
code {
  font-family: var(--font-code);
  font-size: 0.88em;
  background: var(--paper-mist);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 2px 6px;
  overflow-wrap: break-word;
}

pre {
  font-family: var(--font-code);
  font-size: 0.86rem;
  line-height: 1.7;
  background: var(--paper-mist);
  border: 1px solid var(--hairline);
  border-radius: var(--r-tiny);
  padding: 16px 18px;
  overflow-x: auto;
  margin-top: 0;
  margin-bottom: 1.2em;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* 有序步骤:自定义圆标序号 */
.step-flow {
  list-style: none;
  counter-reset: bp-step;
  padding-left: 0;
  margin-bottom: 1.4em;
}

.step-flow > li {
  counter-increment: bp-step;
  position: relative;
  padding-left: 46px;
  margin-bottom: 20px;
}

.step-flow > li::before {
  content: counter(bp-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blueprint-wash);
  color: var(--blueprint);
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- 区块节奏(padding 只声明纵向,严禁简写覆盖版心左右留白) ---------- */
.strip {
  overflow-x: clip;
  padding-top: 72px;
  padding-bottom: 72px;
}

.strip-mist {
  background: var(--paper-mist);
}

.strip-deep {
  background: var(--paper-deep);
}

@media (max-width: 640px) {
  .strip {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

/* 区块标题组 */
.strip-head {
  margin-bottom: 36px;
  max-width: 640px;
}

.kicker {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blueprint);
  margin-bottom: 10px;
}

.strip-head p {
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding-top: 14px;
  padding-bottom: 14px;
  padding-left: 28px;
  padding-right: 28px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn svg {
  flex-shrink: 0;
}

.btn-solid {
  background: var(--blueprint);
  color: var(--paper);
}

.btn-solid:hover {
  background: var(--blueprint-deep);
  color: var(--paper);
  box-shadow: var(--lift-accent);
}

.btn-line {
  background: var(--paper);
  border-color: var(--hairline);
  color: var(--ink);
}

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

.btn-sm {
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 20px;
  padding-right: 20px;
  font-size: 0.88rem;
}

/* ---------- 顶部导航(header.js 注入) ---------- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}

.top-row {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: var(--top-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand img {
  display: block;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.top-nav {
  margin-left: auto;
  min-width: 0;
}

.top-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-list li {
  display: flex;
  align-items: center;
}

.top-list li + li::before {
  content: "·";
  color: var(--ink-soft);
  padding-inline: 13px;
  flex-shrink: 0;
}

.top-list a {
  display: inline-flex;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  white-space: nowrap;
}

.top-list a:hover {
  color: var(--ink);
}

.top-list a.now {
  color: var(--blueprint);
  font-weight: 700;
}

.top-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 语言切换下拉 */
.lang-box {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 14px;
  padding-right: 14px;
  min-height: 36px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.lang-btn svg {
  flex-shrink: 0;
}

.lang-btn:hover {
  border-color: var(--blueprint);
  color: var(--blueprint);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 152px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--lift);
  list-style: none;
  margin: 0;
  padding: 6px;
  display: none;
  z-index: 90;
}

.lang-box.open .lang-menu {
  display: block;
}

.lang-menu a {
  display: block;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: var(--r-tiny);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}

.lang-menu a:hover {
  background: var(--paper-mist);
}

.lang-menu a.is-cur {
  color: var(--blueprint);
  font-weight: 700;
  background: var(--blueprint-wash);
}

/* 汉堡按钮(≥44px 触达面积) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
}

.burger-ln {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

html.nav-open .burger-ln:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

html.nav-open .burger-ln:nth-child(2) {
  opacity: 0;
}

html.nav-open .burger-ln:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 窄屏:导航折叠为整行可点的面板 */
@media (max-width: 920px) {
  .burger {
    display: flex;
  }

  /* 导航收进抽屉后 .top-nav 的 margin-left:auto 失效,工具区自己顶到最右(2026-07-24) */
  .top-tools {
    margin-left: auto;
  }

  .top-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--lift);
    display: none;
    max-height: calc(100dvh - var(--top-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  html.nav-open .top-nav {
    display: block;
  }

  .top-list {
    flex-direction: column;
    align-items: stretch;
    padding-top: 6px;
    padding-bottom: 10px;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .top-list li {
    display: block;
  }

  .top-list li + li::before {
    content: none;
  }

  .top-list a {
    display: flex;
    width: 100%;
    align-items: center;
    min-height: 48px;
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 6px;
    padding-right: 6px;
    font-size: 1rem;
    border-bottom: 1px solid var(--paper-mist);
  }

  .top-list li:last-child a {
    border-bottom: none;
  }
}

/* ---------- Hero(唯一允许渐变的区块) ---------- */
.hero-stage {
  background: linear-gradient(180deg, var(--paper) 0%, var(--hero-tint) 100%);
  border-bottom: 1px solid var(--hairline);
  overflow-x: clip;
  padding-top: 76px;
  padding-bottom: 84px;
}

@media (max-width: 640px) {
  .hero-stage {
    padding-top: 44px;
    padding-bottom: 52px;
  }
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: center;
}

.hero-split > * {
  min-width: 0;
}

.hero-copy p {
  color: var(--ink-soft);
}

.hero-copy strong {
  color: var(--ink);
}

.hero-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  border-radius: var(--r-pill);
  padding-top: 6px;
  padding-bottom: 6px;
  padding-left: 14px;
  padding-right: 14px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.hero-mark i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blueprint);
  flex-shrink: 0;
  animation: bp-breathe 2.4s ease-in-out infinite;
}

@keyframes bp-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-acts {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
  margin-bottom: 26px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

/* Hero 右侧视觉容器(配角定位,不抢文案注意力) */
.hero-visual {
  min-width: 0;
}

.hero-visual .uimock {
  max-width: 440px;
  margin-left: auto;
}

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

  .hero-visual .uimock {
    margin-left: 0;
    max-width: 420px;
  }
}

/* ---------- 纯 CSS 客户端界面示意卡(静态、零动画、抽象色块) ---------- */
.uimock {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: var(--lift);
  overflow: hidden;
}

.uimock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 12px;
  padding-bottom: 12px;
  padding-left: 14px;
  padding-right: 14px;
  border-bottom: 1px solid var(--hairline);
}

.uimock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper-deep);
  flex-shrink: 0;
}

.uimock-title {
  height: 8px;
  width: 38%;
  border-radius: var(--r-pill);
  background: var(--paper-deep);
  margin-left: 8px;
}

.uimock-body {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 16px;
  padding-left: 14px;
  padding-right: 14px;
}

.uimock-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.uimock-navblk {
  height: 22px;
  border-radius: var(--r-tiny);
  background: var(--paper-mist);
}

.uimock-navblk.is-on {
  background: var(--blueprint-wash);
}

.uimock-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.uimock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 12px;
  padding-right: 12px;
  min-width: 0;
}

.uimock-line {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--paper-mist);
  flex: 1;
  min-width: 0;
}

.uimock-switch {
  width: 34px;
  height: 18px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--blueprint);
  flex-shrink: 0;
}

.uimock-switch.is-on {
  background: var(--blueprint);
}

/* ---------- 通用面板 / 卡片 ---------- */
.panel-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
  padding-top: 24px;
  padding-bottom: 24px;
  padding-left: 24px;
  padding-right: 24px;
}

.panel-flat {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding-top: 20px;
  padding-bottom: 20px;
  padding-left: 22px;
  padding-right: 22px;
}

/* 网格助手(子项 min-width:0 防溢出) */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

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

.grid-2 > *,
.grid-3 > * {
  min-width: 0;
}

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

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

/* ---------- 页脚(footer.js 注入) ---------- */
.base {
  background: var(--paper-mist);
  border-top: 1px solid var(--hairline);
  padding-top: 56px;
  padding-bottom: 28px;
}

.base-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
}

.base-grid > * {
  min-width: 0;
}

.base-brand .brand {
  margin-bottom: 14px;
}

.base-brand p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 0;
  max-width: 34ch;
}

.base-col h3 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 14px;
}

.base-col ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.base-col a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
}

.base-col a:hover {
  color: var(--blueprint);
}

.base-col .is-cur {
  color: var(--blueprint);
  font-weight: 700;
  font-size: 0.9rem;
}

.base-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  margin-top: 44px;
  padding-top: 20px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.base-line p {
  margin-bottom: 0;
}

.base-line a {
  color: var(--ink-soft);
  text-decoration: none;
}

.base-line a:hover {
  color: var(--blueprint);
}

.base-line .sep {
  padding-inline: 8px;
  color: var(--hairline);
}

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

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

/* ---------- 滚动淡入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-mark i {
    animation: none;
  }
}