/* ==========================================================================
   AIminihub 设计系统 v1
   --------------------------------------------------------------------------
   重构说明：旧站是游戏站语言（深紫 #03000a + 烫金 #f5b942 + 血红 #dc2626），
   金色是传奇/页游的"土豪感"，和 AI 产品气质冲突。这里整套换掉：
     · 底色  深紫 → 深蓝黑（更像基础设施，不像游戏机）
     · 主色  烫金 → 科技青（AI/工程感）
     · 辅色  血红 → 紫蓝渐变（保留"炫"但去掉暴力感）

   用法：<link rel="stylesheet" href="/assets/css/main.css">
   所有页面共用这一份，不允许在页面里另写配色变量。
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 底色：由深到浅的三层 */
  --bg-0: #05070d;
  --bg-1: #0a0f1a;
  --bg-2: #0f1626;
  --bg-3: #151e33;

  /* 表面与描边 */
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.18);

  /* 文字 */
  --text: #e9eefb;
  --text-2: #b8c2d6;
  --muted: #8391ad;

  /* 品牌色 */
  --cyan: #22d3ee;
  --cyan-2: #06b6d4;
  --cyan-dim: rgba(34, 211, 238, 0.14);
  --violet: #a78bfa;
  --violet-2: #8b5cf6;
  --indigo: #6366f1;
  --grad: linear-gradient(120deg, #22d3ee 0%, #6366f1 52%, #a78bfa 100%);
  --grad-soft: linear-gradient(120deg, rgba(34, 211, 238, .16), rgba(167, 139, 250, .16));

  /* 语义色 */
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --ok-dim: rgba(52, 211, 153, 0.12);

  /* 尺度 */
  --nav-h: 66px;
  --wrap: 1180px;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .3);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
          "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
          "Liberation Mono", monospace;
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-2);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; transition: color .16s; }
a:hover { color: var(--violet); }
h1, h2, h3, h4 { color: var(--text); line-height: 1.3; font-weight: 700; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 5vw, 46px); letter-spacing: -.02em; }
h2 { font-size: clamp(22px, 3.2vw, 32px); letter-spacing: -.01em; }
h3 { font-size: clamp(18px, 2.2vw, 22px); }
h4 { font-size: 17px; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: .4em; }
code, kbd { font-family: var(--mono); font-size: .92em; }
code {
  background: var(--surface-2); padding: .15em .45em;
  border: 1px solid var(--line); border-radius: 5px; color: var(--cyan);
}
pre {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px; overflow-x: auto; margin: 0 0 1.4em;
}
pre code { background: none; border: 0; padding: 0; color: var(--text-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
strong { color: var(--text); font-weight: 700; }
::selection { background: rgba(34, 211, 238, .3); color: #fff; }

/* 键盘可达性：所有可聚焦元素都要有可见焦点环 */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 3. 布局 ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.section { padding: 72px 0; }
.section--tight { padding: 44px 0; }
.section--alt { background: var(--bg-1); }
.section__head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section__head p { color: var(--muted); font-size: 17px; margin: 0; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 14px;
}
.eyebrow::before { content: "// "; opacity: .55; }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* ---------- 4. 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(5, 7, 13, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; gap: 26px; height: 100%; }
.brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 17px; font-weight: 800; color: var(--text);
  letter-spacing: -.01em; white-space: nowrap; flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand__mark {
  width: 27px; height: 27px; border-radius: 7px;
  background: var(--grad); display: grid; place-items: center;
  font-size: 15px; color: #fff; font-weight: 800;
}
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__links a {
  padding: 7px 13px; border-radius: 8px;
  color: var(--text-2); font-size: 14.5px; font-weight: 500;
  white-space: nowrap;
}
.nav__links a:hover { background: var(--surface-2); color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--cyan); background: var(--cyan-dim); }
.nav__cta {
  padding: 8px 17px; border-radius: 9px; font-size: 14.5px; font-weight: 600;
  background: var(--grad); color: #fff !important; flex-shrink: 0;
}
.nav__cta:hover { filter: brightness(1.12); }
.nav__burger {
  display: none; margin-left: auto; background: none; border: 0;
  color: var(--text); font-size: 21px; cursor: pointer; padding: 6px 9px;
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 25px; border-radius: 10px;
  font-size: 15px; font-weight: 600; line-height: 1.4;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s, filter .14s, background .14s, border-color .14s;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--grad); color: #fff; }
.btn--primary:hover { filter: brightness(1.13); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--line-hi); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--cyan); color: var(--text); }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 6. 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  transition: border-color .18s, transform .18s, background .18s;
}
.card:hover { border-color: var(--line-hi); background: var(--surface-2); }
.card--link:hover { transform: translateY(-3px); }
.card__icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--cyan-dim); color: var(--cyan);
  display: grid; place-items: center; font-size: 20px;
  margin-bottom: 15px; border: 1px solid rgba(34, 211, 238, .25);
}
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); font-size: 14.8px; }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 84px;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(760px 380px at 22% 8%, rgba(34, 211, 238, .17), transparent 70%),
    radial-gradient(680px 340px at 78% 22%, rgba(167, 139, 250, .15), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 76% 62% at 50% 34%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 76% 62% at 50% 34%, #000 35%, transparent 100%);
}
.hero__in { position: relative; z-index: 1; }
.hero__title { max-width: 17em; }
.hero__title em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__lead {
  font-size: 18px; color: var(--text-2); max-width: 46em; margin-bottom: 30px;
}
.hero__lead strong { color: var(--cyan); }
.hero__stats {
  display: flex; flex-wrap: wrap; gap: 38px;
  margin-top: 46px; padding-top: 30px; border-top: 1px solid var(--line);
}
.stat__n {
  font-size: 30px; font-weight: 800; line-height: 1.1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat__l { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* ---------- 8. 徽标 / 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 100px;
  font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-2);
}
.tag--cyan { background: var(--cyan-dim); border-color: rgba(34, 211, 238, .3); color: var(--cyan); }
.tag--ok { background: var(--ok-dim); border-color: rgba(52, 211, 153, .3); color: var(--ok); }
.tag--warn { background: rgba(251, 191, 36, .13); border-color: rgba(251, 191, 36, .3); color: var(--warn); }

