/* ==========================================================================
   天河落 THL (tianheluo.com) — 设计系统 (style.css v4 · 天河深海星轨)
   色板来自 Logo：天河亮蓝 #3FA9FF → 深海蓝 #0B4FC4 → 墨蓝 #0B2A5B（tools/make_logo.py）
   核心语言：深海底色 + 1px 镜面高光描边 + 白色标题渐变 + 天河蓝作为唯一品牌色
   ========================================================================== */

:root {
  /* 天河深海星轨：品牌色（来自 Logo：天河亮蓝 → 深海蓝 → 墨蓝） */
  --brand-light: #3FA9FF;
  --brand: #1668DC;
  --brand-deep: #0B4FC4;
  --brand-ink: #0B2A5B;
  --amber: #F59E0B;

  /* 深空底层与表面 */
  --bg: #06080E;
  --bg2: #0A0E17;
  --card: #0F1523;
  --card-hover: #151E32;
  --rim: rgba(255, 255, 255, 0.10);
  --line: rgba(148, 163, 184, 0.085);
  --line2: rgba(63, 169, 255, 0.22);

  /* 文字三级明度 */
  --text: #F8FAFC;
  --mute: #94A3B8;
  --dim: #526077;

  /* 旧变量名保留，指向新色板，避免组件大面积改名 */
  --blue: #1668DC;
  --blue-bright: #3FA9FF;
  --blue2: #0B4FC4;
  --glow: rgba(22, 104, 220, 0.28);
  --glow-strong: rgba(63, 169, 255, 0.42);
  --stage-arc: rgba(22, 104, 220, 0.55);
  --grad-brand: linear-gradient(135deg, #3FA9FF 0%, #1668DC 55%, #0B4FC4 100%);
  --grad-drop: linear-gradient(180deg, #3FA9FF 0%, #0B4FC4 100%);
  --grad-title: linear-gradient(180deg, #ffffff 0%, #ffffff 42%, rgba(255, 255, 255, 0.55) 100%);
  --grad-shine: linear-gradient(110deg, #ffffff 15%, #BFE3FF 45%, #3FA9FF 72%, #ffffff 90%);

  /* 语义信号色 */
  --ok: #10b981;
  --warn: #F59E0B;
  --r: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", sans-serif;
  --mono: "JetBrains Mono", "Berkeley Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 42% at 50% -8%, var(--glow), transparent 68%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03), transparent 45%);
  color: var(--text);
  font: 15.5px/1.65 var(--font);
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

::selection {
  background: rgba(63, 169, 255, 0.32);
  color: #ffffff;
}

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

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ==================== 顶部悬浮胶囊导航栏 (Raycast / Linear Floating Pill Navbar) ==================== */
.nav {
  position: sticky;
  top: 14px;
  z-index: 80;
  padding: 0 16px;
  background: transparent;
  border-bottom: 0;
  pointer-events: none;
}

.nav .wrap {
  pointer-events: auto;
  display: flex;
  align-items: center;
  height: 54px;
  max-width: 1096px;
  padding: 0 14px 0 18px;
  gap: 18px;
  border-radius: 14px;
  background: rgba(14, 15, 18, 0.74);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.085);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.12),
    0 14px 40px -10px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(0, 0, 0, 0.5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: #ffffff;
  transition: opacity 0.18s ease;
}

.brand:hover {
  opacity: 0.88;
}


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

.nav nav a {
  position: relative;
  color: var(--mute);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav nav a.on {
  color: #ffffff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sp {
  flex: 1;
}

/* ==================== 按钮系统 (.btn) — Linear / Vercel 高反差铂金按钮 & 暗色玻璃按钮 ==================== */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.075);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 6px 18px rgba(0, 0, 0, 0.45);
}

.btn:active {
  transform: translateY(0);
}

/* 主按钮：Linear / Vercel 标志性铂金高反差实心按钮 */
.btn.pri {
  background: linear-gradient(180deg, #ffffff 0%, #e4e7ec 100%);
  border: 1px solid #ffffff;
  color: #06080E;
  font-weight: 600;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 8px 28px -4px rgba(255, 255, 255, 0.22),
    0 0 24px -6px var(--glow-strong),
    inset 0 1px 0 #ffffff;
}

.btn.pri:hover {
  background: #ffffff;
  color: #000000;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 12px 36px -4px rgba(255, 255, 255, 0.32),
    0 0 32px -4px var(--glow-strong);
  transform: translateY(-1.5px);
}

.btn.sm {
  height: 32px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: 8px;
}

.btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

/* ==================== Hero 区域 (.hero) — Vercel 建筑准星网格 + 铂金大标题 ==================== */
.hero {
  position: relative;
  text-align: center;
  padding: 96px 0 64px;
  overflow: hidden;
}

/* 顶部聚光舞台背光 */
.hero::before {
  content: "";
  position: absolute;
  inset: -200px -10% auto;
  height: 680px;
  background:
    radial-gradient(42% 50% at 50% 8%, var(--glow), transparent 70%),
    radial-gradient(28% 35% at 50% 2%, rgba(255, 255, 255, 0.06), transparent 65%);
  pointer-events: none;
}

/* Vercel Geist 风格极细建筑工程坐标网格 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(62% 55% at 50% 18%, #000 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(62% 55% at 50% 18%, #000 10%, transparent 80%);
  pointer-events: none;
}

.hero > .wrap {
  position: relative;
  z-index: 2;
}

/* Linear 风格精密胶囊徽标 (.pill) */
.pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 500;
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 16px rgba(0, 0, 0, 0.35);
  padding: 5px 14px;
  border-radius: 99px;
  backdrop-filter: blur(12px);
}

.pill i {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 10px var(--blue-bright);
}

h1 {
  font-size: clamp(40px, 6.6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 24px 0 18px;
  font-weight: 700;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 em {
  font-style: normal;
  background: var(--grad-shine);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 600px;
  margin: 0 auto;
  color: var(--mute);
  font-size: 17.5px;
  line-height: 1.68;
  font-weight: 400;
}

.cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hint {
  margin-top: 18px;
  color: var(--mute);
  font-size: 12.5px;
  font-family: var(--mono);
  letter-spacing: 0.03em;
}

/* ==================== 备用启动器预览 (.mock) ==================== */
.mock {
  max-width: 720px;
  margin: 64px auto 0;
  border: 1px solid var(--line2);
  border-radius: 16px;
  background: #0c0d10;
  box-shadow: 0 40px 100px -30px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: left;
  overflow: hidden;
}
.mock .bar { display: flex; gap: 8px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 15px; }
.mock .bar b { color: var(--text); font-weight: 500; }
.caret { display: inline-block; width: 2px; height: 18px; background: var(--blue-bright); animation: bl 1s steps(1) infinite; vertical-align: -3px; }
@keyframes bl { 50% { opacity: 0; } }
.mock .row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; font-size: 15px; }
.mock .row.sel { background: rgba(255, 255, 255, 0.06); }
.mock .row .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; background: var(--card); border: 1px solid var(--line2); }
.mock .row small { margin-left: auto; color: var(--dim); font-family: var(--mono); font-size: 12px; }
.mock .sec { padding: 10px 20px 4px; color: var(--dim); font-size: 12px; letter-spacing: 0.08em; }

/* ==================== 章节与通用卡片 (section / .card) ==================== */
section {
  padding: 96px 0;
  position: relative;
}

/* Linear 风格精细章节指示标 (.eyebrow) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-bright);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--grad-brand);
  box-shadow: 0 0 10px var(--glow-strong);
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.028em;
  margin: 12px 0 12px;
  font-weight: 700;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  color: var(--mute);
  max-width: 580px;
  font-size: 16px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 38px;
}

.card {
  background: linear-gradient(180deg, rgba(15, 21, 35, 0.78) 0%, rgba(10, 14, 23, 0.92) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  box-shadow:
    inset 0 1px 0 0 var(--rim),
    0 12px 32px -16px rgba(0, 0, 0, 0.65);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  border-color: var(--line2);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    0 20px 44px -18px rgba(0, 0, 0, 0.8);
}

.card .n {
  display: inline-block;
  font: 600 11.5px var(--mono);
  color: var(--blue-bright);
  letter-spacing: 0.04em;
}

.card h3 {
  font-size: 17.5px;
  font-weight: 600;
  margin: 8px 0 6px;
  color: #ffffff;
  letter-spacing: -0.015em;
}

.card p {
  color: var(--mute);
  font-size: 14px;
  line-height: 1.65;
}

/* ==================== 插件商店筛选栏与插件卡片 (Raycast Store 风格 .tools / .pc) ==================== */
.tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 26px 0 24px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 16, 20, 0.82);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 30px -12px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
}

.chip {
  border: 1px solid transparent;
  background: transparent;
  color: var(--mute);
  height: 32px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
}

.chip:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.chip.on {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.search {
  margin-left: auto;
  height: 34px;
  width: min(260px, 100%);
  padding: 0 12px 0 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #06080E url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 11px center;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search::placeholder {
  color: var(--dim);
}

.search:focus {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.plist {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Raycast Store 风格插件卡片 (.pc) */
.pc {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, rgba(15, 21, 35, 0.82) 0%, rgba(10, 14, 23, 0.94) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow:
    inset 0 1px 0 0 var(--rim),
    0 10px 28px -16px rgba(0, 0, 0, 0.7);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.pc:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(28, 30, 37, 0.9) 0%, rgba(16, 18, 23, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.22),
    0 20px 44px -18px rgba(0, 0, 0, 0.85),
    0 0 30px -12px var(--glow);
  transform: translateY(-3px);
}

.pc .top {
  display: flex;
  align-items: center;
  gap: 13px;
}

.pic {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: linear-gradient(135deg, #1f2430, #12151c);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  flex: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pc:hover .pic {
  transform: scale(1.05);
}

.pc h3 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.28;
  color: #ffffff;
  letter-spacing: -0.01em;
  min-width: 0;
}

.pc h3 small {
  display: inline-block;
  color: var(--dim);
  font: 500 11px/1.2 var(--mono);
  letter-spacing: 0;
}

.pc p {
  color: var(--mute);
  font-size: 13.5px;
  line-height: 1.62;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc .meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pc .meta::after {
  content: "详情 →";
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--dim);
  transition: color 0.18s ease, transform 0.18s ease;
}

.pc:hover .meta::after {
  color: #ffffff;
  transform: translateX(3px);
}

.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  color: var(--mute);
}

.tag.beta {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.22);
}

.tag.planned {
  color: var(--dim);
}

.tag.stable {
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.22);
}

.tag.community {
  color: #9FD4FF;
  background: rgba(22, 104, 220, 0.1);
  border-color: rgba(63, 169, 255, 0.25);
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--dim);
  padding: 56px 20px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed var(--line2);
  border-radius: var(--r);
}

