
/* ================================================================
   1. Design Tokens — 逐字复制 news-detail.html 令牌区块（零改动）
   ================================================================ */
.news-detail-scope {
  /* === Primary (Teal — 与前台一致) === */
  --color-primary: #0D9488;
  --color-primary-hover: #0F766E;
  --color-primary-active: #115E59;
  --color-primary-light: #CCFBF1;
  --color-primary-lighter: #F0FDFA;
  --color-primary-dark: #134E4A;

  /* === Accent (Orange) === */
  --color-accent: #F97316;
  --color-accent-hover: #EA580C;
  --color-accent-light: #FFEDD5;

  /* === Neutral (Stone 暖灰) === */
  --color-bg: #FFFFFF;
  --color-surface: #FAFAF9;
  --color-surface-alt: #F5F5F4;
  --color-surface-hover: #F5F5F4;
  --color-surface-selected: #F0FDFA;
  --color-border: #E7E5E4;
  --color-border-strong: #D6D3D1;
  --color-text-primary: #1C1917;
  --color-text-secondary: #57534E;
  --color-text-tertiary: #78716C;
  --color-text-disabled: #A8A29E;
  --color-text-inverse: #FFFFFF;

  /* === Semantic === */
  --color-success: #10B981;
  --color-success-light: #D1FAE5;
  --color-success-dark: #065F46;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-warning-dark: #92400E;
  --color-danger: #EF4444;
  --color-danger-light: #FEE2E2;
  --color-danger-dark: #991B1B;
  --color-info: #3B82F6;
  --color-info-light: #DBEAFE;
  --color-info-dark: #1E40AF;

  /* === Sidebar Dark（亮色页不使用，仅随原样保留） === */
  --color-sidebar-bg: #1C1917;
  --color-sidebar-surface: #292524;
  --color-sidebar-border: #44403C;
  --color-sidebar-text: #E7E5E4;
  --color-sidebar-text-muted: #A8A29E;
  --color-sidebar-text-disabled: #78716C;
  --color-sidebar-active-bg: #0D9488;
  --color-sidebar-active-text: #FFFFFF;
  --color-sidebar-hover-bg: rgba(255,255,255,0.06);
  --color-sidebar-group-label: #78716C;

  /* === Topbar === */
  --color-topbar-bg: #FFFFFF;
  --color-topbar-border: #E7E5E4;

  /* === Typography === */
  --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-heading: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                  'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-numeric: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

  /* === Radius === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* === Spacing === */
  --space-3xs: 2px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;

  /* === Shadow === */
  --shadow-none: none;
  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 8px rgba(28, 25, 23, 0.06), 0 2px 4px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.08), 0 4px 8px rgba(28, 25, 23, 0.04);
  --shadow-xl: 0 16px 48px rgba(28, 25, 23, 0.10), 0 8px 16px rgba(28, 25, 23, 0.06);
  --shadow-2xl: 0 24px 64px rgba(28, 25, 23, 0.14);

  /* === Layout === */
  --sidebar-width: 240px;
  --sidebar-width-collapsed: 64px;
  --topbar-height: 56px;
  --content-max-width: 1440px;
  --content-padding: 24px;
  --drawer-width: 480px;

  /* === Z-index === */
  --z-base: 0;
  --z-sticky-table: 1;
  --z-topbar: 150;
  --z-sidebar: 200;
  --z-dropdown: 300;
  --z-drawer: 310;
  --z-modal: 400;
  --z-command: 500;
  --z-toast: 600;

  height: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================================
   2. Reset & Base（作用域化）
   ================================================================ */
.news-detail-scope * { margin: 0; padding: 0; box-sizing: border-box; }

.news-detail-scope a { text-decoration: none; color: inherit; }

.news-detail-scope button { font-family: var(--font-body); }

.news-detail-scope img, .news-detail-scope svg { display: block; }

.news-detail-scope .numeric { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1, 'lnum' 1; }

/* ================================================================
   3. 复用组件 CSS（全部使用 var() 令牌，无硬编码色值）
   ================================================================ */