/* ---------- 9. 表格 ---------- */
.table-wrap { overflow-x: auto; margin-bottom: 1.6em; border-radius: var(--r); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 11px 15px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--bg-2); color: var(--text); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface); }

/* ---------- 10. 提示块 ---------- */
.note {
  border-left: 3px solid var(--cyan);
  background: var(--cyan-dim);
  padding: 15px 19px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 0 0 1.5em; font-size: 15px;
}
.note--warn { border-color: var(--warn); background: rgba(251, 191, 36, .1); }
.note--ok { border-color: var(--ok); background: var(--ok-dim); }
.note p:last-child { margin-bottom: 0; }

/* ---------- 11. FAQ 手风琴 ---------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq__item {
  border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 12px; background: var(--surface); overflow: hidden;
}
.faq__item[open] { border-color: rgba(34, 211, 238, .35); background: var(--surface-2); }
.faq__q {
  cursor: pointer; padding: 17px 52px 17px 21px; position: relative;
  color: var(--text); font-weight: 600; font-size: 16px; list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+"; position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--cyan);
  line-height: 1;
}
.faq__item[open] .faq__q::after { content: "−"; }
.faq__a { padding: 0 21px 19px; color: var(--text-2); font-size: 15px; }
.faq__a p:last-child, .faq__a ul:last-child { margin-bottom: 0; }

/* ---------- 12. 文章列表 ---------- */
.post {
  display: block; padding: 21px 23px;
  border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 13px; background: var(--surface);
  transition: border-color .18s, transform .18s, background .18s;
}
.post:hover { border-color: rgba(34, 211, 238, .4); background: var(--surface-2); transform: translateX(3px); }
.post h3 { margin: 9px 0 7px; font-size: 18.5px; }
.post h3 a { color: var(--text); }
.post h3 a:hover { color: var(--cyan); }
.post__meta { display: flex; flex-wrap: wrap; gap: 13px; font-size: 13px; color: var(--muted); }
.post__excerpt { color: var(--muted); font-size: 14.8px; margin: 0; }

