/* ============================================================
   CANN × CANNBot × GitCode — 合一设计系统 (Unified Design System)
   Base: GitCode light platform · Accents: CANN/Ascend blue
   DNA kept from cann.cannbot.cn: Space Grotesk numerals, chips,
   uppercase eyebrows, generous cards, orbit/terminal motifs.
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* -- neutrals (GitCode light platform) -- */
  --bg: #ffffff;
  --bg-subtle: #f6f8fa;
  --bg-inset: #f0f1f4;
  --surface: #ffffff;
  --surface-hover: #f5f5f6;
  --border: #e6e9ef;
  --border-strong: #d4d9e2;
  --ink: #17181d;
  --ink-2: #59637a;
  --ink-3: #8b94a6;
  --ink-4: #b3bcc9;

  /* -- brand 红黑体系 (参照 GitCode 仪表盘: logo 红 #DA203E + 墨黑主按钮/文字)
     v2: 由 v1 的 CANN 蓝改版而来, 界面 UI 不再使用品牌蓝 -- */
  --brand: #da203e;               /* GitCode 红: 主强调 */
  --brand-strong: #b11430;        /* 深红: 链接/hover/激活 */
  --brand-soft: #ef4560;          /* 亮红: 渐变提亮 */
  --brand-deep: #7f0f26;          /* 暗红 */
  --brand-weak: #fdeef0;          /* 浅红填充 */
  --brand-weak-2: #f3c6cf;        /* 浅红描边 */
  --brand-glow: rgba(218, 32, 62, 0.16);
  --on-brand: #ffffff;
  --ink-black: #141414;           /* GitCode 墨黑: 主按钮/深色区 */

  /* -- portal night accents (局部点缀, dark DNA) -- */
  --night: #0e0f12;
  --night-2: #14161b;
  --night-line: rgba(255, 255, 255, 0.09);
  --night-text: rgba(255, 255, 255, 0.62);
  --night-code: #dde1e8;

  /* -- status / language dots -- */
  --c-plusplus: #f34b7d;
  --c-python: #3572a5;
  --c-shell: #89e051;
  --c-markdown: #5d6b9e;
  --c-c: #555555;
  --c-assembly: #6e4a7e;
  --c-other: #9aa5b4;
  --success: #1a9e64;
  --warning: #d9822b;
  --danger: #e5484d;

  /* -- type -- */
  --font-display: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, Consolas, "Liberation Mono",
    Menlo, monospace;

  /* -- shape & shadow -- */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 18px -12px rgba(16, 24, 40, 0.14);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, 0.05), 0 18px 40px -24px rgba(16, 24, 40, 0.2);
  --shadow-brand: 0 10px 30px -14px rgba(218, 32, 62, 0.45);
  --container: 1200px;
  --topbar-h: 105px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(218, 32, 62, 0.18); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.container { width: min(var(--container), 100% - 48px); margin: 0 auto; }
section[id] { scroll-margin-top: calc(var(--topbar-h) + 8px); }

/* ============ topbar (GitCode 风格头部: 灰带两行) ============ */
.topbar {
  position: sticky; z-index: 80; top: 0;
  background: #f9f9fb;
  border-bottom: 1px solid #f1f1f8;
  --gt-ink: #252b3a;          /* GitCode 主文字色 */
  --gt-soft: #3b3e55;         /* GitCode 名称/标签色 */
  --gt-border: #e6e7ef;
}
.topbar.scrolled { box-shadow: none; }

