/* ============================================================
   副业掘金 · 博客样式
   默认浅色主题（适配 light IDE 主题），支持深色切换
   ============================================================ */

:root {
  --primary: #6366f1;
  --primary-2: #8b5cf6;
  --primary-soft: #eef2ff;
  --accent: #ec4899;
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 2px 8px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .08), 0 10px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .1);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --header-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --primary: #818cf8;
  --primary-2: #a78bfa;
  --primary-soft: #1e1b4b;
  --bg: #0b1120;
  --bg-elevated: #111827;
  --bg-soft: #1e293b;
  --surface: #151e2e;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #64748b;
  --border: #1e293b;
  --border-strong: #334155;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }

.container { width: min(calc(100% - 40px), var(--maxw)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; flex-shrink: 0; }
.brand-icon { font-size: 1.55rem; line-height: 1; }
.brand-name {
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  font-size: .92rem; font-weight: 600; color: var(--text-2);
  padding: 8px 12px; border-radius: 8px; transition: all .18s ease; white-space: nowrap;
}
.nav-link:hover { color: var(--primary); background: var(--primary-soft); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); }

.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: none; background: transparent; border-radius: 10px; cursor: pointer;
  font-size: 1.1rem; transition: background .18s ease, transform .18s ease;
}
.icon-btn:hover { background: var(--bg-soft); transform: translateY(-1px); }
.menu-toggle { display: none; }

/* ============ Hero ============ */
.hero {
  position: relative; overflow: hidden;
  padding: 76px 0 84px;
  background:
    radial-gradient(1000px 500px at 85% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 60%),
    radial-gradient(700px 400px at 5% 40%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: .82rem; font-weight: 700; margin-bottom: 20px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.hero-text h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.15;
  margin: 0 0 20px; font-weight: 850; letter-spacing: -.02em;
}
.gradient-text {
  background: linear-gradient(120deg, var(--primary), var(--primary-2), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-text > p { font-size: 1.08rem; color: var(--text-2); max-width: 560px; margin: 0 0 28px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: .95rem;
  cursor: pointer; border: 1px solid transparent; transition: all .2s ease;
}
.btn-primary {
  color: #fff; background: linear-gradient(120deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 45%, transparent); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.hero-stats { display: flex; gap: 36px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.7rem; font-weight: 850; color: var(--text); line-height: 1.2; }
.hero-stats span { font-size: .85rem; color: var(--text-3); font-weight: 600; }

/* Hero 视觉卡片 */
.hero-visual { position: relative; height: 340px; display: grid; place-items: center; }
.hero-main-icon {
  font-size: 6rem; width: 190px; height: 190px; display: grid; place-items: center;
  border-radius: 44px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, var(--surface)), var(--surface));
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border);
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
.floating-card {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-md); z-index: 2;
}
.floating-card > span { font-size: 1.6rem; }
.floating-card div { display: flex; flex-direction: column; }
.floating-card small { font-size: .7rem; color: var(--text-3); }
.floating-card strong { font-size: 1.15rem; }
.fc1 { top: 24px; left: 0; animation: floaty 5s ease-in-out infinite .5s; }
.fc2 { top: 90px; right: 0; animation: floaty 5.5s ease-in-out infinite 1s; }
.fc3 { bottom: 30px; left: 20px; animation: floaty 6.5s ease-in-out infinite 1.5s; }

/* ============ Section ============ */
.section { padding-block: 60px 10px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 28px;
}
.section-label { font-size: .72rem; font-weight: 800; letter-spacing: .16em; color: var(--primary); }
.section-head h2 { font-size: 1.75rem; font-weight: 800; margin: 4px 0 0; letter-spacing: -.01em; }
.section-link { color: var(--primary); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

/* 精选卡片 */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hero-feature-card {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); transition: all .25s ease; position: relative; overflow: hidden;
}
.hero-feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--card-color), var(--primary-2)); opacity: .8;
}
.hero-feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--card-color); }
.hfc-emoji {
  font-size: 2.6rem; width: 62px; height: 62px; display: grid; place-items: center;
  border-radius: 14px; background: color-mix(in srgb, var(--card-color) 12%, transparent);
}
.hfc-cat { font-size: .78rem; font-weight: 700; color: var(--card-color); }
.hfc-content h3 { font-size: 1.12rem; margin: 6px 0 8px; line-height: 1.4; }
.hfc-content p { font-size: .88rem; color: var(--text-2); margin: 0 0 12px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hfc-more { font-size: .85rem; font-weight: 700; color: var(--primary); }

/* 文章卡片网格 */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all .25s ease;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.post-card-emoji {
  height: 132px; display: grid; place-items: center; font-size: 3.4rem;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--card-color) 22%, transparent), transparent 70%),
    linear-gradient(135deg, var(--bg-soft), var(--surface));
}
.post-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.post-card-meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--text-3); margin-bottom: 10px; }
.cat-badge {
  font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--cat-color, var(--primary)) 12%, transparent);
  color: var(--cat-color, var(--primary));
}
.dot { color: var(--border-strong); }
.post-card h3 { font-size: 1.08rem; line-height: 1.45; margin: 0 0 10px; }
.post-card h3 a:hover { color: var(--primary); }
.post-card > div > p { font-size: .87rem; color: var(--text-2); margin: 0 0 16px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.post-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; font-size: .8rem; }
.readtime { color: var(--text-3); }
.readmore { color: var(--primary); font-weight: 700; }
.readmore:hover { text-decoration: underline; }

