/* ============================================================
   ModelSet Blog — shared stylesheet for blog.html + blog/*.html
   Built on the site design system (accent #c4755a, radius 12px)
   ============================================================ */

/* ====== DESIGN SYSTEM ====== */
:root {
  --bg: #ffffff;
  --bg-alt: #f8f8fa;
  --surface: #ffffff;
  --surface-hover: #fafafa;
  --border: rgba(0,0,0,0.06);
  --border-strong: rgba(0,0,0,0.12);
  --accent: #c4755a;
  --accent-hover: #b0664d;
  --accent-light: rgba(196,117,90,0.08);
  --accent-lighter: rgba(196,117,90,0.04);
  --accent-gradient: linear-gradient(135deg, #d4956e, #c4755a);
  --success: #3ea87a;
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.03);
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}
::selection { background: var(--accent); color: white; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; font-weight: 600; border: none; cursor: pointer;
  border-radius: var(--radius); transition: all 0.2s; text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-ghost { padding: 8px 16px; color: var(--text-secondary); background: transparent; }
.btn-ghost:hover { color: var(--text-primary); background: rgba(0,0,0,0.04); }
.btn-primary {
  padding: 8px 20px; color: white; background: var(--accent);
  border-radius: var(--radius); font-weight: 600;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { background: var(--accent-hover); }

/* ====== FOCUS ====== */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ====== NAV ====== */
html { scroll-padding-top: 88px; }
body { padding-top: 76px; }
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s ease;
}
.nav.nav-hidden { transform: translateY(-100%); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 16px;
}
/* Nav 样式由 site-v2.css 最终定义（与其他页面加载顺序一致：blog.css 在前、site-v2.css 最后），
   此处只保留 site-v2 未覆盖的基础规则（position: fixed、z-index、.nav-hidden、下拉菜单定位等） */
.nav-logo {
  font-size: 17px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text-primary); text-decoration: none;
  display: inline-flex; align-items: center; flex-shrink: 0;
}
.nav-logo-mark { width: 120px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 14px; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none; border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text-primary); background: rgba(0,0,0,0.04); }
.nav-link.active { color: var(--accent); background: var(--accent-light); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-cta {
  padding: 8px 18px; font-size: 13px;
  background: var(--accent-gradient);
  box-shadow: 0 2px 8px rgba(196,117,90,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-cta:hover { background: var(--accent-gradient); }

/* ====== LANG DROPDOWN ====== */
.lang-dropdown { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
  white-space: nowrap;
}
.lang-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }
.lang-btn svg { width: 12px; height: 12px; transition: transform 0.2s; }
.lang-dropdown.open .lang-btn svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 110; min-width: 120px;
}
.lang-dropdown.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  background: none; border: none; border-radius: 6px;
  cursor: pointer; transition: all 0.15s; text-align: left;
  font-family: inherit;
}
.lang-option:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); }
.lang-option.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.lang-option-check { width: 14px; height: 14px; flex-shrink: 0; opacity: 0; }
.lang-option.active .lang-option-check { opacity: 1; }

.nav-menu-btn {
  display: none; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none; border: none; border-radius: 10px;
  color: var(--text-primary); cursor: pointer;
}
.nav-menu-btn:hover { background: rgba(0,0,0,0.04); }

/* ====== TOAST ====== */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1a1a2e; color: white;
  font-size: 13px; font-weight: 500;
  padding: 10px 20px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 200; box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ====== SCROLL REVEAL ====== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ====== SECTION ====== */
.section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.section-header h2,
.section-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px;
}
.section-header p { color: var(--text-secondary); font-size: 15px; }

/* ====== CTA ====== */
.cta-section { padding: 40px 0 80px; }
.cta-box {
  background: var(--accent-gradient);
  border-radius: var(--radius-xl);
  padding: 56px 32px;
  text-align: center;
  color: white;
}
.cta-box h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.cta-box p { font-size: 15px; opacity: 0.85; margin-bottom: 28px; }
.btn-white {
  padding: 14px 32px; background: white; color: var(--accent);
  border-radius: var(--radius); font-size: 15px; font-weight: 700;
  border: none; cursor: pointer; transition: all 0.2s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-white:hover { background: var(--surface-hover); transform: translateY(-1px); }

/* ====== FOOTER ====== */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-logo {
  font-size: 18px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text-primary); display: block; margin-bottom: 8px;
}
.footer-brand p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact-label {
  font-size: 12px; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px;
}
.footer-link {
  font-size: 13px; color: var(--text-secondary); text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }
