/* ============================================================
   OpenClawAgent — 内容站设计系统
   浅色主调 + 龙虾橙 accent，内容优先，预留 AdSense 广告位
   ============================================================ */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #1a1a2e;
  --ink-soft: #4a4a5e;
  --ink-faint: #6b6b80;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #e8f0fe;
  --border: #e8e6e0;
  --teal: #0f6e56;
  --teal-soft: #e1f5ee;
  --code-bg: #f4f2ec;
  --radius: 12px;
  --maxw: 1120px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
}
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink-soft); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(1000px 400px at 80% -10%, rgba(37, 99, 235, 0.10), transparent),
    var(--surface);
  border-bottom: 1px solid var(--border);
}
.hero .container { max-width: 880px; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--accent); }
.hero .lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 10px;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 区块 ---------- */
.section { padding: 56px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 26px;
}
.section-head h2 { font-size: 24px; letter-spacing: -0.01em; }
.section-head .more { font-size: 14px; font-weight: 600; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .tag {
  align-self: flex-start;
  font-size: 12px; font-weight: 600;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 3px 10px; border-radius: 999px;
}
.card h3 { font-size: 17px; line-height: 1.35; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card p { font-size: 14px; color: var(--ink-soft); flex: 1; }
.card .meta { font-size: 12.5px; color: var(--ink-faint); }

/* ---------- 广告位占位 ---------- */
.ad-slot {
  margin: 40px auto;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* ---------- 文章排版 ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 48px 24px 64px; }
.article-header { margin-bottom: 32px; }
.article-header .tag { margin-bottom: 14px; }
.article-header h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.article-header .byline { font-size: 14px; color: var(--ink-faint); }
.article-body h2 {
  font-size: 24px; margin: 40px 0 16px;
  padding-top: 8px; letter-spacing: -0.01em;
}
.article-body h3 { font-size: 18px; margin: 28px 0 12px; }
.article-body p { margin-bottom: 16px; font-size: 16.5px; color: var(--ink); }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 8px; font-size: 16.5px; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 20px;
  border-radius: 0 10px 10px 0;
  margin: 24px 0;
  color: var(--ink-soft);
  font-size: 15.5px;
}
.article-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 5px;
}
.article-body pre {
  background: #1a1a2e;
  color: #e8e8f0;
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.55;
}
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body table {
  width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px;
}
.article-body th, .article-body td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.article-body th { background: var(--code-bg); font-weight: 600; }
.callout {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0;
  background: var(--surface);
}
.callout.warn { border-color: #f0c36d; background: #fdf6e6; }
.callout .callout-title { font-weight: 600; margin-bottom: 6px; }

/* ---------- TOC ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 28px;
}
.toc .toc-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; }
.toc li { margin: 6px 0; font-size: 14.5px; }
.toc a { color: var(--ink-soft); }
.toc a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  background: #171726;
  color: #c7c7d6;
  padding: 48px 0 32px;
  margin-top: 40px;
}
.site-footer a { color: #e8e8f0; }
.site-footer .foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
}
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin: 8px 0; font-size: 14px; }
.foot-bottom {
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12.5px; color: #8a8a9c;
}

/* ---------- 面包屑 / 分类页 ---------- */
.breadcrumb { font-size: 13.5px; color: var(--ink-faint); margin-bottom: 18px; }
.breadcrumb a { color: var(--ink-faint); }
.page-title { font-size: 32px; letter-spacing: -0.02em; margin-bottom: 8px; }
.page-sub { color: var(--ink-soft); margin-bottom: 36px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .site-footer .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3 { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .nav-links a.hide-mobile { display: none; }
}