/* 分类卡片 */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 22px 18px; text-align: center;
  box-shadow: var(--shadow-sm); transition: all .22s ease;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--cat-color); box-shadow: var(--shadow-md); }
.cat-icon {
  font-size: 2rem; width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center;
  border-radius: 14px; background: color-mix(in srgb, var(--cat-color) 12%, transparent);
}
.cat-card h3 { font-size: 1rem; margin: 0 0 6px; }
.cat-card p { font-size: .8rem; color: var(--text-2); margin: 0 0 10px; line-height: 1.55; }
.cat-count { font-size: .74rem; color: var(--cat-color); font-weight: 700; }

/* 两栏 panel */
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; padding-bottom: 60px; }
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.panel h3 { margin: 0 0 18px; font-size: 1.15rem; }
.popular-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.popular-list li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.popular-list li:last-child { border-bottom: none; }
.popular-list .rank {
  flex-shrink: 0; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .85rem;
}
.popular-list li:nth-child(1) .rank { background: #fef3c7; color: #d97706; }
.popular-list li:nth-child(2) .rank { background: #e2e8f0; color: #475569; }
.popular-list li:nth-child(3) .rank { background: #fee2e2; color: #b91c1c; }
.popular-list a { font-size: .92rem; font-weight: 600; line-height: 1.4; }
.popular-list a:hover { color: var(--primary); }
.tip-panel { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, var(--surface)), var(--surface)); }
.tip-panel p { color: var(--text-2); font-size: .93rem; margin-bottom: 20px; }

/* ============ 通用页头 ============ */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-3); padding: 28px 0 8px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-3); }
.page-header {
  text-align: center; padding: 40px 20px 36px; margin-bottom: 34px;
  background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--cat-color, var(--primary)) 12%, transparent), transparent 65%);
}
.page-icon { font-size: 3.4rem; margin-bottom: 12px; }
.page-header h1 { font-size: 2.2rem; margin: 0 0 12px; font-weight: 850; }
.page-header p { color: var(--text-2); max-width: 620px; margin: 0 auto 14px; }
.page-count { display: inline-block; font-size: .85rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 4px 14px; border-radius: 999px; }

