/* osbt.space — 黑白极简 · 药丸风格 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #111111;
  --paper: #ffffff;
  --muted: #6b6b6b;
  --line: #e6e6e3;
  --soft: #f4f4f1;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Noto Sans SC", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

a { color: inherit; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 14px;
  background: var(--paper);
  text-decoration: none;
  white-space: nowrap;
}

/* 导航 */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 0;
  flex-wrap: wrap;
}
.logo {
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 18px;
  background: var(--ink);
  color: var(--paper);
}
.logo:hover { background: var(--paper); color: var(--ink); }
.navlinks { padding: 4px; gap: 4px; }
.navlinks a {
  border-radius: 999px;
  padding: 4px 14px;
  text-decoration: none;
  font-size: 14px;
}
.navlinks a:hover { background: var(--soft); }

/* Hero */
.hero { text-align: center; padding: 96px 0 64px; }
.badge { color: var(--muted); border-color: var(--line); background: var(--soft); }
.hero h1 {
  font-size: clamp(44px, 8vw, 76px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.15;
  margin: 28px 0 20px;
}
.sub {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 16px;
}
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { padding: 12px 34px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--paper); color: var(--ink); }
.btn.ghost:hover { background: var(--soft); }
.stats {
  margin-top: 40px;
  border-color: var(--line);
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px 20px;
}
.stats i { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

/* 区块 */
.section { padding: 56px 0 8px; }
.section h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.hint { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

/* 下载 tabs */
.tabs { padding: 4px; gap: 4px; border-color: var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
}
.tabs button.on { background: var(--ink); color: var(--paper); }

.assets { display: grid; gap: 10px; }
.asset {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px 8px 20px;
  flex-wrap: wrap;
}
.asset .name { font-weight: 600; font-size: 14px; word-break: break-all; }
.asset .meta { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.asset .fill { flex: 1; }
.asset .dl {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 6px 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.asset .dl:hover { background: var(--ink); color: var(--paper); }
/* 次级链接（官方源兜底）：低调描边 */
.asset .alt {
  margin-right: 10px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.asset .alt:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* 渠道 */
/* 渠道：min(380px, 100%) 保证任何视口下都不会横向溢出 */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 14px; }
.chan {
  border: 1.5px solid var(--line);
  border-radius: 28px;
  padding: 18px 20px;
}
.chan h4 { font-size: 14px; margin-bottom: 8px; }
.chan .code { margin: 0; }
.chan p { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* 代码（药丸样式，可复制） */
.code {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 10px 46px 10px 22px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  overflow-x: auto;
  white-space: pre;
  margin: 10px 0;
  cursor: copy;
}
.code::after {
  content: "复制";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--muted);
  background: var(--paper);
  border-radius: 999px;
  padding: 2px 10px;
}
.code.multi { border-radius: 20px; white-space: pre-wrap; }
.code.ok::after { content: "已复制"; color: var(--ink); background: var(--soft); }
.docs .code.multi { text-align: left; }

/* 文档 */
.docs article {
  border: 1.5px solid var(--line);
  border-radius: 28px;
  padding: 22px 26px;
  margin-bottom: 16px;
}
.docs h3 { font-size: 16px; margin-bottom: 10px; }
.docs p, .docs li { color: var(--muted); font-size: 14px; }
.docs ul { padding-left: 20px; }
.docs b { color: var(--ink); }
.docs code {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 12.5px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* 页脚 */
.footer {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1.5px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

/* 相关站点：与导航药丸同款交互 */
.related { padding: 4px; gap: 2px; }
.related a {
  border-radius: 999px;
  padding: 4px 12px;
  text-decoration: none;
  transition: background 0.15s;
}
.related a:hover { background: var(--soft); color: var(--ink); }
.related i { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

/* ── 移动端适配 ── */
@media (max-width: 640px) {
  body { padding: 0 16px 64px; }
  .nav { padding-top: 18px; gap: 8px; justify-content: center; }
  .navlinks { order: 3; width: 100%; justify-content: center; }
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: clamp(34px, 11vw, 44px); margin: 20px 0 14px; }
  .hero .sub { font-size: 15px; }
  .badge { white-space: normal; text-align: center; line-height: 1.9; font-size: 12px; }
  .stats { white-space: normal; padding: 8px 14px; font-size: 12px; }
  .btn { padding: 11px 28px; }
  .section { padding: 44px 0 8px; }
  .section h2 { font-size: 22px; }
  .tabs { justify-content: center; }
  .tabs button { padding: 7px 13px; font-size: 13px; }
  /* 长文件名换行时圆角胶囊改用大圆角矩形 */
  .asset { border-radius: 24px; gap: 10px; padding: 10px 12px 10px 16px; }
  .asset .name { font-size: 13px; flex: 1 1 100%; }
  .asset .alt { margin-right: 4px; }
  .asset .dl { flex: 1; text-align: center; padding: 8px 16px; }
  .grid { grid-template-columns: 1fr; }
  .code { font-size: 11.5px; padding: 9px 42px 9px 16px; }
  .docs article { border-radius: 20px; padding: 18px 18px; }
  .mem { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: center; text-align: center; }
}

/* 超窄屏（≤360px）：渠道名与文档列表再紧凑 */
@media (max-width: 360px) {
  .navlinks a { padding: 4px 9px; font-size: 13px; }
  .hero h1 { font-size: 32px; }
}

/* ── 纪念区：黑白卡片，悬停描边加深 ── */
.mem {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
}
.mem-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.mem-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.mem-card h4 { margin: 0 0 6px; font-size: 14px; }
.mem-card p { margin: 0 0 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.mem-card i { font-style: normal; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; display: block; }

/* ── 语言切换（黑白 pill，与导航一致） ── */
button.pill.lang {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s;
}
button.pill.lang:hover { border-color: var(--ink); }

/* ── 复制按钮文案跟随语言 ── */
body.en .code::after { content: "Copy"; }
body.en .code.ok::after { content: "Copied"; }