.news-detail-scope .btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--color-primary); color: var(--color-text-inverse); border: none; border-radius: var(--radius-md); padding: 9px 18px; font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer; transition: all 0.12s ease; white-space: nowrap; font-family: var(--font-body); }
.news-detail-scope .btn-primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-md); }
.news-detail-scope .btn-primary:active { background: var(--color-primary-active); transform: translateY(1px); }
.news-detail-scope .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--color-bg); color: var(--color-text-primary); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); padding: 9px 18px; font-size: 14px; font-weight: 500; line-height: 1.4; cursor: pointer; transition: all 0.12s ease; white-space: nowrap; font-family: var(--font-body); }
.news-detail-scope .btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-lighter); }
.news-detail-scope .btn-ghost { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--color-text-secondary); border: none; border-radius: var(--radius-md); padding: 7px 12px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.12s ease; font-family: var(--font-body); }
.news-detail-scope .btn-ghost:hover { background: var(--color-surface); color: var(--color-text-primary); }
.news-detail-scope .btn-sm { padding: 7px 14px; font-size: 13px; }

.news-detail-scope .tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; background: var(--color-surface-alt); color: var(--color-text-secondary); }
.news-detail-scope .tag-primary { background: var(--color-primary-light); color: var(--color-primary-dark); }
.news-detail-scope .tag-accent { background: var(--color-accent-light); color: var(--color-accent-hover); }

/* ================================================================
   4. 亮色外壳组件（home-prototype.html 复制 — 由 get_header()/get_footer() 渲染，此处保留作用域规则）
   ================================================================ */
.news-detail-scope .site-header { position: sticky; top: 0; z-index: var(--z-topbar); height: var(--topbar-height); background: var(--color-topbar-bg); border-bottom: 1px solid var(--color-topbar-border); }
.news-detail-scope .site-header-inner { max-width: var(--content-max-width); height: 100%; margin: 0 auto; padding: 0 var(--space-xl); display: flex; align-items: center; gap: var(--space-lg); }
.news-detail-scope .site-logo { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: 600; color: var(--color-text-primary); font-size: 15px; flex-shrink: 0; }
.news-detail-scope .site-logo .logo-mark { width: 28px; height: 28px; border-radius: var(--radius-md); background: var(--color-primary); color: var(--color-text-inverse); display: inline-flex; align-items: center; justify-content: center; }
.news-detail-scope .site-nav { display: flex; align-items: center; gap: var(--space-xs); }
.news-detail-scope .site-nav-link { padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-md); font-size: 14px; color: var(--color-text-secondary); text-decoration: none; transition: all .12s ease; }
.news-detail-scope .site-nav-link:hover { background: var(--color-surface); color: var(--color-primary); }
.news-detail-scope .site-nav-link.active { color: var(--color-primary); font-weight: 600; }
.news-detail-scope .site-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-sm); }
.news-detail-scope .site-actions .btn-ghost { color: var(--color-text-secondary); }
.news-detail-scope .site-hamburger { display: none; }
.news-detail-scope .site-drawer-overlay { position: fixed; inset: 0; background: rgba(28, 25, 23, 0.3); z-index: var(--z-drawer); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.news-detail-scope .site-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.news-detail-scope .site-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 300px; max-width: 82vw; background: var(--color-bg); z-index: var(--z-drawer); transform: translateX(100%); transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; box-shadow: var(--shadow-2xl); }
.news-detail-scope .site-drawer.open { transform: translateX(0); }
.news-detail-scope .site-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--color-border); }
.news-detail-scope .site-drawer-nav { display: flex; flex-direction: column; gap: 4px; padding: var(--space-md); }
.news-detail-scope .site-drawer-link { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); font-size: 14px; color: var(--color-text-secondary); }
.news-detail-scope .site-drawer-link:hover, .news-detail-scope .site-drawer-link.active { background: var(--color-surface); color: var(--color-primary); }
.news-detail-scope .site-drawer-actions { margin-top: auto; padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); border-top: 1px solid var(--color-border); }