/* ---------- 13. 文章正文（30 篇文章用） ---------- */
.article { max-width: 760px; margin: 0 auto; font-size: 16.5px; }
.article > header { margin-bottom: 38px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.article__title { margin-bottom: .4em; }
.article__meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 15px; }
.article h2 {
  margin: 2.2em 0 .8em; padding-left: 14px;
  border-left: 3px solid var(--cyan); font-size: 24px;
}
.article h3 { margin: 1.8em 0 .7em; }
.article p { margin-bottom: 1.25em; }
.article blockquote {
  margin: 1.6em 0; padding: 15px 20px;
  background: var(--surface); border-left: 3px solid var(--violet);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text-2);
}
.article ul, .article ol { padding-left: 1.5em; }
.article li::marker { color: var(--cyan); }
.article img { border-radius: var(--r); margin: 1.6em 0; }
.article__toc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 19px 23px; margin-bottom: 34px;
}
.article__toc strong { color: var(--text); display: block; margin-bottom: 9px; }
.article__toc ol { margin: 0; padding-left: 1.3em; font-size: 14.5px; }

/* ---------- 14. 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  padding: 52px 0 30px; margin-top: 40px;
}
.footer__grid {
  display: grid; gap: 34px;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  margin-bottom: 38px;
}
.footer__brand { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.footer__brand .brand { font-size: 17px; }
.footer__about { color: var(--muted); font-size: 14.2px; max-width: 30em; margin: 0 0 15px; }
.footer h4 { font-size: 13.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 13px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--text-2); font-size: 14.2px; }
.footer a:hover { color: var(--cyan); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13.2px;
}

/* ---------- 15. 步骤条 ---------- */
.steps { counter-reset: s; }
.step { position: relative; padding-left: 56px; margin-bottom: 26px; }
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 1px;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.step h3 { margin-bottom: .35em; font-size: 18px; }
.step p { margin: 0; color: var(--muted); }

/* ---------- 16. 对比表（本地 vs 云端） ---------- */
.vs { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.vs__col { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; background: var(--surface); }
.vs__col--hi { border-color: rgba(34, 211, 238, .4); background: var(--cyan-dim); }
.vs__col h3 { margin-bottom: .5em; }
.vs__col ul { list-style: none; padding: 0; margin: 0; font-size: 14.8px; }
.vs__col li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.vs__col li:last-child { border-bottom: 0; }

/* ---------- 17. CTA 段 ---------- */
.cta {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--grad-soft);
  padding: 48px 40px; text-align: center; margin: 0 0 20px;
}
.cta h2 { margin-bottom: .4em; }
.cta p { color: var(--text-2); max-width: 52em; margin: 0 auto 24px; }

/* ---------- 18. 工具类 ---------- */
.mt0 { margin-top: 0; } .mt1 { margin-top: 10px; } .mt2 { margin-top: 20px; }
.mt3 { margin-top: 30px; } .mt4 { margin-top: 40px; } .mt5 { margin-top: 56px; }
.mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 10px; } .mb2 { margin-bottom: 20px; }
.mb3 { margin-bottom: 30px; } .mb4 { margin-bottom: 40px; } .mb5 { margin-bottom: 56px; }
.tc { text-align: center; } .tr { text-align: right; }
.muted { color: var(--muted); }
.dim { color: var(--text-2); }
.cyan { color: var(--cyan); } .violet { color: var(--violet); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -60px; left: 12px; z-index: 200;
  background: var(--cyan); color: #05070d; padding: 10px 18px;
  border-radius: 0 0 8px 8px; font-weight: 700; transition: top .16s;
}
.skip-link:focus { top: 0; color: #05070d; }

/* ---------- 19. 响应式 ---------- */
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .vs { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .section { padding: 52px 0; }
  .hero { padding: 64px 0 56px; }
  .nav__burger { display: block; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(5, 7, 13, .985);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 14px 22px 20px; margin: 0;
    max-height: 0; overflow: hidden;
    transition: max-height .22s ease;
  }
  .nav__links[data-open="true"] { max-height: 460px; }
  .nav__links a { padding: 11px 13px; font-size: 15.5px; }
  .nav__cta { margin-top: 8px; text-align: center; }
  .hero__stats { gap: 22px 30px; }
  .stat__n { font-size: 25px; }
  .article h2 { font-size: 21px; }
  .cta { padding: 34px 22px; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .footer__grid { grid-template-columns: 1fr; }
  .wrap { padding: 0 17px; }
}

/* ---------- 20. 打印（律师场景：用户会打印方案） ---------- */
@media print {
  body { background: #fff; color: #000; }
  .nav, .footer, .skip-link { display: none !important; }
  .hero::before, .hero::after { display: none; }
  h1, h2, h3, h4 { color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* ---------- 21. 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