/* ==================== 插件详情页与内页 (.crumb / .dh / .dcols / .panel) ==================== */
.crumb {
  color: var(--dim);
  font-size: 13px;
  padding-top: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.crumb a {
  color: var(--mute);
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: all 0.16s ease;
}

.crumb a:hover {
  color: #ffffff;
  border-color: var(--line2);
  background: rgba(255, 255, 255, 0.06);
}

.dh {
  display: flex;
  gap: 22px;
  align-items: center;
  margin: 22px 0 16px;
  padding: 26px 28px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 21, 35, 0.85), rgba(10, 14, 23, 0.95));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--rim), 0 18px 44px -20px rgba(0, 0, 0, 0.7);
  flex-wrap: wrap;
}

.dh .pic {
  width: 72px;
  height: 72px;
  font-size: 32px;
  border-radius: 18px;
}

.dh h1 {
  font-size: clamp(26px, 3.8vw, 36px);
  margin: 0 0 6px;
}

.dcols {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 24px;
  margin-top: 28px;
  align-items: start;
}

.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 21, 35, 0.82) 0%, rgba(10, 14, 23, 0.94) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px 26px;
  box-shadow: inset 0 1px 0 var(--rim), 0 14px 36px -18px rgba(0, 0, 0, 0.65);
  transition: border-color 0.2s ease;
}