.news-detail-scope .site-footer { width: 100%; background: var(--color-surface); border-top: 1px solid var(--color-border); padding: var(--space-3xl) 0 var(--space-xl); margin-top: var(--space-3xl); }
.news-detail-scope .site-footer-inner { max-width: var(--content-max-width); margin: 0 auto; padding: 0 var(--space-xl); display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: var(--space-2xl); }
.news-detail-scope .footer-brand .site-logo { margin-bottom: var(--space-sm); }
.news-detail-scope .footer-slogan { font-size: 13px; color: var(--color-text-tertiary); max-width: 280px; line-height: 1.6; }
.news-detail-scope .footer-col-title { font-size: 14px; font-weight: 600; color: var(--color-text-primary); margin-bottom: var(--space-sm); }
.news-detail-scope .footer-link { display: block; font-size: 13px; color: var(--color-text-secondary); text-decoration: none; padding: 4px 0; }
.news-detail-scope .footer-link:hover { color: var(--color-primary); }
.news-detail-scope .footer-bottom { max-width: var(--content-max-width); margin: var(--space-2xl) auto 0; padding: var(--space-lg) var(--space-xl) 0; border-top: 1px solid var(--color-border); display: flex; justify-content: space-between; gap: var(--space-md); font-size: 12px; color: var(--color-text-tertiary); flex-wrap: wrap; }

/* ================================================================
   5. 页面布局 & 文章专属组件
   ================================================================ */
.news-detail-scope .container { max-width: var(--content-max-width); margin: 0 auto; padding: 0 var(--space-xl); }
.news-detail-scope .page-head { padding: var(--space-2xl) 0; background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.news-detail-scope .page-head-inner { max-width: 820px; margin: 0 auto; padding: 0 var(--space-xl); }
.news-detail-scope .breadcrumb { display: flex; align-items: center; gap: var(--space-xs); font-size: 13px; margin-bottom: var(--space-lg); }
.news-detail-scope .breadcrumb-item { color: var(--color-text-tertiary); cursor: pointer; transition: color 0.12s ease; }
.news-detail-scope .breadcrumb-item:hover { color: var(--color-primary); }
.news-detail-scope .breadcrumb-item.current { color: var(--color-text-primary); font-weight: 500; }
.news-detail-scope .breadcrumb-separator { color: var(--color-text-tertiary); font-size: 12px; }

.news-detail-scope .section { padding: var(--space-3xl) 0; }
.news-detail-scope .section-head { text-align: center; max-width: 640px; margin: 0 auto var(--space-2xl); }
.news-detail-scope .section-title { font-size: 24px; font-weight: 700; color: var(--color-text-primary); letter-spacing: -0.02em; }

.news-detail-scope .article { max-width: 820px; margin: 0 auto; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-2xl); }
.news-detail-scope .article-cover { width: 100%; height: 280px; border-radius: var(--radius-lg); background: var(--color-primary-lighter); display: flex; align-items: center; justify-content: center; color: var(--color-primary); margin-bottom: var(--space-xl); }
.news-detail-scope .article-meta { display: flex; align-items: center; gap: var(--space-md); font-size: 13px; color: var(--color-text-tertiary); margin-bottom: var(--space-md); flex-wrap: wrap; }
.news-detail-scope .article-meta .author { display: flex; align-items: center; gap: 6px; }
.news-detail-scope .article-meta .author-avatar { width: 24px; height: 24px; border-radius: var(--radius-full); background: var(--color-primary-light); color: var(--color-primary-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.news-detail-scope .article-meta .dot { width: 3px; height: 3px; border-radius: var(--radius-full); background: var(--color-text-tertiary); }
.news-detail-scope .article-title { font-size: 26px; font-weight: 700; color: var(--color-text-primary); letter-spacing: -0.02em; line-height: 1.35; margin-bottom: var(--space-lg); }
.news-detail-scope .article-body { font-size: 15px; line-height: 1.85; color: var(--color-text-secondary); }
.news-detail-scope .article-body h2 { font-size: 19px; font-weight: 600; color: var(--color-text-primary); margin: var(--space-2xl) 0 var(--space-sm); letter-spacing: -0.01em; }
.news-detail-scope .article-body p { margin-bottom: var(--space-md); }
.news-detail-scope .article-body blockquote { border-left: 3px solid var(--color-primary); background: var(--color-primary-lighter); padding: var(--space-md) var(--space-lg); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: var(--space-lg) 0; color: var(--color-primary-dark); font-size: 15px; line-height: 1.7; }
.news-detail-scope .article-body ul { margin: 0 0 var(--space-md) var(--space-xl); }
.news-detail-scope .article-body li { margin-bottom: var(--space-xs); }

.news-detail-scope .related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.news-detail-scope .related-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .15s ease, border-color .15s ease; }
.news-detail-scope .related-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
.news-detail-scope .related-thumb { height: 140px; background: var(--color-primary-lighter); display: flex; align-items: center; justify-content: center; color: var(--color-primary); }
.news-detail-scope .related-body { padding: var(--space-md); }
.news-detail-scope .related-meta { font-size: 12px; color: var(--color-text-tertiary); margin-bottom: 6px; }
.news-detail-scope .related-title { font-size: 14px; font-weight: 600; color: var(--color-text-primary); line-height: 1.45; }

.news-detail-scope .mb-2 { margin-bottom: var(--space-xs); }
.news-detail-scope .mb-3 { margin-bottom: var(--space-sm); }
.news-detail-scope .flex { display: flex; }
.news-detail-scope .items-center { align-items: center; }
.news-detail-scope .text-tertiary { color: var(--color-text-tertiary); }

/* ================================================================
   6. 从原 single-news.php 迁移的 .article-body 规则（令牌已对齐为 --color-*）
   ================================================================ */
.news-detail-scope .article-body p { text-indent: 2em; margin-bottom: 16px; }
.news-detail-scope .article-body h3 { font-size: 18px; color: var(--color-text-primary); margin: 24px 0 12px; text-indent: 0; }
.news-detail-scope .article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 16px 0; }