/* ============ 文章详情 ============ */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding-block: 40px 70px; align-items: start; }
.article-main { min-width: 0; }
.article-header { padding-block: 16px 24px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.article-meta-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: .82rem; color: var(--text-3); margin-bottom: 16px; }
.article-header h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.25; margin: 0 0 16px; font-weight: 850; letter-spacing: -.01em; }
.article-excerpt { font-size: 1.08rem; color: var(--text-2); margin: 0 0 18px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: .76rem; font-weight: 600; color: var(--text-2); background: var(--bg-soft); padding: 4px 11px; border-radius: 999px; }
.article-hero {
  height: 220px; border-radius: var(--radius); display: grid; place-items: center; font-size: 5.5rem; margin-bottom: 32px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--card-color) 24%, transparent), transparent 68%), linear-gradient(135deg, var(--bg-soft), var(--surface));
  border: 1px solid var(--border);
}
.article-content { font-size: 1.02rem; color: var(--text); line-height: 1.9; }
.article-content h2 {
  font-size: 1.5rem; margin: 40px 0 16px; padding-top: 8px; font-weight: 800;
  scroll-margin-top: calc(var(--header-h) + 20px);
  display: flex; align-items: center; gap: 10px;
}
.article-content h2::before {
  content: ''; width: 4px; height: 22px; border-radius: 4px;
  background: linear-gradient(var(--primary), var(--primary-2)); flex-shrink: 0;
}
.article-content h3 { font-size: 1.2rem; margin: 30px 0 12px; font-weight: 750; }
.article-content p { margin: 0 0 18px; }
.article-content ul, .article-content ol { padding-left: 24px; margin: 0 0 20px; }
.article-content li { margin-bottom: 9px; }
.article-content li::marker { color: var(--primary); }
.article-content strong { color: var(--text); font-weight: 750; }
.article-content a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-content a:hover { opacity: .8; }
.article-content code { background: var(--bg-soft); padding: 2px 7px; border-radius: 6px; font-size: .9em; color: var(--accent); }
.article-content blockquote {
  margin: 24px 0; padding: 16px 22px; border-left: 4px solid var(--primary);
  background: var(--primary-soft); border-radius: 0 12px 12px 0; color: var(--text-2);
}
.article-content blockquote p { margin: 0 0 6px; }
.article-content blockquote cite { font-size: .85rem; color: var(--text-3); font-style: normal; }
.callout {
  margin: 26px 0; padding: 18px 22px; border-radius: 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d; color: #78350f;
}
html[data-theme="dark"] .callout { background: linear-gradient(135deg, #451a03, #78350f); border-color: #92400e; color: #fde68a; }
.callout-title { font-weight: 800; margin-bottom: 6px; }
.callout p { margin: 0; font-size: .95rem; }
.article-figure { margin: 26px 0; text-align: center; }
.article-figure img {
  display: block; max-width: 100%; height: auto; margin: 0 auto;
  border-radius: 12px; border: 1px solid var(--border);
  box-shadow: 0 6px 22px rgba(0,0,0,.08);
  background: var(--bg-soft);
}
.article-figure figcaption { margin-top: 10px; font-size: .88rem; color: var(--text-3); }
html[data-theme="dark"] .article-figure img { box-shadow: 0 6px 22px rgba(0,0,0,.3); }
.table-wrap { overflow-x: auto; margin: 24px 0; border-radius: 12px; border: 1px solid var(--border); }
.article-content table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.article-content th, .article-content td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.article-content th { background: var(--bg-soft); font-weight: 700; }
.article-content tr:last-child td { border-bottom: none; }

.article-share { display: flex; align-items: center; gap: 10px; margin: 36px 0; padding-top: 24px; border-top: 1px solid var(--border); font-size: .9rem; color: var(--text-2); }
.share-btn {
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  font-weight: 700; font-size: 1rem; transition: all .18s ease;
}
.share-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.post-nav-item { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: all .2s ease; }
.post-nav-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.post-nav-item span { font-size: .78rem; color: var(--primary); font-weight: 700; }
.post-nav-item strong { font-size: .9rem; line-height: 1.4; }
.post-nav-item.next { text-align: right; }

/* 侧边栏 */
.article-sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 18px; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; }
.toc-title { font-weight: 800; font-size: .95rem; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 8px; }
.toc a { font-size: .85rem; color: var(--text-2); line-height: 1.5; display: block; padding-left: 10px; border-left: 2px solid var(--border); }
.toc a:hover { color: var(--primary); border-color: var(--primary); }
.sidebar-card { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, var(--surface)), var(--surface)); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; }
.sidebar-card h4 { margin: 0 0 10px; font-size: 1rem; }
.sidebar-card p { font-size: .85rem; color: var(--text-2); margin-bottom: 12px; }
.sidebar-card a { font-size: .85rem; color: var(--primary); font-weight: 700; }

/* 筛选栏 */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: .86rem; font-weight: 600; cursor: pointer; transition: all .18s ease;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: linear-gradient(120deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; }

/* 静态页 */
.static-page { max-width: 780px; margin-inline: auto; padding-bottom: 70px; }

/* 404 */
.not-found { text-align: center; padding: 100px 20px 120px; }
.nf-emoji { font-size: 4.5rem; }
.not-found h1 { font-size: 6rem; margin: 0; line-height: 1; background: linear-gradient(120deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found h2 { font-size: 1.8rem; margin: 10px 0; }
.not-found p { color: var(--text-2); margin-bottom: 26px; }

/* ============ Footer ============ */
.site-footer { background: var(--bg-elevated); border-top: 1px solid var(--border); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; padding-block: 54px 40px; }
.footer-brand p { color: var(--text-2); font-size: .9rem; margin-top: 14px; max-width: 260px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: .95rem; margin: 0 0 6px; }
.footer-col a { font-size: .87rem; color: var(--text-2); }
.footer-col a:hover { color: var(--primary); }
.subscribe-col p { font-size: .85rem; color: var(--text-2); margin: 0; }
.subscribe-form { display: flex; gap: 6px; margin-top: 6px; }
.subscribe-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--text); font-size: .85rem; }
.subscribe-form button { padding: 10px 14px; border: none; border-radius: 9px; background: linear-gradient(120deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-3); }
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--primary); }

/* 返回顶部 */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--primary); font-size: 1.3rem; cursor: pointer;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transition: all .25s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); }

/* ============ 搜索弹层 ============ */
.search-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh;
}
.search-overlay[hidden] { display: none; }
.search-box { width: min(calc(100% - 32px), 620px); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.search-input-wrap { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.search-input-wrap input { flex: 1; border: none; background: transparent; color: var(--text); font-size: 1.05rem; outline: none; }
.search-input-wrap button { border: none; background: transparent; color: var(--text-3); font-size: 1.1rem; cursor: pointer; }
.search-results { max-height: 55vh; overflow-y: auto; padding: 8px; }
.search-result-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; }
.search-result-item:hover { background: var(--bg-soft); }
.search-result-item .sri-emoji { font-size: 1.6rem; }
.search-result-item .sri-title { font-weight: 700; font-size: .95rem; }
.search-result-item .sri-excerpt { font-size: .8rem; color: var(--text-3); display: block; margin-top: 2px; }
.search-empty { text-align: center; padding: 40px; color: var(--text-3); }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg-elevated); padding: 12px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
  .main-nav.open { display: flex; }
  .nav-link { padding: 12px; }
  .menu-toggle { display: grid; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}