.panel:hover {
  border-color: var(--line2);
}

.dcols > .panel:last-child {
  position: sticky;
  top: 86px;
}

.panel h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 14px;
}

.panel h4::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 8px var(--blue-bright);
}

.panel ul {
  list-style: none;
  padding: 0;
}

.panel li {
  padding: 10px 0 10px 22px;
  position: relative;
  color: var(--mute);
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel li:last-child { border: 0; }

.panel li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--blue-bright);
}

.panel ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: s;
}

.panel ol li {
  counter-increment: s;
  padding-left: 36px;
}

.panel ol li::before {
  content: counter(s);
  left: 0;
  top: 11px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font: 600 11.5px/22px var(--mono);
  text-align: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

dl.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px 16px;
  font-size: 13.5px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

dl.kv dt { color: var(--dim); }
dl.kv dd { text-align: right; color: var(--text); font-weight: 500; font-family: var(--mono); }

.panel .btn {
  width: 100%;
  justify-content: center;
}

.stack {
  display: grid;
  gap: 18px;
}

/* ==================== 安装步骤与代码块 (.steps / .step / code / .note) ==================== */
.steps {
  counter-reset: s;
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.step {
  position: relative;
  display: flex;
  gap: 18px;
  background: linear-gradient(180deg, rgba(15, 21, 35, 0.82) 0%, rgba(10, 14, 23, 0.94) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 24px;
  box-shadow: inset 0 1px 0 var(--rim), 0 10px 28px -16px rgba(0, 0, 0, 0.6);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.step:hover {
  border-color: var(--line2);
  transform: translateY(-2px);
}

.step::before {
  counter-increment: s;
  content: "0" counter(s);
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font: 600 13px var(--mono);
}

.step h3 {
  font-size: 16.5px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 5px;
}

.step p {
  color: var(--mute);
  font-size: 14px;
  line-height: 1.65;
}

code, .path {
  font-family: var(--mono);
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px 7px;
  color: #e2e8f0;
  white-space: nowrap;
}
code.path, .path {
  white-space: normal;
  overflow-wrap: anywhere;
}

pre {
  position: relative;
  background: #050811;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font: 13px/1.68 var(--mono);
  color: #d1d5db;
  margin: 12px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  word-break: normal;
}

.note {
  margin-top: 20px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.05);
  border-radius: var(--r);
  padding: 16px 20px;
  color: #fcd34d;
  font-size: 13.5px;
}

/* ==================== 页脚 (footer) — Linear 极简四列网格 ==================== */
footer {
  border-top: 1px solid var(--line);
  background: #050811;
  padding: 60px 0 44px;
  margin-top: 64px;
  color: var(--dim);
  font-size: 13.5px;
  position: relative;
  z-index: 2;
}

footer .wrap {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr auto;
  gap: 36px;
  align-items: start;
}

footer b {
  display: block;
  color: #e2e8f0;
  margin-bottom: 12px;
  font-size: 13.5px;
  font-weight: 600;
}

footer a {
  display: block;
  padding: 4px 0;
  color: var(--mute);
  transition: color 0.16s ease;
}

footer a:hover {
  color: #ffffff;
}

.copy {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--mute);
  line-height: 1.6;
}

/* 版权行里的文字链接要留在行内（上面的 footer a 是整块链接） */
.copy a {
  display: inline;
  padding: 0;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line2);
}

/* ==================== 响应式断点 ==================== */
@media (max-width: 920px) {
  .grid3, .plist { grid-template-columns: repeat(2, 1fr); }
  .dcols { grid-template-columns: 1fr; }
  .dcols > .panel:last-child { position: static; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 580px) {
  .wrap { padding: 0 16px; }
  .nav { top: 8px; padding: 0 10px; }
  .nav nav { gap: 4px; }
  .nav .btn { display: none; }
  .grid3, .plist { grid-template-columns: 1fr; }
  .hero { padding: 68px 0 44px; }
  .tools { padding: 10px; }
  .search { margin-left: 0; width: 100%; }
  footer .wrap { grid-template-columns: 1fr; gap: 28px; }
}

/* ==================== 长文档页（ai.html：给 AI 读的开发说明书） ==================== */
.doc {
  padding-top: 48px;
  padding-bottom: 56px;
  max-width: 900px;
}

.doc-note {
  color: var(--mute);
  font-size: 13.5px;
  border: 1px solid var(--line2);
  background: var(--card);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 28px;
}

.doc-note a,
.doc a {
  color: var(--blue-bright);
}

.doc h1 {
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.doc h2,
.doc h3 {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.doc h2 {
  font-size: clamp(22px, 2.8vw, 27px);
  line-height: 1.25;
  margin: 52px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.doc h3 {
  font-size: 18px;
  margin: 30px 0 10px;
}

.doc p,
.doc li {
  color: #c5cbd5;
  line-height: 1.75;
}

.doc ul,
.doc ol {
  padding-left: 22px;
  margin: 8px 0 14px;
}

.doc li {
  margin: 4px 0;
}

.doc blockquote {
  margin: 14px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--blue);
  background: rgba(22, 104, 220, 0.07);
  border-radius: 0 10px 10px 0;
}

.doc blockquote p {
  margin: 4px 0;
}

.doc table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}

.doc th,
.doc td {
  border: 1px solid var(--line2);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.doc th {
  background: var(--card);
  color: var(--text);
}

/* ==================== v4 · 天河深海星轨：Logo 图片、斜切角、双生对照舱 ==================== */
.logo {
  width: 28px;
  height: 28px;
  display: block;
  flex: none;
}

.brand {
  font-weight: 600;
  letter-spacing: 0.1px;
}

/* 45° 图纸裁切角（致敬霍夫迈斯特拐角）：主按钮与插件卡片右上角 12px 斜切，切边辅以天河亮蓝细线 */
.btn.pri,
.pc {
  position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.btn.pri::after,
.pc::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  pointer-events: none;
  background: linear-gradient(45deg, transparent calc(50% - 0.6px), rgba(63, 169, 255, 0.85) 50%, transparent calc(50% + 0.6px));
}

/* 双生事务对照舱（致敬双肾格栅）：左 BEFORE 原值，右 AFTER 校正后，中间 Ctrl+Z 单事务回退 */
.viz.twin {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  margin-top: auto;
  padding-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  font-family: var(--mono);
}

.twin .cab {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.twin .cab small {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--mute);
}

.twin .cab b {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.twin .cab span {
  font-size: 11.5px;
  color: var(--mute);
}

.twin .before {
  background: #0b0e14;
}

.twin .after {
  background: linear-gradient(180deg, rgba(22, 104, 220, 0.38), rgba(11, 79, 196, 0.16));
}

.twin .after b {
  color: #bfe3ff;
}

.twin .mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  background: var(--bg2);
  color: var(--brand-light);
  font-size: 16px;
}

.twin .mid kbd {
  font-size: 11px;
}
