/* ==========================================================================
   hidavid.cn — 全站设计系统与组件样式
   纯 CSS、零依赖：不引用任何外部资源
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌
   -------------------------------------------------------------------------- */
:root {
  /* 背景与表面：深色高级风 */
  --bg: #07090f;
  --bg-soft: #0b0f18;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* 文字：正文对比度满足 WCAG AA */
  --text: #eef2f8;
  --text-muted: #a8b3c7;
  --text-dim: #78839a;

  /* 强调色 */
  --accent: #4f8cff;
  --accent-2: #8b5cf6;
  --accent-3: #22d3ee;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* 间距刻度 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 72px;
  --space-11: 96px;
  --space-12: 128px;

  /* 布局 */
  --maxw: 1180px;
  --header-h: 68px;

  /* 阴影与光晕 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(79, 140, 255, 0.28), 0 18px 60px rgba(79, 140, 255, 0.18);

  /* 字体 */
  --font-sans: "Inter", "SF Pro SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* 卡片局部强调色，可被 .tool-card--* 修饰类覆盖 */
  --card-accent: var(--accent);
}

/* --------------------------------------------------------------------------
   2. 基础重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  -webkit-text-size-adjust: 100%;
  /* 放在 html 上：避免 body 变成滚动容器，从而破坏 scroll-behavior / scroll-padding-top */
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 渐变网格 + 柔和光晕背景：纯 CSS 实现 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(79, 140, 255, 0.22), transparent 62%),
    radial-gradient(760px 460px at 88% 4%, rgba(139, 92, 246, 0.2), transparent 60%),
    radial-gradient(680px 520px at 50% 108%, rgba(34, 211, 238, 0.13), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 52%, var(--bg) 100%);
}

/* 网格线纹理 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 20%, transparent 78%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

a:hover {
  color: var(--accent-3);
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-4);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  margin: 0 0 var(--space-4);
}

ul,
ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.25em;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

/* 焦点可见性 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* 滚动条美化 */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
  background-clip: content-box;
}

/* --------------------------------------------------------------------------
   3. 布局容器与区块
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--space-11);
}

.section__head {
  max-width: 720px;
  margin-bottom: var(--space-9);
}

.section__eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--accent-3);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section__title {
  margin-bottom: var(--space-4);
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  background: linear-gradient(120deg, #ffffff 8%, var(--text-muted) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   4. 跳转链接（无障碍）
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 999;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   5. 头部导航
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 15, 0.72);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.nav {
  position: relative;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav__brand:hover {
  color: var(--text);
}

.nav__brand small {
  margin-left: var(--space-2);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav__brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px rgba(79, 140, 255, 0.35);
  color: #fff;
  flex: 0 0 auto;
}

.nav__brand-mark svg {
  width: 18px;
  height: 18px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav__link:hover {
  background: var(--surface);
  color: var(--text);
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav__toggle:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.nav__toggle svg {
  width: 20px;
  height: 20px;
}

.nav__lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
}

.nav__lang-link {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav__lang-link:hover {
  color: var(--text);
}

.nav__lang-link.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

/* --------------------------------------------------------------------------
   6. 首屏 Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-12) var(--space-11);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--accent-3);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.hero__title {
  margin-bottom: var(--space-6);
  font-size: clamp(2.125rem, 6vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  background: linear-gradient(115deg, #ffffff 12%, #c3cfe6 58%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  max-width: 640px;
  margin-bottom: var(--space-8);
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.1875rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero__stat {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero__stat-value {
  display: block;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent-3), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__stat-label {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* 装饰性光晕 */
.hero__glow {
  position: absolute;
  z-index: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}

.hero__glow:nth-of-type(1) {
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.55), transparent 68%);
}

.hero__glow:nth-of-type(2) {
  bottom: -260px;
  left: -140px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45), transparent 68%);
}

/* --------------------------------------------------------------------------
   7. 按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  color: var(--text);
}

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

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 34px rgba(79, 140, 255, 0.32);
}

.btn--primary:hover {
  color: #fff;
  box-shadow: 0 18px 46px rgba(79, 140, 255, 0.42);
}

.btn--ghost {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: 1.0625rem;
}

.btn__icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.btn__icon svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   8. 工具卡片
   -------------------------------------------------------------------------- */
.tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-7);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

/* 卡片顶部强调色描边 */
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--card-accent), transparent 78%);
  opacity: 0.85;
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-accent);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--card-accent);
}

.tool-card--ranking {
  --card-accent: var(--accent);
}

.tool-card--effect {
  --card-accent: var(--accent-2);
}

.tool-card--wars {
  --card-accent: var(--accent-3);
}

.tool-card__badge {
  align-self: flex-start;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tool-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  /* 旧浏览器回退 */
  background: rgba(79, 140, 255, 0.16);
  border: 1px solid rgba(79, 140, 255, 0.34);
  /* 支持 color-mix 时跟随卡片强调色 */
  background: color-mix(in srgb, var(--card-accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--card-accent) 36%, transparent);
  color: var(--card-accent);
}

.tool-card__icon svg {
  width: 24px;
  height: 24px;
}

.tool-card__title {
  margin: 0;
  font-size: 1.25rem;
}

.tool-card__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.tool-card__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-card__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.tool-card__feature::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--card-accent);
}

.tool-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
  color: var(--card-accent);
  font-size: 0.9375rem;
  font-weight: 600;
}

.tool-card__cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.tool-card:hover .tool-card__cta svg {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   9. OPC 价值区块
   -------------------------------------------------------------------------- */
.opc {
  position: relative;
}

.opc__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}

.opc__item {
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.opc__item:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.opc__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.22), rgba(139, 92, 246, 0.22));
  color: var(--accent-3);
}