/* ================================================================
   7. 本页扩展：两栏布局 / 侧栏卡片 / 上一篇下一篇（作用域化）
   ================================================================ */
.news-detail-scope .breadcrumb { padding: var(--space-lg) 0; margin-bottom: 0; }
.news-detail-scope .news-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-2xl); align-items: flex-start; padding: 0 0 var(--space-3xl); }
.news-detail-scope .news-main { min-width: 0; }
.news-detail-scope .news-main .article { max-width: none; margin: 0; }
.news-detail-scope .news-sidebar { display: flex; flex-direction: column; gap: var(--space-lg); position: sticky; top: calc(var(--topbar-height) + var(--space-lg)); }
.news-detail-scope .side-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-lg); }
.news-detail-scope .side-card-title { font-size: 16px; font-weight: 700; color: var(--color-text-primary); margin: 0 0 var(--space-md); }
.news-detail-scope .rel-link { display: block; font-size: 13px; color: var(--color-text-secondary); padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-border); text-decoration: none; transition: color .2s; }
.news-detail-scope .rel-link:last-child { border-bottom: none; }
.news-detail-scope .rel-link:hover { color: var(--color-primary); }
.news-detail-scope .side-empty { font-size: 13px; color: var(--color-text-tertiary); margin: 0; }
.news-detail-scope .tag-cloud { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.news-detail-scope .chip { font-size: 12px; padding: 4px 10px; background: var(--color-primary-light); color: var(--color-primary-dark); border-radius: var(--radius-sm); text-decoration: none; transition: all .12s; }
.news-detail-scope .chip:hover { background: var(--color-primary); color: var(--color-text-inverse); }
.news-detail-scope .hotline-card { background: linear-gradient(135deg, var(--color-primary-light), #ccfbf1); border: none; text-align: center; }
.news-detail-scope .hotline-label { font-size: 13px; color: var(--color-text-tertiary); margin: 0 0 4px; }
.news-detail-scope .hotline-phone { font-size: 24px; font-weight: 800; color: var(--color-primary); margin: 4px 0 0; }
.news-detail-scope .news-prevnext { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: 1px solid var(--color-border); font-size: 14px; }
.news-detail-scope .news-prevnext a { color: var(--color-text-secondary); text-decoration: none; }
.news-detail-scope .news-prevnext a:hover { color: var(--color-primary); }
.news-detail-scope .article-meta { border-bottom: 1px solid var(--color-border); padding-bottom: var(--space-md); margin-bottom: var(--space-lg); }

/* ================================================================
   8. 响应式（从原 single-news.php 迁移的 @media 规则，作用域化）
   ================================================================ */
@media (max-width: 1024px) {
  .news-detail-scope .news-layout { grid-template-columns: 1fr; }
  .news-detail-scope .news-sidebar { position: static; }
}
@media (max-width: 768px) {
  .news-detail-scope .article { padding: var(--space-lg); }
  .news-detail-scope .article-cover { height: 180px; }
  .news-detail-scope .article-title { font-size: 20px; }
}