/* 与 GitCode 一致: 全宽铺满, 左右 32px, 上 56px 工具栏 (控件高 32, 距顶 12) */
.gtoolbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 32px; gap: 16px;
}
.gleft { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gbrand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.gavatar {
  display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 4px; overflow: hidden;
}
.gavatar img { width: 100%; height: 100%; object-fit: cover; }
.gname {
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  color: var(--gt-soft); letter-spacing: 0; white-space: nowrap;
}
.gname small { color: var(--ink-3); font-size: 13px; font-weight: 500; margin-left: 8px; }
.gfollow {
  display: inline-flex; align-items: center; height: 28px;
  padding: 0 12px; margin-left: 8px;
  border: 1px solid var(--gt-border); border-radius: 4px;
  background: #fff; color: var(--gt-ink); font-size: 14px; line-height: 1;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.gfollow:hover { border-color: #c9ccd6; color: #111; }
.gfollow.on { color: #a05a00; background: #fff8ec; border-color: #efd9a4; }
.gfollow svg { width: 13px; height: 13px; }

/* 居中搜索 (GitCode 圆角搜索条) */
.gsearch {
  display: flex; align-items: center; gap: 8px;
  margin: 0 auto; flex: 0 0 420px; height: 32px;
  padding: 0 14px;
  border: 1px solid #e0e2ea; border-radius: 999px;
  background: #f1f1f5;
  color: #9c9db4;
  transition: border-color .15s ease, background .15s ease;
}
.gsearch:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(218,32,62,.1); }
.gsearch svg { width: 14px; height: 14px; flex: 0 0 auto; }
.gsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13.5px; }
.gsearch input::placeholder { color: #9c9db4; }
.gpill-tag {
  margin-left: 14px; flex: 0 0 auto; padding: 4px 13px;
  border: 1px solid #e0e2ea; border-radius: 999px;
  background: #f1f1f5; color: #9c9db4;
  font-size: 12.5px; white-space: nowrap;
}
.gsearch kbd {
  flex: 0 0 auto; padding: 1px 6px; border: 1px solid #dcdfe6; border-radius: 5px;
  background: #fff; color: #9aa0ad; font-size: 10px; font-family: inherit;
}

.gright { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 0 auto; }
.gbtn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; line-height: 1; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.gbtn:active { transform: translateY(1px); }
.gbtn-black { background: #000; color: #fff; }
.gbtn-black:hover { box-shadow: 0 6px 14px -6px rgba(0,0,0,.45); }
.gbtn-black img, .gbtn-black svg { filter: brightness(0) invert(1); width: 14px; height: 14px; }
.gbtn-line { background: #fff; border: 1px solid #dcdfe6; color: var(--gt-ink); }
.gbtn-line:hover { border-color: #c3c7d2; color: #000; }
.gbtn-line img, .gbtn-line svg { width: 14px; height: 14px; }

/* 第二行 tab 菜单 (GitCode g-header-body) */
.gtabs {
  display: flex; align-items: center; height: 49px;
  padding: 0 32px; gap: 0; overflow-x: auto; scrollbar-width: none;
}
.gtabs::-webkit-scrollbar { display: none; }
.gtabs a {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  height: 100%; padding: 0 16px;
  color: #4c5163; font-size: 14px; font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.gtabs a:hover { color: var(--gt-ink); }
.gtabs a.active { color: #17181d; font-weight: 650; border-bottom-color: var(--brand); }
.gtabs a .num {
  display: inline-block; padding: 0 5px; border-radius: 4px;
  background: #e3e3ee; color: var(--gt-soft);
  font-size: 12px; font-weight: 500; line-height: 17px;
}
.gtabs a .ext { color: var(--ink-4); font-size: 12px; }

/* 兼容旧类名 hook (main.js 用 .topbar-nav a 做 scrollspy) */
.topbar-nav { display: flex; align-items: center; gap: 2px; }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn:active { transform: translateY(1px); }
.btn .ext { opacity: 0.72; font-weight: 500; }
.btn-primary { color: var(--on-brand); background: linear-gradient(135deg, #c40f2e, var(--brand)); box-shadow: var(--shadow-brand); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -12px rgba(180, 20, 48, 0.6); }
.btn-secondary { color: var(--ink); background: var(--surface); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: #b9c2d2; background: var(--surface-hover); }
.btn-ghost { color: var(--ink-2); background: transparent; }
.btn-ghost:hover { color: var(--ink); background: var(--bg-inset); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 7px; }
.btn-star {
  color: var(--ink); background: var(--surface); border-color: var(--border-strong);
}
.btn-star.on { color: #b36b00; background: #fff8ec; border-color: #f0d9a8; }
.btn-star svg, .btn-primary svg, .btn-secondary svg { width: 14px; height: 14px; flex: 0 0 auto; }
.arrow-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--brand-strong); font-size: 13px; font-weight: 600;
}
.arrow-link:hover .ext { transform: translate(1px, -1px); }
.arrow-link .ext { transition: transform 0.16s ease; }

/* ============ hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100vh - var(--topbar-h));
  padding: 84px 0 72px;
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(218, 32, 62, 0.1), transparent 60%),
    radial-gradient(700px 340px at -5% 12%, rgba(239, 69, 96, 0.07), transparent 55%),
    linear-gradient(180deg, #fbfdff 0%, #ffffff 62%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 36, 51, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 36, 51, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 20%, transparent 78%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 60px; align-items: center;
  width: min(var(--container), 100% - 48px); margin: 0 auto;
  padding-bottom: 56px;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 18px; padding: 5px 12px;
  border: 1px solid var(--brand-weak-2); border-radius: 999px;
  background: var(--brand-weak);
  color: var(--brand-deep); font-size: 12px; font-weight: 650;
  letter-spacing: 0.06em;
}
.kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.hero h1 {
  max-width: 660px;
  font-size: clamp(40px, 4.6vw, 56px);
  font-weight: 640; line-height: 1.12; letter-spacing: -0.03em;
}
.hero h1 .grad {
  background: linear-gradient(92deg, #7f0f26 4%, #da203e 48%, #ef4560 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { max-width: 600px; margin: 22px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.85; }
.hero-lede b { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note {
  margin-top: 18px; color: var(--ink-3); font-size: 12px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.hero-note svg { width: 13px; height: 13px; }

/* hero art */
.hero-grid > *, .qnp > * { min-width: 0; }
.hero-art .code-term pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.hero-art { position: relative; min-height: 430px; display: flex; align-items: center; }
.orbit-scene {
  position: absolute; top: 6px; left: 2%; width: 96%; height: 430px;
  pointer-events: none;
}
.orbit-ring { position: absolute; border: 1.5px solid rgba(218, 32, 62, 0.16); border-radius: 50%; }
.orbit-ring.r1 { inset: 12% 6%; transform: rotate(12deg) scaleY(0.42); animation: spin 26s linear infinite; }
.orbit-ring.r2 { inset: 0 22%; border-style: dashed; transform: rotate(-24deg) scaleY(0.66); animation: spin 36s linear infinite reverse; }
.orbit-ring.r3 { inset: 26% 0; transform: rotate(40deg) scaleY(0.3); animation: spin 20s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit-core {
  position: absolute; top: 46%; left: 46%; width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 6px rgba(218, 32, 62, 0.12), 0 0 26px 8px rgba(218, 32, 62, 0.25);
}
.art-card {
  position: relative; z-index: 2; width: min(430px, 100%);
  margin: 0 auto;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.art-card-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.art-dots { display: flex; gap: 5px; }
.art-dots i { width: 9px; height: 9px; border-radius: 50%; background: #d7dce6; }
.art-dots i:nth-child(1) { background: #ff8f87; }
.art-dots i:nth-child(2) { background: #ffcf6b; }
.art-dots i:nth-child(3) { background: #7fd9a2; }
.art-card-tab { margin-left: 8px; font-size: 12px; color: var(--ink-3); }
.art-card-tab b { color: var(--ink-2); font-weight: 600; }
.art-card-body { padding: 16px; }
.term-title { font-size: 11.5px; color: var(--ink-3); margin-bottom: 9px; display:flex; align-items:center; gap:6px;}
.term-title svg{width:12px;height:12px}
.term-clients { margin: 0 0 12px; color: var(--ink-2); font-size: 11.5px; line-height: 1.8; }
.code-term {
  border-radius: 10px; background: var(--night);
  padding: 13px 15px; overflow-x: auto;
}
.code-term pre { margin: 0; font-family: var(--font-mono); font-size: 12px; line-height: 1.85; color: var(--night-text); white-space: pre; }
.code-term .p { color: var(--night-code); }
.code-term .g { color: #7be3a1; }
.code-term .d { color: #8b95a6; }
.art-float {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; box-shadow: var(--shadow-sm);
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  animation: floaty 5.5s ease-in-out infinite;
}
.art-float small { color: var(--ink-3); font-weight: 500; }
.art-float .ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; color:#fff; font-weight:700; font-family:var(--font-display);}
.f1 { top: 12%; right: -2%; }
.f2 { bottom: 24%; left: -4%; animation-delay: -2.4s; }
.f3 { bottom: 6%; left: -8%; animation-delay: -4s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* stats band */
.stats-band { position: relative; border-top: 1px solid var(--border); background: #fff; }
.stats-inner {
  display: grid; grid-template-columns: repeat(6, 1fr);
  width: min(var(--container), 100% - 48px); margin: 0 auto;
}
.stat {
  padding: 26px 8px 30px; text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: 0; }
.stat-value {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label { margin-top: 5px; color: var(--ink-3); font-size: 12.5px; }

/* ============ section scaffolding ============ */
.section { padding: 96px 0; }
.section.soft { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  margin-bottom: 14px; color: var(--brand-strong);
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.eyebrow .spark { opacity: 0.55; }
.section-head h2 { font-size: clamp(27px, 3vw, 34px); font-weight: 640; letter-spacing: -0.025em; }
.section-head .lede { margin-top: 14px; color: var(--ink-2); font-size: 15px; line-height: 1.8; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

/* ============ quick start ============ */
.qs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.qs-card {
  position: relative; overflow: hidden;
  padding: 22px 20px 20px;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.qs-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-weak-2); }
.qs-card .ic {
  width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 16px;
  border-radius: 10px; color: #fff; font-family: var(--font-display);
  font-weight: 700; font-size: 17px;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  box-shadow: 0 8px 18px -8px rgba(218, 32, 62, 0.65);
}
.qs-card h3 { font-size: 17px; font-weight: 620; }
.qs-card p { margin-top: 7px; color: var(--ink-2); font-size: 13px; line-height: 1.7; min-height: 66px; }
.qs-more { margin-top: 13px; }
.qs-card .arrow-ghost {
  position: absolute; right: 18px; top: 18px; color: var(--ink-4);
  transition: transform .2s ease, color .2s ease;
}
.qs-card:hover .arrow-ghost { color: var(--brand); transform: translate(2px, -2px); }

.recipes-panel {
  margin-top: 16px; padding: 6px 22px;
  border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
  background: var(--surface);
}
.recipe-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.recipe-line:last-child { border-bottom: 0; }
.recipe-line .tag { flex: 0 0 auto; font-size: 11px; font-weight: 650; color: var(--ink-3); }
.recipe-line a { color: var(--ink); font-size: 13.5px; }
.recipe-line a:hover { color: var(--brand-strong); }
.recipe-line a .ext { opacity: 0; transition: opacity .16s ease, transform .16s ease; display:inline-block;}
.recipe-line a:hover .ext { opacity: .8; transform: translate(1px,-1px); }
.recipe-line .when { margin-left: auto; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }

/* ============ plugin ecosystem ============ */
.plug-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plug-card {
  position: relative; display: block; overflow: hidden;
  padding: 30px 28px 24px; min-height: 330px;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  background: var(--surface);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.plug-card:hover { transform: translateY(-4px); border-color: var(--brand-weak-2); box-shadow: var(--shadow-md); }
.plug-card.featured {
  background:
    radial-gradient(600px 240px at 108% -18%, rgba(218, 32, 62, 0.1), transparent 55%),
    linear-gradient(180deg, #ffffff, #fbfdff);
}
.card-index { position: absolute; top: 24px; right: 26px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-4); }
.plug-card .icon-tile {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 22px;
  border-radius: 13px; font-size: 24px;
}
.tile-red { color: #c40f2e; background: var(--brand-weak); box-shadow: inset 0 0 0 1px var(--brand-weak-2); }
.tile-violet { color: #6b3fd8; background: #f2edff; box-shadow: inset 0 0 0 1px #e2d8ff; }
.tile-teal { color: #0e8f74; background: #e7f8f3; box-shadow: inset 0 0 0 1px #c6eee2; }
.plug-domain { color: var(--ink-3); font-size: 12px; font-weight: 650; letter-spacing: 0.05em; }
.plug-card h3 { margin-top: 6px; font-size: 20px; font-weight: 640; }
.plug-card .lede { margin-top: 12px; color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }
.plug-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2); font-size: 11.5px; font-weight: 550;
}
.chip.hot { color: var(--brand-deep); border-color: var(--brand-weak-2); background: var(--brand-weak); }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.plug-go { color: var(--ink-4); transition: transform .2s ease, color .2s ease; }
.plug-card:hover .plug-go { color: var(--brand); transform: translate(3px, -3px); }

/* ============ growth (CANNLab etc.) ============ */
.grow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grow-card {
  padding: 24px 22px;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.grow-card:hover { transform: translateY(-3px); border-color: var(--brand-weak-2); box-shadow: var(--shadow-md); }
.grow-logo {
  display: inline-flex; align-items: center; height: 34px; margin-bottom: 18px;
  font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em;
}
.grow-logo small { margin-left: 7px; color: var(--ink-4); font-weight: 600; font-size: 11px; }
.grow-logo .box {
  display: grid; place-items: center; width: 30px; height: 30px; margin-right: 8px;
  border-radius: 8px; color: #fff; font-size: 13px;
}
.grow-card p { color: var(--ink-2); font-size: 13px; line-height: 1.8; }
.grow-card .arrow-link { margin-top: 16px; }

/* ============ architecture ============ */
.arch {
  overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.arch-lane {
  position: relative;
  display: grid; grid-template-columns: 168px 1fr; gap: 20px;
  padding: 20px 24px;
}
.arch-lane + .arch-lane { border-top: 1px solid var(--border); }
.lane-name h4 { font-size: 15px; font-weight: 650; color: var(--ink); display:flex; gap:8px; align-items:center;}
.lane-name h4 .n {
  font-family: var(--font-display); font-weight: 700; font-size: 11px; color: var(--brand);
}
.lane-name p { margin-top: 4px; color: var(--ink-3); font-size: 11.5px; line-height: 1.6; }
.lane-groups { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.lane-group { display: flex; flex-direction: column; gap: 7px; min-width: 130px; }
.lane-group .g-label { font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.repo-chip {
  display: inline-flex; align-items: center; gap: 7px;
  width: fit-content; max-width: 100%;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface);
  color: var(--ink); font-size: 12px; font-family: var(--font-mono);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.repo-chip:hover { border-color: var(--brand); background: var(--brand-weak); color: var(--brand-deep); transform: translateY(-1px); }
.repo-chip .ltr {
  display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 18px;
  border-radius: 5px; color: #fff; font-family: var(--font-display);
  font-size: 10px; font-weight: 700; background: var(--ink-4);
}
.repo-chip:hover .ltr { background: var(--brand); }
.lane-chip-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.arch-base {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: linear-gradient(135deg, #0f0f11, #26282e);
  color: #f2f3f6; font-size: 13.5px; font-weight: 600; letter-spacing: .02em;
}
.arch-base .chip-dark { padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color:#c9cdd5; font-size: 11px; font-family: var(--font-body); font-weight: 500; }

/* ============ repo showcase ============ */
.repo-panel { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-sm); }
.repo-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--bg-subtle);
}
.repo-toolbar .title { font-weight: 650; font-size: 15px; }
.repo-tabs { display: flex; gap: 6px; }
.seg-btn {
  padding: 6px 13px; border: 1px solid transparent; border-radius: 7px;
  color: var(--ink-2); font-size: 12.5px; font-weight: 550; background: transparent;
  transition: all .15s ease;
}
.seg-btn:hover { color: var(--ink); background: #fff; box-shadow: var(--shadow-xs); border-color: var(--border); }
.seg-btn.on { color: var(--brand-strong); background: #fff; border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.search-box {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; min-width: 250px; max-width: 300px; height: 34px;
  padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: #fff;
}
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(218,32,62,.14); }
.search-box svg { width: 14px; height: 14px; color: var(--ink-3); flex: 0 0 auto; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-box input::placeholder { color: var(--ink-4); }
.repo-list { padding: 4px 20px 8px; }
.repo-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto auto auto auto;
  gap: 18px; align-items: center;
  padding: 15px 6px;
  border-bottom: 1px solid var(--border);
}
.repo-row:last-child { border-bottom: 0; }
.repo-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.repo-avatar {
  display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 11px;
  background: linear-gradient(145deg, #f3f4f6, #e6e8ec);
  color: var(--ink); font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.07);
}
.repo-name { font-weight: 650; font-size: 14.5px; color: var(--ink); }
.repo-row:hover .repo-name { color: var(--brand-strong); }
.repo-owner { color: var(--ink-3); font-weight: 450; }
.repo-desc { margin-top: 3px; color: var(--ink-3); font-size: 12.5px; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.repo-lang { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.lang-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.repo-stat { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.repo-stat svg { width: 13px; height: 13px; color: var(--ink-4); }
.repo-updated { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.repo-empty { padding: 40px; text-align: center; color: var(--ink-3); font-size: 13px; display: none; }

/* ============ governance / community ============ */
.gov-wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 22px; }
.gov-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gov-card {
  padding: 24px 22px 20px;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.gov-card:hover { transform: translateY(-3px); border-color: var(--brand-weak-2); box-shadow: var(--shadow-md); }
.gov-badge {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  margin-bottom: 14px; border-radius: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.gov-card h3 { font-size: 15.5px; font-weight: 650; }
.gov-card .en { margin-top: 2px; color: var(--ink-3); font-size: 11px; letter-spacing: .02em; }
.gov-card p { margin-top: 10px; color: var(--ink-2); font-size: 12.5px; line-height: 1.75; }
.gov-charter { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 16px 18px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); }
.gov-charter a { font-size: 13px; font-weight: 600; color: var(--ink); }
.gov-charter a:hover { color: var(--brand-strong); }
.contribute { display: flex; gap: 12px; margin-top: 14px; }
.contribute .c-card {
  flex: 1; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface);
}
.contribute .c-card b { font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.contribute .c-card p { margin-top: 6px; color: var(--ink-3); font-size: 12px; line-height: 1.7; }
.c-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ann-panel { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.ann-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.ann-head b { font-size: 14.5px; }
.ann-list { padding: 4px 18px 6px; }
.ann-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ann-item:last-child { border-bottom: 0; }
.ann-date { flex: 0 0 62px; color: var(--ink-3); font-size: 12px; padding-top: 2px; }
.ann-item a { font-size: 13.5px; color: var(--ink); line-height: 1.55; }
.ann-item a:hover { color: var(--brand-strong); }
.ann-pin { margin-right: 6px; }

/* promo tiles */
.promo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.promo-card {
  position: relative; display: block; overflow: hidden;
  padding: 20px; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease;
}
.promo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.promo-card .em {
  width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 13px;
  border-radius: 9px; font-size: 17px;
}
.promo-card h4 { font-size: 14.5px; font-weight: 650; }
.promo-card p { margin-top: 6px; color: var(--ink-2); font-size: 12.5px; line-height: 1.65; }
.promo-card .foot { margin-top: 12px; font-size: 12px; font-weight: 600; }
.e-slate { background:#f0f1f4; color:#3d4452; } .e-amber { background:#fff3e2; color:#a05a00; }
.e-violet { background: #f1ecff; color:#5a34c4; } .e-teal { background: #e4f8f1; color:#0a7d61; }
.e-red { background: #ffecee; color:#c22a3e; } 

/* links strip */
.linkstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.linkchip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 13px 7px 9px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface);
  color: var(--ink); font-size: 12.5px; font-weight: 550;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.linkchip img { width: 18px; height: 18px; object-fit: contain; }
.linkchip:hover { border-color: var(--brand-weak-2); transform: translateY(-1px); box-shadow: var(--shadow-xs); color: var(--brand-deep); }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.contact-row a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border);
  color: var(--ink-2); font-size: 12.5px;
  transition: all .15s ease;
}
.contact-row a:hover { color: var(--ink); border-color: var(--border-strong); background: var(--surface-hover); }
.contact-row img { width: 15px; height: 15px; object-fit: contain; }

/* ============ CTA band ============ */
.cta-band {
  position: relative; overflow: hidden;
  padding: 54px 56px; border-radius: var(--r-xl);
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(255,255,255,.16), transparent 60%),
    linear-gradient(120deg, #141414 0%, #da203e 62%, #ef4560 100%);
  color: #fff;
  box-shadow: 0 30px 70px -30px rgba(218, 32, 62, 0.55);
}
.cta-band::after { content:""; position:absolute; inset:0; background-image: radial-gradient(rgba(255,255,255,.25) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent,#000); opacity:.5; pointer-events:none;}
.cta-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta-inner h2 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 640; letter-spacing: -0.02em; }
.cta-inner p { margin-top: 9px; color: rgba(255,255,255,.78); font-size: 14px; max-width: 560px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-white { color: #141414; background: #fff; }
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(0,0,0,.35); }
.btn-glass { color: #fff; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255,255,255,.16); }

/* ============ footer ============ */
.footer { border-top: 1px solid var(--border); background: var(--bg-subtle); }
.footer-main {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 44px;
  padding: 60px 0 40px;
}
.footer h5 { font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: .04em; margin-bottom: 15px; }
.footer .col a { display: block; padding: 5px 0; color: var(--ink-2); font-size: 13px; }
.footer .col a:hover { color: var(--brand-strong); }
.foot-brand p { margin-top: 12px; max-width: 300px; color: var(--ink-3); font-size: 12.5px; line-height: 1.8; }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-bottom small { color: var(--ink-3); font-size: 12px; }
.socials { display: flex; gap: 8px; }
.socials a { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.socials a:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.socials img { width: 15px; height: 15px; }

/* ============ reveal ============ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.revealed { opacity: 1; transform: none; }

/* ============ responsive ============ */
@media (max-width: 1080px) {
  .qs-grid, .grow-grid, .promo-grid { grid-template-columns: repeat(2, 1fr); }
  .gov-wrap { grid-template-columns: 1fr; }
  .lane-chip-groups { grid-template-columns: 1fr 1fr; }
  .gsearch { flex-basis: 240px; }
  .gtabs a { padding: 0 11px; }
  .gbtn { padding: 0 12px; }
}
@media (max-width: 860px) {
  .gsearch { display: none; }
  .gname small { display: none; }
  .gfollow { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; }
  .hero-art { min-height: 360px; }
  .stats-inner { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
  .plug-grid { grid-template-columns: 1fr; }
  .arch-lane { grid-template-columns: 1fr; }
  .repo-row { grid-template-columns: minmax(0,1fr) auto auto auto; row-gap: 8px; }
  .repo-desc { -webkit-line-clamp: 1; }
  .repo-updated { display: none; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 36px 28px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .hero-art .art-float { display: none; }
  .doc-bread { flex-wrap: wrap; }
  .section { padding: 72px 0; }
  .qs-grid, .grow-grid, .promo-grid, .lane-chip-groups, .gov-cards { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { border-bottom: 1px solid var(--border); }
  .gbtn-black { display: none; }
  .gtoolbar { gap: 8px; }
  .search-box { min-width: 100%; margin-left: 0; }
  .repo-toolbar { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ 快速体验 · CANNBot 一条 npx ============ */
.qnp { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 22px; margin-top: 38px; align-items: start; }
.qnp-side h3 { font-size: 21px; font-weight: 660; letter-spacing: -0.02em; }
.qnp-side > p { margin-top: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.85; }
.qnp-steps { display: grid; gap: 14px; margin-top: 20px; }
.qnp-steps li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 13.5px; line-height: 1.75; }
.qnp-steps .n { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--brand-weak); color: var(--brand-strong); font-family: var(--font-display); font-weight: 700; font-size: 11px; box-shadow: inset 0 0 0 1px var(--brand-weak-2); }
.qnp-side .arrow-link { margin-top: 20px; }

.qnp-console { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.qnp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.qnp-top b { font-size: 13px; font-weight: 650; }
.qnp-body { padding: 16px; }
.qnp-label { margin: 4px 0 8px; color: var(--ink-3); font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.qnp-label + .qnp-chips { margin-bottom: 14px; }
.qnp-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.qnp-chip {
  padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: #fff; color: var(--ink-2);
  font-size: 12.5px; font-weight: 550;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.qnp-chip:hover { color: var(--ink); border-color: #b9c2d2; }
.qnp-chip.on { color: #fff; background: #141414; border-color: #141414; }
.qnp-code { position: relative; border-radius: 12px; background: var(--night); overflow: hidden; }
.qnp-code .cbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.07); }
.qnp-code .cbar .ct { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.48); font-size: 11px; }
.qnp-code .cbar .dots { display: flex; gap: 5px; }
.qnp-code .cbar .dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.16); }
.qnp-code .cbar .dots i:nth-child(1) { background: #ff6f66; } .qnp-code .cbar .dots i:nth-child(2) { background: #ffc354; } .qnp-code .cbar .dots i:nth-child(3) { background: #63d68a; }
.qnp-code .copy-btn {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 7px;
  color: rgba(255,255,255,.72); background: rgba(255,255,255,.07); font-size: 12px;
  transition: color .15s ease, background .15s ease;
}
.qnp-code .copy-btn:hover { color: #fff; background: rgba(255,255,255,.14); }
.qnp-code .copy-btn.copied { color: #9ef0bd; background: rgba(122,227,158,.12); }
.qnp-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.qnp-code code { color: #e7e9ee; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.85; white-space: pre; }
.qnp-note { margin-top: 12px; color: var(--ink-3); font-size: 12px; line-height: 1.7; }
.qnp-note code { font-family: var(--font-mono); color: var(--ink-2); background: var(--bg-inset); padding: 1px 5px; border-radius: 5px; }

@media (max-width: 980px) {
  .qnp { grid-template-columns: 1fr; }
}

/* ============ 项目展示 · CANNBot 相关仓库 ============ */
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.proj-card {
  position: relative; display: block; overflow: hidden;
  padding: 28px 26px 22px;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.proj-card:hover { transform: translateY(-4px); border-color: var(--brand-weak-2); box-shadow: var(--shadow-md); }
.proj-top { display: flex; align-items: center; gap: 13px; }
.proj-name { font-size: 17px; font-weight: 660; letter-spacing: -0.01em; color: var(--ink); }
.proj-top .repo-avatar { width: 40px; height: 40px; flex-basis: 40px; font-size: 15px; }
.proj-tag { margin-left: auto; }
.proj-desc { margin-top: 16px; color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }
.proj-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.proj-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.proj-go { color: var(--ink-4); transition: transform .2s ease, color .2s ease; font-size: 18px; }
.proj-card:hover .proj-go { color: var(--brand); transform: translate(2px, -2px); }
@media (max-width: 860px) {
  .proj-grid { grid-template-columns: 1fr; }
}

/* ============ 首页站内搜索下拉 ============ */
.search-wrap { position: relative; margin: 0 auto; }
.search-wrap .gsearch { margin: 0; }
.sd {
  position: absolute; z-index: 90; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  width: min(560px, 92vw);
  max-height: 340px; overflow-y: auto;
  padding: 6px;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: 0 18px 44px -18px rgba(15,23,42,.28);
  display: none;
}
.sd.open { display: block; }
.sd .sd-hint { padding: 6px 10px 8px; color: var(--ink-3); font-size: 11.5px; }
.sd a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
}
.sd a:hover, .sd a.on { background: var(--brand-weak); }
.sd .ty {
  flex: 0 0 auto; padding: 2px 7px; border-radius: 5px;
  background: var(--bg-inset); color: var(--ink-2);
  font-size: 10.5px; font-weight: 650; letter-spacing: .03em;
}
.sd a .t { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd a .hint { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sd a .go { margin-left: auto; color: var(--ink-4); flex: 0 0 auto; }
.sd a:hover .go, .sd a.on .go { color: var(--brand); }
.sd .sd-empty { padding: 14px 10px; color: var(--ink-3); font-size: 12.5px; text-align: center; }
@media (max-width: 860px) {
  .search-wrap { display: none; }
}

/* Homepage workflow emblems: chip, validation shield, model migration. */
.plug-card .workflow-icon {
  width: 72px; height: 72px; border-radius: 20px;
  color: var(--ink); background: linear-gradient(145deg, #fff 15%, #f8f0f2);
  border: 1px solid #eedde1;
  box-shadow: inset 0 1px 0 #fff, 0 5px 12px rgba(82, 25, 36, .05);
}
.workflow-icon svg { display: block; width: 56px; height: 56px; }

/* Homepage installation command copy control. */
.hero-code { position: relative; padding-top: 42px; }
.hero-code code { font: inherit; }
.hero-copy { position: absolute; top: 7px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; padding: 6px; color: #bbc3d0; background: transparent; border: 0; border-radius: 6px; cursor: pointer; }
.hero-copy svg { width: 18px; height: 18px; }
.hero-copy:hover { color: #fff; background: rgba(255,255,255,.12); }
.hero-copy:focus-visible { outline: 2px solid #9ef0bd; outline-offset: 1px; }
.hero-copy-status { position: absolute; top: 12px; right: 45px; color: #9ef0bd; font-size: 11px; }

/* Attached terminal tabs, inspired by the Harness installation panel. */
.art-card.install-terminal {
  width: min(470px, 100%); overflow: visible; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.hero-plugin-tabs { display: flex; align-items: end; gap: 4px; padding: 0 10px; }
.hero-plugin-tabs button {
  position: relative; padding: 11px 14px; border: 1px solid transparent; border-bottom: 0;
  border-radius: 8px 8px 0 0; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 12px; line-height: 1.5; font-weight: 500; white-space: nowrap;
  cursor: pointer; transition: background .18s, color .18s;
}
.hero-plugin-tabs button:hover { color: var(--ink); background: rgba(23,24,29,.045); }
.hero-plugin-tabs button[aria-selected="true"] { color: var(--brand-strong); background: var(--surface); border-color: var(--border); }
.terminal-surface {
  position: relative; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); box-shadow: 0 16px 36px -18px rgba(20,20,28,.10); overflow: hidden;
}
.hero-plugin-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--surface); z-index: 3; }
.terminal-toolbar { position: relative; display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.terminal-toolbar .art-dots { gap: 7px; }
.terminal-toolbar .art-dots i { width: 10px; height: 10px; }
.terminal-toolbar .hero-copy { position: static; width: auto; height: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 0 5px 8px; font: inherit; font-size: 11px; color: var(--ink-3); }
.terminal-toolbar .hero-copy svg { width: 14px; height: 14px; }
.terminal-toolbar .hero-copy:hover { color: var(--brand-strong); background: transparent; }
.terminal-toolbar .hero-copy-status { top: 14px; right: 84px; color: var(--brand-strong); }
.install-terminal .hero-code { background: var(--night); border-radius: 8px; margin: 16px; padding: 22px 18px; min-height: 112px; display: flex; align-items: center; }
.install-terminal .hero-code pre { font-size: 12px; line-height: 1.9; color: #e4e4eb; }
.install-terminal .hero-code .p { color: #ee7389; user-select: none; }
.hero-clients { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 11px; padding: 0 4px; margin-top: 17px; color: var(--ink-3); font-size: 11px; }
.hero-clients > span { margin-right: 1px; }
.hero-clients button { position: relative; border: 0; border-radius: 0; padding: 5px 0; background: transparent; color: var(--ink-3); font: inherit; cursor: pointer; }
.hero-clients button:hover { color: var(--ink); }
.hero-clients button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.hero-clients button[aria-pressed="true"]::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; border-radius: 2px; background: var(--brand); }
.hero-plugin-tabs button:focus-visible, .hero-clients button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 480px) {
  .hero-plugin-tabs { gap: 0; padding: 0 5px; }
  .hero-plugin-tabs button { padding: 10px 9px; font-size: 11px; }
  .install-terminal .hero-code { padding: 22px 17px; min-height: 133px; }
  .hero-clients { gap: 2px 9px; font-size: 10px; }
}

.terminal-toolbar .hero-copy:focus-visible { outline-color: var(--brand); }
