/* ═══════════════════════════════════════════════
   a2606 — 左侧栏矩阵 / 资讯流 模板 CSS
   纯手写，不依赖任何 CSS 框架
   风格：左侧分类树+热榜，右侧密集表格化文章流
   配色：靛蓝 + 石墨灰，强调线性表格分割线
═══════════════════════════════════════════════ */

:root {
  --ink:     #1c2430;
  --ink-2:   #33455e;
  --blue:    #26518e;
  --blue-d:  #1a3a68;
  --line:    #dde3ea;
  --line-2:  #eef1f5;
  --bg:      #eef1f4;
  --panel:   #ffffff;
  --muted:   #7c8896;
  --tag-bg:  #eef4fb;
}

/* ── 基础重置 ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}
a { text-decoration: none; color: inherit; }
a:hover { color: var(--blue); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 14px; }
.dpc { display: block; }
.dsp { display: none; }

/* ════════════════ HEADER（顶部横向） ════════════════ */
.site-header { background: var(--ink); color: #cfd8e3; }

.header-top { border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.header-top .wrap { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px; }
.header-top a { color: #9fb0c4; }
.header-top a:hover { color: #fff; }
.header-top-links { display: flex; gap: 14px; }

.header-brand { padding: 14px 0; }
.header-brand .wrap { display: flex; align-items: center; gap: 16px; }
.brand-mark { width: 40px; height: 40px; background: var(--blue); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 20px; flex-shrink: 0; }
.brand-name { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.brand-sub { color: #7f8fa3; font-size: 11px; letter-spacing: 2px; margin-top: 2px; }
.header-search { margin-left: auto; display: flex; border: 1px solid #384457; border-radius: 3px; overflow: hidden; }
.header-search input { background: #232d3d; border: none; padding: 7px 10px; font-size: 13px; color: #e4e9f0; outline: none; width: 200px; }
.header-search input::placeholder { color: #6a7890; }
.header-search button { background: var(--blue); border: none; color: #fff; padding: 0 16px; cursor: pointer; font-size: 13px; }
.header-search button:hover { background: var(--blue-d); }
.mob-menu-btn { background: none; border: 1px solid #384457; color: #cfd8e3; padding: 7px 12px; border-radius: 3px; font-size: 16px; cursor: pointer; }

/* 分类导航横条 */
.header-nav { background: var(--blue); }
.header-nav .wrap { display: flex; flex-wrap: wrap; }
.header-nav a { color: #fff; padding: 10px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; border-right: 1px solid rgba(255,255,255,.12); }
.header-nav a:first-child { border-left: 1px solid rgba(255,255,255,.12); }
.header-nav a:hover { background: rgba(0,0,0,.18); color: #fff; }
.header-nav a.active { background: var(--ink); color: #fff; }

.mob-nav { display: none; background: #1c2430; border-top: 1px solid #2a3446; }
.mob-nav.open { display: block; }
.mob-nav a { display: block; padding: 10px 16px; font-size: 14px; color: #cfd8e3; border-bottom: 1px solid #2a3446; }

/* ════════════════ 页面骨架：左侧栏 + 右内容 ════════════════ */
.page-shell { max-width: 1200px; margin: 0 auto; padding: 16px 14px 32px; }
.matrix { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }

/* ════════════════ 左侧栏 ════════════════ */
.side-col { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }
.side-box { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.side-box-head { background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; padding: 9px 12px; letter-spacing: .5px; display: flex; align-items: center; gap: 6px; }
.side-box-head::before { content: ''; width: 4px; height: 14px; background: var(--blue); display: inline-block; }
.side-box-head.alt { background: var(--blue); }

/* 分类树 */
.cat-tree { padding: 4px 0; }
.cat-tree li { border-bottom: 1px solid var(--line-2); }
.cat-tree li:last-child { border-bottom: none; }
.cat-tree a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-size: 13px; color: var(--ink-2); }
.cat-tree a:hover { background: var(--tag-bg); color: var(--blue); }
.cat-tree a.active { background: var(--tag-bg); color: var(--blue); font-weight: 700; border-left: 3px solid var(--blue); padding-left: 9px; }
.cat-tree .arrow { color: #c2ccd8; font-size: 12px; }

/* 热榜 */
.hot-list { padding: 2px 0; }
.hot-row { display: flex; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.hot-row:last-child { border-bottom: none; }
.hot-rank { flex-shrink: 0; width: 18px; height: 18px; font-size: 11px; font-weight: 800; border-radius: 2px; display: flex; align-items: center; justify-content: center; color: #fff; background: #b7c1cf; margin-top: 1px; }
.hot-rank.r1 { background: #c0392b; }
.hot-rank.r2 { background: #d67128; }
.hot-rank.r3 { background: #cf9a1e; }
.hot-row a { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hot-row a:hover { color: var(--blue); }

/* 广告位 */
.ad-slot { background: #f4f6f8; border: 1px dashed #c9d2dc; border-radius: 3px; height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 11px; color: #a9b3bf; }

/* ════════════════ 右侧内容区 ════════════════ */
.content-col { min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; }

/* 面包屑 */
.breadcrumb { font-size: 12px; color: #8a94a3; margin: 0 0 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: #5b6b80; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: #c2ccd8; }

/* 内容区标题条 */
.section-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--ink); border-radius: 3px 3px 0 0; }
.section-bar h1, .section-bar h2 { margin: 0; font-size: 16px; font-weight: 800; color: #fff; letter-spacing: .3px; }
.section-bar .count { font-size: 12px; color: #9fb0c4; }
.section-bar .more { font-size: 12px; color: #9fb0c4; }
.section-bar .more:hover { color: #fff; }

/* ── 头条区（home 页） ── */
.headline-block { display: flex; gap: 14px; padding: 14px; border-bottom: 2px solid var(--blue); background: #fbfcfd; }
.headline-tag { flex-shrink: 0; background: var(--blue-d); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 2px; align-self: flex-start; margin-top: 3px; letter-spacing: 1px; }
.headline-body { flex: 1; min-width: 0; }
.headline-title { margin: 0 0 8px; font-size: 19px; font-weight: 800; line-height: 1.5; color: var(--ink); }
.headline-title a { color: inherit; }
.headline-title a:hover { color: var(--blue); }
.headline-summary { margin: 0 0 8px; font-size: 13px; color: #5b6b80; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.headline-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.headline-meta .cat-chip { color: var(--blue); font-weight: 700; }

/* ════════════════ 密集表格化文章流 ════════════════ */
.stream-table { font-size: 13px; }
.stream-table thead th {
  background: #f4f6f8; color: var(--muted); font-weight: 700; font-size: 12px;
  text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.stream-table thead th.col-cat  { width: 84px; }
.stream-table thead th.col-date { width: 108px; }
.stream-table thead th.col-views{ width: 76px; text-align: right; }
.stream-table tbody tr { border-bottom: 1px solid var(--line-2); }
.stream-table tbody tr:hover { background: #f8fafc; }
.stream-table tbody td { padding: 8px 12px; vertical-align: middle; }
.stream-table td.col-title { min-width: 0; }
.stream-title-link { color: var(--ink); font-size: 13.5px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stream-title-link:hover { color: var(--blue); text-decoration: underline; }
.stream-summary { font-size: 12px; color: #96a1af; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.cat-chip { display: inline-block; background: var(--tag-bg); color: var(--blue); font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 2px; white-space: nowrap; }
.col-date time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.col-views { text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.row-thumb { display: flex; align-items: center; gap: 8px; }
.row-thumb-img { width: 44px; height: 32px; object-fit: cover; border-radius: 2px; flex-shrink: 0; background: #e4e9ef; }

/* 热门标签块（list 页内嵌） */
.hot-tags-block { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fbfcfd; }
.hot-tags-block .label { font-size: 12px; color: var(--muted); font-weight: 700; flex-shrink: 0; }
.hot-tags-block a { display: inline-block; padding: 3px 10px; background: var(--tag-bg); color: var(--blue); font-size: 12px; border-radius: 2px; }
.hot-tags-block a:hover { background: var(--blue); color: #fff; }

/* 空状态 */
.empty-state { padding: 60px 20px; text-align: center; color: #b0bac6; font-size: 13px; }

/* ════════════════ 分页 ════════════════ */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; padding: 16px 0 4px; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); background: #fff; border-radius: 2px; font-size: 13px; color: var(--ink-2); }
.pager a:hover { border-color: var(--blue); color: var(--blue); }
.pager .current { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 700; }
.pager .dots { border: none; background: none; color: #b0bac6; }
.pager-info { text-align: center; font-size: 12px; color: #a9b3bf; margin: 4px 0 0; }

/* ════════════════ 详情页 ════════════════ */
.article-head { padding: 16px 16px 14px; border-bottom: 1px solid var(--line); }
.article-cat-chip { display: inline-block; background: var(--blue); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 2px; margin-bottom: 10px; }
.article-h1 { margin: 0 0 12px; font-size: 22px; font-weight: 800; line-height: 1.5; color: var(--ink); }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12.5px; color: var(--muted); }
.article-meta strong { color: var(--ink-2); font-weight: 600; }
.article-meta .share-bar { margin-left: auto; display: flex; gap: 6px; }
.share-btn { border: 1px solid var(--line); background: #fff; color: var(--ink-2); padding: 5px 12px; border-radius: 2px; font-size: 12px; cursor: pointer; }
.share-btn:hover { border-color: var(--blue); color: var(--blue); }

.article-body { padding: 18px 16px; }
.article-figure { margin: 0 0 20px; }
.article-figure img { border-radius: 3px; width: 100%; }

.prose { font-size: 15.5px; color: #202b38; }
.prose p { margin: 0 0 1.4em; line-height: 1.95; }
.prose h2 { font-size: 19px; font-weight: 800; margin: 1.8em 0 .7em; color: var(--ink); border-left: 4px solid var(--blue); padding-left: 10px; }
.prose h3 { font-size: 16px; font-weight: 700; margin: 1.5em 0 .6em; color: var(--ink); }
.prose blockquote { margin: 1.6em 0; padding: 12px 18px; background: #f4f6f8; border-left: 4px solid var(--blue); color: #56677d; font-size: 14px; }
.prose img { border-radius: 3px; margin: 8px 0; }
.prose a { color: var(--blue); text-decoration: underline; }

.tags-row { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tags-row .label { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.tags-row .tag-item { display: inline-block; padding: 3px 11px; background: var(--tag-bg); color: var(--blue); font-size: 12.5px; border-radius: 2px; }
.tags-row .tag-item:hover { background: var(--blue); color: #fff; }

/* 相关推荐 / 更多阅读：密集列表风格，复用 stream-table */
.block-title { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 14px; font-weight: 800; color: var(--ink); background: #f4f6f8; border-top: 1px solid var(--line); }
.block-title::before { content: ''; width: 4px; height: 14px; background: var(--blue); display: inline-block; }

/* ════════════════ FOOTER ════════════════ */
.site-footer { background: var(--ink); color: #9fb0c4; margin-top: 24px; }
.footer-cols { padding: 28px 0 18px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid #2a3446; }
.footer-col ul { display: flex; flex-direction: column; gap: 7px; }
.footer-col ul a { color: #8393a8; font-size: 12.5px; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2a3446; padding: 14px 0; text-align: center; }
.footer-bottom-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 8px; font-size: 12px; }
.footer-bottom-links a { color: #6d7d92; }
.footer-bottom-links a:hover { color: #cfd8e3; }
.footer-legal { font-size: 11.5px; color: #56637a; line-height: 1.9; }

/* ════════════════ 响应式 ════════════════ */
@media (max-width: 1024px) {
  .matrix { grid-template-columns: 200px 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .matrix { grid-template-columns: 1fr; }
  .side-col { position: static; order: 2; }
  .content-col { order: 1; }
  .dpc { display: none !important; }
  .dsp { display: flex !important; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .article-h1 { font-size: 18px; }
  .headline-title { font-size: 16px; }
  .stream-table thead { display: none; }
  .stream-table, .stream-table tbody, .stream-table tr, .stream-table td { display: block; width: 100%; }
  .stream-table tbody tr { padding: 10px 12px; }
  .stream-table tbody td { padding: 2px 0; }
  .col-views { text-align: left; }
  .col-views::before { content: '阅读 '; }
}