@media (max-width: 720px) {
  .hero { padding: 52px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { display: none; }
  .hero-stats { gap: 22px; }
  .feature-grid, .post-grid, .cat-grid, .two-col { grid-template-columns: 1fr; }
  .section { padding-block: 42px 4px; }
  .post-nav { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand, .subscribe-col { grid-column: 1 / -1; }
  .article-header h1 { font-size: 1.7rem; }
  .article-content h2 { font-size: 1.3rem; }
  .hero-text h1 { font-size: 2.2rem; }
}

@media (max-width: 480px) {
  .container { width: min(calc(100% - 28px), var(--maxw)); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats strong { font-size: 1.4rem; }
}

/* 打印 */
@media print {
  .site-header, .site-footer, .article-sidebar, .back-to-top, .article-share, .search-overlay { display: none !important; }
  .article-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   导航站扩展：避雷 / 平台 / 专栏
   ============================================================ */

/* 提示框 */
.notice-box { border-radius: var(--radius-sm); padding: 18px 20px; margin: 22px 0; border: 1px solid var(--border); background: var(--bg-soft); }
.notice-box strong { display: block; margin-bottom: 6px; font-size: 1.02rem; }
.notice-box p { margin: 0; color: var(--text-2); font-size: .93rem; line-height: 1.7; }
.notice-warn { border-left: 4px solid #f59e0b; background: rgba(245, 158, 11, .08); }
.notice-warn strong { color: #b45309; }
.notice-danger { border-left: 4px solid #ef4444; background: rgba(239, 68, 68, .08); }
.notice-danger strong { color: #dc2626; }
html[data-theme="dark"] .notice-warn strong { color: #fbbf24; }
html[data-theme="dark"] .notice-danger strong { color: #f87171; }

/* 页面 hero */
.page-hero { text-align: center; padding: 34px 16px 18px; }
.page-hero .page-icon { font-size: 3rem; margin-bottom: 10px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 12px; letter-spacing: -.02em; }
.page-hero p { max-width: 720px; margin: 0 auto; color: var(--text-2); line-height: 1.75; font-size: 1rem; }
.page-hero-sm { padding: 22px 16px 8px; }
.page-sub { color: var(--text-3); font-size: .92rem; margin-top: 8px; }

/* 首页 — 最新避雷 */
.section-alert { background: linear-gradient(180deg, rgba(239, 68, 68, .05), transparent); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.alert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.alert-card { display: flex; align-items: flex-start; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--scam-color, #ef4444); text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.alert-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.alert-icon { font-size: 2rem; flex-shrink: 0; }
.alert-body { flex: 1; min-width: 0; }
.alert-meta { font-size: .72rem; color: var(--scam-color, #ef4444); font-weight: 700; letter-spacing: .04em; }
.alert-body h3 { font-size: 1.05rem; margin: 6px 0; line-height: 1.4; }
.alert-body p { font-size: .86rem; color: var(--text-2); line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alert-arrow { color: var(--text-3); font-size: 1.2rem; flex-shrink: 0; }
.alert-rule { margin-top: 18px; }

/* 首页 — 分类导航 */
.home-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.home-cat-card { display: block; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden; }
.home-cat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat-color, var(--primary)); }
.home-cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--cat-color, var(--primary)); }
.hcc-icon { font-size: 2rem; margin-bottom: 10px; }
.home-cat-card h3 { font-size: 1.12rem; margin: 0 0 8px; }
.home-cat-card p { font-size: .88rem; color: var(--text-2); line-height: 1.65; margin: 0 0 14px; }
.hcc-count { font-size: .82rem; color: var(--cat-color, var(--primary)); font-weight: 700; }

/* 首页 — 博客专栏 */
.section-blog { background: var(--bg-soft); border-block: 1px solid var(--border); }
.home-col-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.home-col-card { display: flex; align-items: flex-start; gap: 12px; padding: 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.home-col-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.hcol-icon { font-size: 1.6rem; flex-shrink: 0; }
.hcol-text { flex: 1; min-width: 0; }
.hcol-text h3 { font-size: 1rem; margin: 0 0 5px; color: var(--cat-color, var(--primary)); }
.hcol-text p { font-size: .82rem; color: var(--text-2); line-height: 1.55; margin: 0; }
.hcol-count { font-size: .78rem; color: var(--text-3); white-space: nowrap; }
.latest-wrap { margin-top: 36px; }
.subhead { font-size: 1.15rem; margin-bottom: 16px; }

/* 首页 — 投稿 CTA */
.section-submit { padding-block: 48px; }
.submit-cta { display: flex; align-items: center; gap: 22px; padding: 30px; border-radius: var(--radius); background: linear-gradient(135deg, var(--primary-soft), transparent); border: 1px solid var(--border); }
.submit-icon { font-size: 2.6rem; flex-shrink: 0; }
.submit-text { flex: 1; }
.submit-text h2 { font-size: 1.35rem; margin: 0 0 8px; }
.submit-text p { font-size: .9rem; color: var(--text-2); line-height: 1.65; margin: 0; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }

/* 平台导航总览卡片（复用 home-cat-card 样式，这里补间距） */
.nav-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-top: 8px; }
.nav-cat-card { display: block; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden; }
.nav-cat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat-color, var(--primary)); }
.nav-cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--cat-color, var(--primary)); }
.nc-icon { font-size: 2rem; margin-bottom: 10px; }
.nav-cat-card h3 { font-size: 1.12rem; margin: 0 0 8px; }
.nav-cat-card p { font-size: .88rem; color: var(--text-2); line-height: 1.65; margin: 0 0 14px; }
.nc-count { font-size: .82rem; color: var(--cat-color, var(--primary)); font-weight: 700; }

/* 平台分类页 — 平台卡片 */
.platform-list { display: grid; gap: 18px; margin-top: 10px; }
.platform-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.pc-head h3 { font-size: 1.25rem; margin: 0 0 4px; }
.pc-type { font-size: .82rem; color: var(--text-3); }
.pc-level { font-size: .76rem; padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--cat-color, var(--primary)); font-weight: 700; white-space: nowrap; }
.pc-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 18px 0; }
.pc-specs > div { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.pc-specs span { display: block; font-size: .75rem; color: var(--text-3); margin-bottom: 4px; }
.pc-specs strong { font-size: .9rem; color: var(--text); }
.pc-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pc-col h4 { font-size: .92rem; margin: 0 0 10px; }
.pc-col ul { list-style: none; padding: 0; margin: 0; }
.pc-col li { position: relative; padding-left: 18px; margin-bottom: 7px; font-size: .86rem; line-height: 1.6; color: var(--text-2); }
.pc-col li::before { content: '✓'; position: absolute; left: 0; color: #10b981; font-weight: 700; }
.pc-col.pc-cons li::before { content: '!'; color: #ef4444; }
@media (max-width: 620px) { .pc-pairs { grid-template-columns: 1fr; } .pc-head { flex-direction: column; } }

/* 骗局列表 */
.scam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 8px; }
.scam-card { display: flex; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--scam-color, #ef4444); border-radius: var(--radius-sm); text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.scam-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.sc-icon { font-size: 1.8rem; flex-shrink: 0; }
.sc-body { flex: 1; min-width: 0; }
.sc-meta { display: flex; gap: 10px; align-items: center; font-size: .75rem; color: var(--text-3); }
.sc-tag { background: rgba(239, 68, 68, .12); color: #dc2626; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.scam-card h3 { font-size: 1.05rem; margin: 8px 0 6px; line-height: 1.4; }
.scam-card p { font-size: .86rem; color: var(--text-2); line-height: 1.6; margin: 0 0 10px; }
.sc-more { font-size: .82rem; color: var(--scam-color, #ef4444); font-weight: 700; }

/* 骗局详情 */
.scam-detail .page-header h1 { color: var(--scam-color, #ef4444); }
.scam-steps { list-style: none; padding: 0; counter-reset: none; }
.scam-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--border); line-height: 1.65; color: var(--text-2); }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--scam-color, #ef4444); color: #fff; font-size: .8rem; font-weight: 700; }
.red-flags { list-style: none; padding: 0; }
.red-flags li { position: relative; padding: 10px 14px 10px 38px; margin-bottom: 8px; background: rgba(239, 68, 68, .07); border: 1px solid rgba(239, 68, 68, .2); border-radius: var(--radius-sm); color: #b91c1c; font-weight: 600; font-size: .9rem; line-height: 1.6; }
html[data-theme="dark"] .red-flags li { color: #fca5a5; }
.red-flags li::before { content: '🚩'; position: absolute; left: 12px; top: 10px; }

/* 专栏其他链接 */
.column-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.column-links a { padding: 8px 14px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); text-decoration: none; color: var(--text-2); font-size: .86rem; }
.column-links a:hover { border-color: var(--primary); color: var(--primary); }

/* 投稿页 */
.muted { color: var(--text-3); font-size: .88rem; }
code { background: var(--bg-soft); padding: 2px 8px; border-radius: 6px; font-size: .9em; }
.static-page .btn-lg { display: inline-block; margin-top: 12px; }

/* ============================================================
   方案C · 门户资讯风格（顶栏 + 搜索头 + 紧凑列表 + 右侧栏）
   ============================================================ */

/* ---- 顶部彩色导航条 ---- */
.topbar { background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.top-nav { display: flex; align-items: center; gap: 24px; }
.top-link { font-size: .86rem; font-weight: 600; position: relative; padding: 4px 0; white-space: nowrap; }
.top-link.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 2px; background: currentColor; }
.top-link.c-blue { color: #2f7cf6; }
.top-link.c-green { color: #16a06a; }
.top-link.c-purple { color: #8358e8; }
.top-link.c-red { color: #e5484d; }
.top-link.c-orange { color: #ef8b16; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.top-login { font-size: .82rem; color: var(--text-3); }
.theme-switch { width: 38px; height: 20px; border-radius: 20px; border: none; cursor: pointer; padding: 0; position: relative; background: linear-gradient(90deg, #3aa0ff, #22b573); transition: background .2s; }
.theme-switch .ts-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .22s ease; }
html[data-theme="dark"] .theme-switch { background: linear-gradient(90deg, #4338ca, #6d28d9); }
html[data-theme="dark"] .theme-switch .ts-knob { transform: translateX(18px); }

/* ---- 搜索头 ---- */
.site-header { top: 40px; }
.header-search { display: flex; flex: 1; max-width: 560px; margin-left: 24px; gap: 8px; }
.header-search input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--border); border-radius: 7px; padding: 0 14px; font-size: .88rem; background: var(--surface); color: var(--text); outline: none; }
.header-search input::placeholder { color: var(--text-3); }
.header-search input:focus { border-color: var(--primary); }
.header-search button { height: 38px; padding: 0 18px; border: none; border-radius: 7px; background: #3f454e; color: #fff; font-size: .86rem; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.header-search button:hover { background: #2f3540; }
html[data-theme="dark"] .header-search button { background: #4b5568; }

/* ---- 门户深色横幅 ---- */
.portal-banner { padding: 14px 0 0; }
.portal-banner .container h1 { margin: 0; height: 52px; border-radius: 8px; background: repeating-linear-gradient(115deg, #111827 0 14px, #162033 14px 28px); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.55rem; font-weight: 900; letter-spacing: 2px; text-shadow: 0 2px 6px rgba(0,0,0,.5); overflow: hidden; }
.portal-banner .container h1 em { font-style: normal; color: #ffcf5c; }
@media (max-width: 620px) { .portal-banner .container h1 { font-size: 1.05rem; letter-spacing: 1px; } }

/* ---- 红色 Tab ---- */
.portal-tabs { display: flex; gap: 0; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; margin: 12px 0 14px; overflow-x: auto; }
.portal-tabs a { padding: 12px 20px; font-size: .92rem; color: var(--text-2); position: relative; white-space: nowrap; }
.portal-tabs a:hover { color: var(--primary); }
.portal-tabs a.on { color: #e5484d; font-weight: 700; }
.portal-tabs a.on::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: #e5484d; }

/* ---- 两栏布局 ---- */
.portal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; margin-bottom: 20px; }
.portal-main { min-width: 0; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }

/* ---- 紧凑文章行 ---- */
.portal-row { display: flex; gap: 14px; padding: 15px 16px; border-bottom: 1px solid var(--border); }
.portal-row:last-child { border-bottom: none; }
.portal-row:hover { background: var(--bg-soft); }
.pr-thumb { width: 124px; height: 88px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--bg-soft); }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pr-body { flex: 1; min-width: 0; }
.pr-title { display: flex; gap: 8px; align-items: flex-start; }
.pr-tag { flex-shrink: 0; font-size: .7rem; color: #fff; border-radius: 3px; padding: 1px 6px; line-height: 1.7; margin-top: 2px; background: #e5484d; }
.pr-tag.o { background: #f08c00; }
.pr-title h3 { font-size: 1rem; font-weight: 600; line-height: 1.45; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.pr-title h3 a:hover { color: var(--primary); }
.pr-excerpt { font-size: .8rem; color: var(--text-3); margin: 7px 0 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-meta { display: flex; align-items: center; gap: 10px; font-size: .72rem; color: var(--text-3); flex-wrap: wrap; }
.pr-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
@media (max-width: 620px) { .pr-thumb { width: 92px; height: 70px; } .portal-row { padding: 12px; gap: 10px; } .pr-title h3 { font-size: .9rem; } .pr-meta span:nth-child(n+5) { display: none; } }

/* ---- 右侧栏 ---- */
.portal-side { display: flex; flex-direction: column; gap: 12px; }
.ps-box { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.ps-box h4 { font-size: .88rem; font-weight: 700; margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 7px; }
.ps-bar { width: 3px; height: 13px; border-radius: 2px; background: #2f7cf6; }
.ps-dots { display: flex; gap: 5px; margin-left: auto; }
.ps-dots i { width: 7px; height: 7px; border-radius: 50%; background: #ff6b6b; }
.ps-dots i:nth-child(2) { background: #ffc107; }
.ps-dots i:nth-child(3) { background: #4caf50; }
.ps-inner { padding: 13px 14px; }
.ps-inner.ps-pad-sm { padding: 6px 14px; }
.ps-search { display: flex; height: 32px; }
.ps-search span { background: #2f7cf6; color: #fff; font-size: .7rem; display: flex; align-items: center; padding: 0 8px; border-radius: 5px 0 0 5px; white-space: nowrap; }
.ps-search input { flex: 1; min-width: 0; border: 1px solid var(--border); border-left: none; border-right: none; padding: 0 8px; font-size: .78rem; background: var(--surface); color: var(--text); outline: none; }
.ps-search button { width: 50px; flex-shrink: 0; border: none; background: #2f7cf6; color: #fff; font-size: .76rem; border-radius: 0 5px 5px 0; cursor: pointer; white-space: nowrap; }
.ps-rank { list-style: none; margin: 0; padding: 0; }
.ps-rank li { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.ps-rank li:last-child { border-bottom: none; }
.rank-no { font-size: .98rem; font-weight: 800; font-style: italic; width: 20px; flex-shrink: 0; line-height: 1.2; }
.rank-no.n1 { color: #e5484d; } .rank-no.n2 { color: #f59e0b; } .rank-no.n3 { color: #16a06a; }
.rank-no.n4 { color: #8358e8; } .rank-no.n5 { color: #2f7cf6; } .rank-no.n6 { color: #ec4899; } .rank-no.n7 { color: #14b8a6; }
.ps-rank p { font-size: .78rem; color: var(--text-2); line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ps-rank p a:hover { color: var(--primary); }
.ps-tags { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.ps-tags a { font-size: .78rem; }
.ps-tags a::before { content: '#'; margin-right: 1px; opacity: .7; }
.ps-tags a.a1 { color: #2f7cf6; } .ps-tags a.a2 { color: #16a06a; } .ps-tags a.a3 { color: #e5484d; }
.ps-tags a.a4 { color: #8358e8; } .ps-tags a.a5 { color: #ef8b16; } .ps-tags a.a6 { color: #ec4899; }
.ps-arch a { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-2); padding: 6px 0; border-bottom: 1px dashed var(--border); }
.ps-arch a:last-child { border-bottom: none; }
.ps-arch a span { color: var(--text-3); }
@media (max-width: 900px) { .portal-layout { grid-template-columns: 1fr; } .portal-side { display: grid; grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .portal-side { grid-template-columns: 1fr; } }

/* ---- 移动端顶栏/搜索头 ---- */
@media (max-width: 720px) {
  .top-nav { gap: 14px; overflow-x: auto; }
  .top-link { font-size: .8rem; }
  .top-login { display: none; }
  .header-search { display: none; }
  .site-header { top: 40px; }
}

/* 门户内容页主区（分类/平台/专栏/投稿/静态页套C模板） */
.portal-content { padding: 20px 22px 28px; }
.portal-content .page-header { margin-top: 0; padding-top: 4px; }
.portal-content .page-hero { padding: 6px 0 18px; text-align: left; }
.portal-content .page-hero .page-icon { font-size: 2.4rem; }
.portal-content .page-hero h1 { font-size: 1.6rem; }
.portal-content .page-hero p { margin-left: 0; }
.portal-content .breadcrumb { margin-bottom: 14px; }
.portal-content .nav-cat-grid, .portal-content .scam-grid, .portal-content .home-cat-grid { grid-template-columns: 1fr; }
.portal-content .notice-box { margin: 16px 0; }
.portal-content .filter-bar { margin: 16px 0; }
.portal-content .static-page { max-width: none; }
.portal-content .not-found { text-align: center; padding: 40px 10px; }

/* 门户内容页主区（分类/平台/专栏/投稿/静态页套C模板） */
.portal-content { padding: 20px 22px 28px; }
.portal-content .page-header { margin-top: 0; padding-top: 4px; }
.portal-content .page-hero { padding: 6px 0 18px; text-align: left; }
.portal-content .page-hero .page-icon { font-size: 2.4rem; }
.portal-content .page-hero h1 { font-size: 1.6rem; }
.portal-content .page-hero p { margin-left: 0; }
.portal-content .breadcrumb { margin-bottom: 14px; }
.portal-content .nav-cat-grid, .portal-content .scam-grid, .portal-content .home-cat-grid { grid-template-columns: 1fr; }
.portal-content .notice-box { margin: 16px 0; }
.portal-content .filter-bar { margin: 16px 0; }
.portal-content .static-page { max-width: none; }
.portal-content .not-found { text-align: center; padding: 40px 10px; }

/* ============================================================
   首页四Tab切换面板（最新文章/平台导航/副业博客/投稿平台）
   ============================================================ */
.portal-main-panels { padding: 4px 0; }
.portal-panel { padding: 0; }
.portal-panel[hidden] { display: none; }
.portal-panel .portal-row:first-child { border-top: none; }

/* 面板底部"进入XX"更多链接 */
.panel-more { padding: 16px; text-align: center; border-top: 1px solid var(--border); }
.panel-more a { display: inline-block; font-size: .86rem; font-weight: 600; color: var(--primary); padding: 8px 20px; border: 1px solid var(--primary); border-radius: 6px; }
.panel-more a:hover { background: var(--primary); color: #fff; }

/* 平台分类色块缩略图 */
.pr-thumb-icon { display: flex; align-items: center; justify-content: center; font-size: 2.6rem; text-decoration: none; }
.pr-thumb-icon:hover { filter: brightness(1.08); }

/* 专栏分组标题 */
.portal-group-title { display: flex; align-items: center; gap: 8px; padding: 11px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--border); font-weight: 700; font-size: .92rem; }
.portal-group-title:not(:first-child) { border-top: 1px solid var(--border); }
.portal-group-title .pgt-icon { font-size: 1.15rem; }
.portal-group-title .pgt-more { margin-left: auto; font-size: .78rem; font-weight: 500; color: var(--primary); }

/* 投稿步骤行 */
.portal-row-step { gap: 14px; align-items: center; }
.pr-step-no { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; font-weight: 800; font-size: .95rem; display: flex; align-items: center; justify-content: center; }

/* 投稿引导头 */
.portal-submit-hero { display: flex; align-items: center; gap: 14px; padding: 20px 18px; background: linear-gradient(120deg,#eef2ff,#fdf2f8); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
html[data-theme="dark"] .portal-submit-hero { background: linear-gradient(120deg,#1e2233,#2a1f33); }
.portal-submit-hero .psh-icon { font-size: 2.4rem; }
.portal-submit-hero .psh-text { flex: 1; min-width: 180px; }
.portal-submit-hero .psh-text h2 { font-size: 1.1rem; margin: 0 0 5px; }
.portal-submit-hero .psh-text p { font-size: .82rem; color: var(--text-3); margin: 0; }
.portal-submit-hero .btn { white-space: nowrap; }
.portal-submit-mail { padding: 14px 18px; font-size: .82rem; color: var(--text-3); }
.portal-submit-mail a { color: var(--primary); }

/* ============================================================
   首页四Tab切换面板（最新文章/平台导航/副业博客/投稿平台）
   ============================================================ */
.portal-main-panels { padding: 4px 0; }
.portal-panel { padding: 0; }
.portal-panel[hidden] { display: none; }
.portal-panel .portal-row:first-child { border-top: none; }

/* 面板底部"进入XX"更多链接 */
.panel-more { padding: 16px; text-align: center; border-top: 1px solid var(--border); }
.panel-more a { display: inline-block; font-size: .86rem; font-weight: 600; color: var(--primary); padding: 8px 20px; border: 1px solid var(--primary); border-radius: 6px; }
.panel-more a:hover { background: var(--primary); color: #fff; }

/* 平台分类色块缩略图 */
.pr-thumb-icon { display: flex; align-items: center; justify-content: center; font-size: 2.6rem; text-decoration: none; }
.pr-thumb-icon:hover { filter: brightness(1.08); }

/* 专栏分组标题 */
.portal-group-title { display: flex; align-items: center; gap: 8px; padding: 11px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--border); font-weight: 700; font-size: .92rem; }
.portal-group-title:not(:first-child) { border-top: 1px solid var(--border); }
.portal-group-title .pgt-icon { font-size: 1.15rem; }
.portal-group-title .pgt-more { margin-left: auto; font-size: .78rem; font-weight: 500; color: var(--primary); }

/* 投稿步骤行 */
.portal-row-step { gap: 14px; align-items: center; }
.pr-step-no { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; font-weight: 800; font-size: .95rem; display: flex; align-items: center; justify-content: center; }

/* 投稿引导头 */
.portal-submit-hero { display: flex; align-items: center; gap: 14px; padding: 20px 18px; background: linear-gradient(120deg,#eef2ff,#fdf2f8); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
html[data-theme="dark"] .portal-submit-hero { background: linear-gradient(120deg,#1e2233,#2a1f33); }
.portal-submit-hero .psh-icon { font-size: 2.4rem; }
.portal-submit-hero .psh-text { flex: 1; min-width: 180px; }
.portal-submit-hero .psh-text h2 { font-size: 1.1rem; margin: 0 0 5px; }
.portal-submit-hero .psh-text p { font-size: .82rem; color: var(--text-3); margin: 0; }
.portal-submit-hero .btn { white-space: nowrap; }
.portal-submit-mail { padding: 14px 18px; font-size: .82rem; color: var(--text-3); }
.portal-submit-mail a { color: var(--primary); }