.footer-link.active { color: var(--accent); font-weight: 600; }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  text-align: center; font-size: 12px; color: var(--text-tertiary);
}
.footer-bottom .footer-link { font-size: 12px; color: var(--text-tertiary); }
.footer-bottom .footer-link:hover { color: var(--accent); }

/* ====== FOOTER QR ====== */
.footer-qr { display: flex; flex-direction: column; gap: 10px; }
.footer-qr-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-qr-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-qr-item img {
  width: 100px; height: 100px; border-radius: 8px;
  border: 1px solid var(--border); object-fit: cover;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.footer-qr-item img:hover { transform: scale(1.05); box-shadow: var(--shadow-md); }
.footer-qr-label {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  text-align: center;
}

/* ============================================================
   BLOG LISTING
   ============================================================ */
.blog-section { background: var(--bg-alt); }

/* ---- Category chips ---- */
.blog-cat {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: 0.02em;
}
.blog-cat-announce { background: rgba(196,117,90,0.1); color: var(--accent); }
.blog-cat-tutorial { background: rgba(62,168,122,0.1); color: #2f8a64; }
.blog-cat-deep     { background: rgba(90,105,130,0.12); color: #56698a; }
.blog-cat-policy   { background: rgba(176,133,40,0.12); color: #96721f; }
.blog-cat-ccode    { background: rgba(196,117,90,0.1); color: var(--accent); }
.blog-cat-codex    { background: rgba(62,168,122,0.1); color: #2f8a64; }
.blog-cat-desktop  { background: rgba(176,133,40,0.12); color: #96721f; }

/* ---- Article images ---- */
.article-img {
  display: block;
  margin: 22px auto;
  max-width: 440px;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.article-img-wide { max-width: 560px; }
.article-img-sm { max-width: 300px; }
.article-img-qr { max-width: 180px; }
.figure-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin: -14px 0 20px;
}

/* ---- Filter chips ---- */
.blog-filters {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; flex-wrap: wrap;
  margin: -28px auto 44px;
  max-width: 720px;
}
.blog-chip {
  font-family: inherit; cursor: pointer;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 999px;
  transition: all 0.2s;
}
.blog-chip:hover { color: var(--text-primary); border-color: var(--border-strong); }
.blog-chip.active {
  color: white; background: var(--accent); border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(196,117,90,0.25);
}
.blog-chip .blog-chip-count {
  font-size: 11px; opacity: 0.65; margin-left: 4px;
}

/* ---- Card grid ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.blog-card.blog-hide { opacity: 0; transform: scale(0.97) translateY(6px); }

.blog-cover {
  position: relative;
  height: 148px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.blog-cover-emoji {
  font-size: 44px; line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-card:hover .blog-cover-emoji { transform: scale(1.12) rotate(-4deg); }
.blog-cover::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.blog-cover::before {
  content: '';
  position: absolute; top: -40%; left: -10%;
  width: 60%; height: 180%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.22), transparent 60%);
  transform: rotate(20deg);
  pointer-events: none;
}
/* cover palettes */
.cov-1 { background: linear-gradient(135deg, #d4956e, #b0664d); }
.cov-2 { background: linear-gradient(135deg, #5c6b7a, #39434e); }
.cov-3 { background: linear-gradient(135deg, #58a083, #33765c); }
.cov-4 { background: linear-gradient(135deg, #4a4a55, #2b2b33); }
.cov-5 { background: linear-gradient(135deg, #cfa96e, #a8823f); }
.cov-6 { background: linear-gradient(135deg, #9c7b95, #6a4f64); }

.blog-card-body {
  display: flex; flex-direction: column; flex: 1;
  padding: 20px 22px 18px;
}
.blog-card-title {
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  line-height: 1.45; margin: 10px 0 8px;
  transition: color 0.2s;
}
.blog-card:hover .blog-card-title { color: var(--accent); }
.blog-card-excerpt {
  font-size: 13px; color: var(--text-secondary); line-height: 1.7;
  flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-tertiary);
}
.blog-card-meta .meta-dot { opacity: 0.6; }
.blog-card-more {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 600; color: var(--accent);
}
.blog-card-more svg { transition: transform 0.2s; }
.blog-card:hover .blog-card-more svg { transform: translateX(3px); }

/* ---- Featured card ---- */
.blog-featured {
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none; color: inherit;
  margin-bottom: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.blog-featured:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-featured.blog-hide { opacity: 0; transform: scale(0.98) translateY(6px); }
.blog-featured .blog-cover { height: 100%; min-height: 260px; }
.blog-featured .blog-cover-emoji { font-size: 72px; }
.blog-featured-body {
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 44px;
}
.blog-featured-badge {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700;
  color: white; background: rgba(0,0,0,0.28);
  backdrop-filter: blur(4px);
  padding: 4px 12px; border-radius: 999px;
}
.blog-featured-title {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.4;
  margin: 12px 0 10px;
  transition: color 0.2s;
}
.blog-featured:hover .blog-featured-title { color: var(--accent); }
.blog-featured-excerpt {
  font-size: 14px; color: var(--text-secondary); line-height: 1.8;
  margin-bottom: 20px;
}
.blog-featured-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-tertiary);
}
.blog-featured-more {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 700; color: var(--accent);
}
.blog-featured-more svg { transition: transform 0.2s; }
.blog-featured:hover .blog-featured-more svg { transform: translateX(4px); }

/* ---- Empty state ---- */
.blog-empty {
  display: none;
  text-align: center;
  padding: 64px 24px;
  color: var(--text-tertiary);
  font-size: 14px;
}
.blog-empty.show { display: block; }
.blog-empty-emoji { font-size: 40px; margin-bottom: 12px; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.progress {
  position: fixed; top: 0; left: 0; z-index: 150;
  height: 3px; width: 0;
  background: var(--accent-gradient);
  border-radius: 0 999px 999px 0;
  transition: width 0.1s linear;
}

.article-section { background: var(--bg-alt); padding: 56px 0 96px; }

.article-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary); text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s, gap 0.2s;
}
.article-back:hover { color: var(--accent); gap: 11px; }
.article-back svg { width: 15px; height: 15px; }

.article-head { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.article-head h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.4;
  margin: 14px 0 14px;
}
.article-head-sub {
  font-size: 15px; color: var(--text-secondary); line-height: 1.8;
}
.article-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
  margin-top: 18px;
  font-size: 13px; color: var(--text-tertiary);
}
.article-meta .meta-dot { opacity: 0.5; }
.article-meta .article-author { font-weight: 600; color: var(--text-secondary); }

.article-cover {
  position: relative;
  max-width: 960px; margin: 0 auto 0;
  height: 240px;
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.article-cover .blog-cover-emoji { font-size: 72px; }
.article-cover::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* layout: content + toc */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 64px;
  max-width: 1040px;
  margin: 48px auto 0;
  align-items: start;
}

.article-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 52px 44px;
}

/* ---- typography ---- */
.article-content { font-size: 15px; line-height: 1.9; color: #2b2b2b; }
.article-content p { margin: 0 0 18px; }
.article-content h2 {
  font-size: 20px; font-weight: 800; letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 44px 0 16px;
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
  scroll-margin-top: 96px;
}
.article-content h2::before {
  content: '';
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 4px; border-radius: 4px;
  background: var(--accent-gradient);
}
.article-content h3 {
  font-size: 16.5px; font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 12px;
  scroll-margin-top: 96px;
}
.article-content strong { color: var(--text-primary); font-weight: 700; }
.article-content a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px dashed rgba(196,117,90,0.45);
  transition: border-color 0.2s;
}
.article-content a:hover { border-bottom-color: var(--accent); }
.article-content ul, .article-content ol {
  margin: 0 0 18px; padding-left: 6px;
  list-style: none;
}
.article-content li {
  position: relative; padding-left: 22px; margin-bottom: 8px;
}
.article-content ul li::before {
  content: '';
  position: absolute; left: 4px; top: 0.72em;
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--accent);
  transform: translateY(-50%) rotate(45deg);
}
.article-content ol { counter-reset: ol-item; }
.article-content ol li { counter-increment: ol-item; }
.article-content ol li::before {
  content: counter(ol-item);
  position: absolute; left: 0; top: 0.28em;
  font-size: 12px; font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
}
.article-content blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  background: var(--accent-lighter);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  color: var(--text-secondary);
}
.article-content blockquote p:last-child { margin-bottom: 0; }

.article-content code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  color: #a05a44;
  overflow-wrap: break-word;
}
.table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { margin: 0; min-width: 480px; }
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 13.5px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-content th {
  background: var(--bg-alt);
  font-weight: 700; text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.article-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.article-content tr:last-child td { border-bottom: none; }
.article-content tr:hover td { background: var(--surface-hover); }

/* ---- code block (terminal style, matches hero) ---- */
.code-block {
  margin: 22px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: var(--shadow-sm);
}
.code-block-header {
  display: flex; align-items: center;
  background: #1e1e2d;
  padding: 9px 14px;
  gap: 8px;
}
.code-block-dots { display: flex; gap: 6px; }
.code-block-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.code-block-dots span:nth-child(1) { background: #ff5f57; }
.code-block-dots span:nth-child(2) { background: #febc2e; }
.code-block-dots span:nth-child(3) { background: #28c840; }
.code-block-title {
  font-family: var(--mono);
  font-size: 11px; color: rgba(255,255,255,0.55);
  margin-left: 4px;
}
.code-block-copy {
  margin-left: auto;
  font-family: inherit;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
  border: none; border-radius: 6px;
  padding: 4px 10px; cursor: pointer;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 5px;
}
.code-block-copy:hover { background: rgba(255,255,255,0.16); color: white; }
.code-block pre {
  background: #14141f;
  padding: 16px 18px;
  overflow-x: auto;
}
.code-block pre code {
  font-family: var(--mono);
  font-size: 12.5px; line-height: 1.75;
  color: #dbe2f0;
  background: none; border: none; padding: 0;
  white-space: pre;
}

/* ---- callouts ---- */
.callout {
  display: flex; gap: 12px;
  margin: 22px 0;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 14px; line-height: 1.75;
}
.callout svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; }
.callout p:last-child { margin-bottom: 0; }
.callout-tip {
  background: rgba(62,168,122,0.06);
  border-color: rgba(62,168,122,0.22);
  color: #2d6b52;
}
.callout-tip svg { color: #3ea87a; }
.callout-info {
  background: rgba(90,105,130,0.07);
  border-color: rgba(90,105,130,0.22);
  color: #4a5872;
}
.callout-info svg { color: #56698a; }
.callout-warn {
  background: rgba(217,119,6,0.06);
  border-color: rgba(217,119,6,0.25);
  color: #92590a;
}
.callout-warn svg { color: #d97706; }

/* ---- TOC ---- */
.toc {
  position: sticky; top: 100px;
  border-left: 2px solid var(--border);
  padding-left: 18px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}
.toc-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.toc-link {
  display: block;
  font-size: 13px; line-height: 1.5;
  color: var(--text-tertiary); text-decoration: none;
  padding: 5px 0;
  border-left: 2px solid transparent;
  margin-left: -20px; padding-left: 18px;
  transition: color 0.2s, border-color 0.2s;
}
.toc-link:hover { color: var(--text-primary); }
.toc-link.active {
  color: var(--accent); font-weight: 600;
  border-left-color: var(--accent);
}

/* ---- article footer ---- */
.article-end { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.article-tag {
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
  background: var(--accent-lighter);
  color: var(--accent);
  border: 1px solid rgba(196,117,90,0.12);
}

.post-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 1040px;
  margin: 32px auto 0;
}
.post-nav-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.post-nav-card:hover {
  border-color: rgba(196,117,90,0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.post-nav-card.next { text-align: right; align-items: flex-end; }
.post-nav-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--text-tertiary);
}
.post-nav-card:hover .post-nav-label { color: var(--accent); }
.post-nav-title {
  font-size: 14px; font-weight: 700; line-height: 1.5;
}
.post-nav-card.next .post-nav-label svg { order: 2; }

/* ---- CTA inside article ---- */
.article-cta {
  margin-top: 32px;
  background: var(--accent-gradient);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  color: white; flex-wrap: wrap;
}
.article-cta h4 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.article-cta p { font-size: 13px; opacity: 0.85; }
.article-cta .btn-white { padding: 10px 22px; font-size: 13.5px; }

/* ====== MOBILE ====== */
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured .blog-cover { min-height: 190px; }
  .blog-featured-body { padding: 28px 28px 32px; }
  .post-nav { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 14px; }
  .nav-menu-btn { display: inline-flex; }
  .section { padding: 72px 0; }
  .article-section { padding: 36px 0 72px; }
  .article-body { padding: 28px 22px 26px; }
  .article-cover { height: 170px; border-radius: var(--radius-lg); }
  .article-cta { flex-direction: column; text-align: center; align-items: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-qr-grid { justify-content: center; }
}
@media (max-width: 620px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-filters { margin-top: -20px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
