/* Mikiko 官网共享样式：黑色主调企业级产品站（首页 / 文档 / 更新日志）。 */
:root {
  color-scheme: dark;
  --bg: #09090b;
  --bg-panel: #101014;
  --bg-elevated: #16161c;
  --border: #1f1f26;
  --border-strong: #2c2c36;
  --text: #e7e7ea;
  --text-muted: #9b9ba4;
  --text-faint: #6d6d78;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-text: #a5b4fc;
  --success: #34d399;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(99, 102, 241, 0.14), transparent 60%),
    radial-gradient(900px 420px at 10% 0%, rgba(139, 92, 246, 0.08), transparent 55%), var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent-text);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}

/* ── 顶部导航 ─────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(9, 9, 11, 0.78);
  border-bottom: 1px solid var(--border);
}
.site-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}
/* 导航标识：与应用图标同源（specs/brand/icon-assets.md 官网派生），不再手绘。 */
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: block;
  object-fit: contain;
}
.nav-links {
  display: flex;
  gap: 22px;
  margin-left: 12px;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-links a[aria-current="page"] {
  color: var(--text);
}
.nav-spacer {
  flex: 1;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-size: 14px;
  padding: 9px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    filter 0.15s,
    background 0.15s,
    border-color 0.15s;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover {
  filter: brightness(1.12);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ── 通用区块 ─────────────────────────────── */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 96px;
}
section {
  margin-top: 88px;
}
.section-eyebrow {
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1.hero-title {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.2;
  margin: 14px 0 16px;
  letter-spacing: -0.02em;
}
h2.section-title {
  font-size: 28px;
  margin: 8px 0 8px;
  letter-spacing: -0.01em;
}
.section-desc {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 32px;
}

/* ── Hero ─────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  margin-top: 72px;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 520px;
  margin: 0 0 30px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  color: var(--text-faint);
  font-size: 13px;
  margin-top: 18px;
}

/* 终端演示卡 */
.terminal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
}
.terminal-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.terminal-title {
  color: var(--text-faint);
  margin-left: 8px;
  font-size: 12px;
}
.terminal-body {
  padding: 16px 18px;
  color: #c8c8d0;
}
.t-dim {
  color: var(--text-faint);
}
.t-accent {
  color: var(--accent-text);
}
.t-green {
  color: var(--success);
}
.t-amber {
  color: #fbbf24;
}
.t-prompt::before {
  content: "$ ";
  color: var(--accent-text);
}

/* ── 卡片网格 ─────────────────────────────── */
.grid {
  display: grid;
  gap: 16px;
}
.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}
.card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.14);
  color: var(--accent-text);
  font-size: 15px;
}

/* ── 下载区 ───────────────────────────────── */
.download-group {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-top: 16px;
}
.download-group h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.download-group .meta {
  color: var(--text-faint);
  font-size: 12.5px;
  margin: 0 0 12px;
}
.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.download-links .btn {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* ── 文档 / 更新日志布局 ──────────────────── */
.page-header {
  margin-top: 56px;
}
.docs-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 48px;
  margin-top: 40px;
}
.docs-toc {
  position: sticky;
  top: 84px;
  align-self: start;
  font-size: 13.5px;
}
.docs-toc a {
  display: block;
  color: var(--text-muted);
  padding: 5px 0 5px 12px;
  border-left: 2px solid var(--border);
}
.docs-toc a:hover {
  color: var(--text);
  text-decoration: none;
}
.docs-toc a.active {
  color: var(--accent-text);
  border-left-color: var(--accent);
}
.doc-section {
  margin-top: 44px;
}
.doc-section h2 {
  font-size: 21px;
  margin: 0 0 6px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.doc-section:first-of-type h2 {
  border-top: 0;
  padding-top: 0;
}
.doc-section p {
  color: var(--text-muted);
  font-size: 14.5px;
}
.doc-section ol,
.doc-section ul {
  color: var(--text-muted);
  font-size: 14.5px;
  padding-left: 22px;
}
.doc-section li {
  margin: 6px 0;
}
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin: 14px 0;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.14);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
}

/* 更新日志条目 */
.release {
  border-left: 2px solid var(--border);
  padding: 2px 0 2px 24px;
  margin-top: 36px;
  position: relative;
}
.release::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.release.latest::before {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}
.release-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.release-version {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
}
.release-badge {
  font-size: 11px;
  color: var(--accent-text);
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.1);
  border-radius: 999px;
  padding: 2px 10px;
}
.release-date {
  color: var(--text-faint);
  font-size: 13px;
}
.release ul {
  color: var(--text-muted);
  font-size: 14px;
  padding-left: 20px;
  margin: 10px 0 0;
}
.release li {
  margin: 5px 0;
}
.release li strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Footer ───────────────────────────────── */
footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-faint);
  font-size: 13px;
  flex-wrap: wrap;
}
.footer-inner .sep {
  opacity: 0.4;
}
.footer-links {
  margin-left: auto;
  display: flex;
  gap: 18px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    margin-top: 48px;
  }
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
  }
  .docs-toc a {
    border-left: 0;
    padding: 2px 0;
  }
}

/* ══ 下载页 ═══════════════════════════════════ */
.download-main {
  min-height: calc(100vh - 60px - 76px);
  display: grid;
  align-content: center;
  padding-bottom: 48px;
}
.detect-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
}
.detect-hint .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}
.detect-hint.unknown .dot {
  background: var(--text-faint);
  box-shadow: none;
}
.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.os-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 280px;
  padding: 36px 28px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
  text-decoration: none;
  color: var(--text);
}
.os-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  text-decoration: none;
}
.os-card.recommended {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.35),
    0 18px 48px rgba(0, 0, 0, 0.45);
}
.os-card .recommended-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  color: var(--accent-text);
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 999px;
  padding: 2px 10px;
}
.os-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent-text);
  margin-bottom: 10px;
}
.os-icon svg {
  width: 38px;
  height: 38px;
}
.os-card h3 {
  margin: 0;
  font-size: 20px;
}
.os-card .os-desc {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 2px 0 0;
  max-width: 260px;
}
.os-card .os-action {
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent-text);
  font-weight: 600;
}
.download-extra {
  margin-top: 28px;
  color: var(--text-faint);
  font-size: 13px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* 规格选择弹层 */
.spec-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 5, 8, 0.72);
  backdrop-filter: blur(6px);
}
.spec-modal.open {
  display: flex;
}
.spec-sheet {
  width: min(560px, 100%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 26px 26px 18px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.6);
}
.spec-sheet h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.spec-sheet .meta {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 16px;
}
.spec-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-top: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.spec-option:hover {
  border-color: var(--accent);
  transform: translateX(3px);
  text-decoration: none;
}
.spec-option .spec-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.14);
  color: var(--accent-text);
  font-size: 16px;
}
.spec-option .spec-name {
  font-weight: 600;
  font-size: 14.5px;
}
.spec-option .spec-file {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
}
.spec-option .spec-arrow {
  margin-left: auto;
  color: var(--text-faint);
}
.spec-close {
  margin-top: 16px;
  width: 100%;
}

/* 导航 GitHub 开源入口（全站共用，图标随文字色）。 */
.nav-github {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: var(--text-muted);
}
.nav-github:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-github svg {
  width: 17px;
  height: 17px;
}
