/* ==========================================================================
   博客/文章兼容样式：替代 tailwind cdn，仅实现旧文用到的少量工具类
   ========================================================================== */

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* display / flex / grid */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-6 { gap: 24px; }
.grid-cols-1 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* 间距 */
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-2 { margin-left: 8px; margin-right: 8px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-12 { margin-bottom: 48px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }

/* 尺寸 */
.w-full { width: 100%; }
.w-5 { width: 20px; }
.h-5 { height: 20px; }

/* 排版 */
.text-sm { font-size: 14px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }
.text-4xl { font-size: 34px; }
@media (min-width: 768px) { .text-4xl { font-size: 36px; } }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-relaxed { line-height: 1.75; }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* 颜色 */
.text-white { color: #fff; }
.text-gray-900 { color: #111827; }
.text-gray-800 { color: #1f2937; }
.text-gray-700 { color: #374151; }
.text-gray-600 { color: #4b5563; }
.text-gray-500 { color: #6b7280; }
.text-blue-600 { color: #2563eb; }
.bg-white { background: #fff; }
.bg-gray-50 { background: #f8fafc; }
.bg-gray-100 { background: #f1f5f9; }
.bg-blue-50 { background: #eff6ff; }
.bg-blue-600 { background: #2563eb; }
.hover\:bg-blue-700:hover { background: #1d4ed8; }
.hover\:text-blue-800:hover { color: #1e40af; }
.hover\:text-gray-600:hover { color: #4b5563; }
.hover\:text-gray-900:hover { color: #111827; }
.hover\:underline:hover { text-decoration: underline; }

/* 边框 / 圆角 / 阴影 */
.border { border: 1px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 10px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }
.border-collapse { border-collapse: collapse; }
.shadow-sm { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.hover\:shadow-md:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08); }

/* 列表 */
.list-disc { list-style: disc; }
.list-inside { list-style-position: inside; }

/* 定位 / 过渡 */
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease; }
.transition-shadow { transition: box-shadow 0.15s ease; }

/* 文章表格微调 */
article table th, article table td { padding: 10px 14px; }

/* 博客卡片标题 hover */
.article-item:hover .article-title { color: #2563eb; }