.opc__icon svg {
  width: 22px;
  height: 22px;
}

.opc__title {
  margin: 0 0 var(--space-2);
  font-size: 1.0625rem;
}

.opc__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   10. FAQ 手风琴
   -------------------------------------------------------------------------- */
.faq {
  position: relative;
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.faq__item.is-open {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-5) var(--space-6);
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq__q:hover {
  color: var(--accent-3);
}

.faq__q-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: transform 0.28s ease, color 0.28s ease, border-color 0.28s ease;
}

.faq__q-icon svg {
  width: 14px;
  height: 14px;
}

.faq__item.is-open .faq__q-icon {
  transform: rotate(45deg);
  color: var(--accent-3);
  border-color: var(--accent-3);
}

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

/* 收起态由 hidden 真正不渲染（优先级需高于 .faq__a） */
.faq__a[hidden] {
  display: none;
}

.faq__item.is-open .faq__a {
  grid-template-rows: 1fr;
}

.faq__a-inner {
  overflow: hidden;
  padding-inline: var(--space-6);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.faq__item.is-open .faq__a-inner {
  padding-bottom: var(--space-6);
}

/* 现代浏览器：让 display 也参与过渡，展开/收起更顺滑 */
@supports (transition-behavior: allow-discrete) {
  .faq__a {
    transition: grid-template-rows 0.3s ease, display 0.3s allow-discrete;
  }

  .faq__item.is-open .faq__a {
    display: grid;
  }

  @starting-style {
    .faq__item.is-open .faq__a {
      grid-template-rows: 0fr;
    }
  }
}

/* --------------------------------------------------------------------------
   11. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: var(--space-12);
  border-top: 1px solid var(--border);
  background: rgba(7, 9, 15, 0.6);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
  padding-block: var(--space-10) var(--space-8);
}

.footer__brand {
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 380px;
}

.footer__brand strong {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--text);
  font-size: 1.0625rem;
}

.footer__col {
  min-width: 0;
}

.footer__col-title {
  margin: 0 0 var(--space-4);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--accent-3);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-5);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.footer__note {
  color: var(--text-dim);
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   12. 文章列表
   -------------------------------------------------------------------------- */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.post-card__title {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.4;
}

.post-card__title a {
  color: var(--text);
}

.post-card__title a:hover {
  color: var(--accent-3);
}

.post-card__excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.post-card__more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.post-card__more svg {
  width: 15px;
  height: 15px;
  transition: transform 0.25s ease;
}

.post-card:hover .post-card__more svg {
  transform: translateX(4px);
}

.post-card__tag {
  align-self: flex-start;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--accent-3);
  font-size: 0.75rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   13. 文章详情
   -------------------------------------------------------------------------- */
.post {
  max-width: 780px;
  margin-inline: auto;
  padding-block: var(--space-10) var(--space-11);
}

.post__header {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid var(--border);
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.post__title {
  margin-bottom: var(--space-5);
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #ffffff 10%, var(--text-muted) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.post__lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.post__body {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.85;
}

.post__body h2 {
  margin-top: var(--space-9);
  margin-bottom: var(--space-4);
  color: var(--text);
  font-size: 1.5rem;
}

.post__body h3 {
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
  color: var(--text);
  font-size: 1.1875rem;
}

.post__body p {
  margin-bottom: var(--space-5);
}

.post__body ul,
.post__body ol {
  margin-bottom: var(--space-5);
  padding-left: 1.4em;
}

.post__body li {
  margin-bottom: var(--space-2);
}

.post__body li::marker {
  color: var(--accent);
}

.post__body a {
  color: var(--accent-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post__body strong {
  color: var(--text);
  font-weight: 700;
}

.post__body blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--surface);
  color: var(--text);
  font-style: italic;
}

.post__body blockquote p:last-child {
  margin-bottom: 0;
}

.post__body code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--accent-3);
  font-size: 0.875em;
}

.post__body pre {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: auto;
}

.post__body pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

/* 文末行动号召 */
.post__cta {
  margin-top: var(--space-9);
  padding: var(--space-8);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(600px 200px at 10% 0%, rgba(79, 140, 255, 0.22), transparent 70%),
    var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-glow);
  text-align: center;
}

.post__cta-title {
  margin: 0 0 var(--space-3);
  font-size: 1.375rem;
}

.post__cta-desc {
  margin: 0 0 var(--space-6);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.post__cta .btn {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   14. 面包屑
   -------------------------------------------------------------------------- */
.breadcrumb {
  padding-top: var(--space-6);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb__item a {
  color: var(--text-muted);
}

.breadcrumb__item a:hover {
  color: var(--accent-3);
}

.breadcrumb__item[aria-current="page"] {
  color: var(--text);
}

.breadcrumb__sep {
  color: var(--text-dim);
  opacity: 0.7;
  user-select: none;
}

/* --------------------------------------------------------------------------
   15. 滚动揭示
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* 脚本不可用时不做隐藏，避免正文因动效未触发而永久不可见 */
@media (scripting: none) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   16. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 62px;
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__links {
    position: absolute;
    left: var(--space-4);
    right: var(--space-4);
    top: calc(100% + var(--space-2));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    padding: var(--space-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: rgba(11, 15, 24, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-md);
  }

  .nav.is-open .nav__links {
    display: flex;
  }

  .nav__link {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
  }

  .section {
    padding-block: var(--space-10);
  }

  .hero {
    padding-block: var(--space-10) var(--space-9);
  }

  .tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-7);
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: var(--space-5);
  }

  .tool-card,
  .post__cta {
    padding: var(--space-6);
  }

  .hero__actions .btn {
    width: 100%;
  }

  /* 窄屏隐藏品牌副标签，避免挤压导航按钮 */
  .nav__brand small {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   17. 减弱动效偏好
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
