/* 社保基数指南 · 共享样式（叠加在 ../style.css 之上）
   主色沿用个税计算器的紫色 --accent:#5a4b8a */

:root { --accent: #5a4b8a; --accent-soft: #efedf6; }

/* 阅读进度条 */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60;
  background: linear-gradient(90deg, #4a3d75, #5a4b8a 55%, #2f6b4f); transition: width .1s linear; }

/* 顶部导航补充 */
.topbar .nav { display: inline-flex; align-items: center; gap: 4px; }
.topbar .nav a { font-size: 13px; color: var(--muted); padding: 7px 13px; border-radius: 8px; letter-spacing: .02em; transition: all .18s; }
.topbar .nav a:hover { color: var(--ink); background: #f0efeb; text-decoration: none; }
.topbar .nav a.current { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.brand a { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand a:hover { text-decoration: none; }

/* 面包屑 */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); margin: 0 0 26px; letter-spacing: .02em; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }
.crumb .sep { color: var(--faint); opacity: .7; }
.crumb .here { color: var(--ink); font-weight: 500; }

/* 文章头 */
.guide-head { margin: 0 0 30px; }
.kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em;
  color: var(--accent); background: var(--accent-soft); padding: 5px 13px; border-radius: 999px; margin-bottom: 18px; }
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.guide-head h1 { font-size: clamp(27px, 4.4vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.18; margin: 0 0 16px; }
.guide-head .lead { color: var(--muted); font-size: 16px; margin: 0; max-width: 64ch; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 20px; font-size: 12.5px; color: var(--faint); }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.meta-row .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }

/* 直接答案框（精选摘要 / GEO 可引用） */
.answer-box { position: relative; background: linear-gradient(180deg, #f5f3fa, #efedf6);
  border: 1px solid #ddd7ee; border-left: 4px solid var(--accent); border-radius: 14px; padding: 24px 26px; margin: 0 0 28px; }
.answer-box .ab-label { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--accent); margin-bottom: 12px; }
.answer-box .ab-label svg { width: 15px; height: 15px; }
.answer-box p { margin: 0; font-size: 15.5px; line-height: 1.85; color: var(--ink); }
.answer-box p + p { margin-top: 10px; }
.answer-box strong { color: var(--accent); font-weight: 600; }

/* 正文排版 */
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 216px; gap: 44px; align-items: start; }
.prose { min-width: 0; }
.prose > section { margin-bottom: 34px; scroll-margin-top: 92px; }
.prose h2 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 14px; line-height: 1.3;
  display: flex; align-items: baseline; gap: 11px; }
.prose h2 .idx { font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .04em; flex: 0 0 auto; }
.prose h3 { font-size: 16px; font-weight: 600; margin: 24px 0 10px; }
.prose p { margin: 0 0 14px; font-size: 15px; line-height: 1.9; color: #2a2d33; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 7px 0; font-size: 15px; line-height: 1.85; color: #2a2d33; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { font-weight: 500; }
.src-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.src-list { margin: 0; padding-left: 22px; }
.src-list li { margin: 8px 0; font-size: 14px; line-height: 1.8; color: #2a2d33; }
.src-list li::marker { color: var(--accent); }

/* 数据表（静态、可引用、无滚动高度限制） */
.data-wrap { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin: 0 0 18px; }
.data-wrap .cap { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; background: #fbfaf8; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.data-wrap .cap b { color: var(--ink); font-weight: 600; font-size: 13px; }
.data-scroll { overflow-x: auto; }
.prose table, .data-wrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.prose th, .prose td, .data-wrap th, .data-wrap td { padding: 11px 16px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.prose th:first-child, .prose td:first-child, .data-wrap th:first-child, .data-wrap td:first-child { text-align: left; }
.prose thead th, .data-wrap thead th { background: #fff; color: var(--muted); font-weight: 600; letter-spacing: .03em; font-size: 12px; }
.prose tbody tr:last-child td, .data-wrap tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover, .data-wrap tbody tr:hover { background: var(--accent-soft); }
.prose td.hl, .data-wrap td.hl { color: var(--accent); font-weight: 600; }

/* 提示 / 警告块 */
.tip, .warn-box { border-radius: 12px; padding: 15px 18px; font-size: 13.5px; line-height: 1.8; margin: 0 0 18px; }
.tip { background: #eef5f0; border: 1px solid #d3e4d8; color: #2c5a41; }
.tip b { color: var(--good); }
.warn-box { background: #fbf7f0; border: 1px solid #efe3d2; color: #8a5a26; }
.warn-box b { color: var(--warn); }

/* 内嵌计算器 */
.mini-calc { border: 1px solid var(--border); border-radius: 14px; padding: 22px 22px 6px; background: #fff; margin: 0 0 20px; }
.mini-calc .table-wrap { max-height: none; }
.mini-calc .note { margin-top: 16px; }

/* 计算器 CTA */
.cta-card { position: relative; overflow: hidden; border-radius: 16px; padding: 30px 32px; margin: 8px 0 34px;
  background: linear-gradient(135deg, #413466 0%, #5a4b8a 48%, #6b58a3 100%); color: #fff;
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap; box-shadow: 0 18px 44px -22px rgba(90, 75, 138, .7); }
.cta-card::after { content: ""; position: absolute; right: -50px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 68%); pointer-events: none; }
.cta-card .cta-txt { flex: 1 1 280px; min-width: 0; position: relative; z-index: 1; }
.cta-card h3 { margin: 0 0 7px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.cta-card p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,.82); line-height: 1.7; }
.cta-card .cta-btn { position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--accent); font-weight: 600; font-size: 14px; padding: 13px 24px; border-radius: 10px;
  transition: transform .18s, box-shadow .18s; box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); }
.cta-card .cta-btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 12px 26px -10px rgba(0,0,0,.55); }

/* 相关指南 */
.related { margin: 0 0 30px; }
.related h2 { font-size: 16px; font-weight: 600; margin: 0 0 16px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rel-card { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 17px 19px; background: #fff;
  transition: border-color .18s, transform .18s, box-shadow .18s; }
.rel-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; box-shadow: 0 12px 28px -18px rgba(26,28,32,.4); }
.rel-card .rc-q { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5; margin-bottom: 6px; }
.rel-card .rc-d { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.rel-card .rc-arrow { color: var(--accent); font-size: 12px; font-weight: 600; margin-top: 9px; display: inline-flex; align-items: center; gap: 5px; }

/* 目录 TOC */
.toc { position: sticky; top: 92px; }
.toc .toc-title { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; color: var(--faint); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li { margin: 0; }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; font-size: 13px; color: var(--muted);
  border-left: 2px solid transparent; line-height: 1.5; transition: all .16s; }
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc .toc-cta { margin-top: 20px; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); padding: 9px 15px; border-radius: 9px; }
.toc .toc-cta:hover { text-decoration: none; background: #e5e0f2; }

/* 复制 permalink 按钮 */
.copy-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 12px; font-family: inherit; transition: all .18s; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 指南中心 hub ===== */
.hub-hero { position: relative; overflow: hidden; border-radius: 20px; padding: 52px 48px; margin: 0 0 30px;
  background: linear-gradient(135deg, #413466 0%, #5a4b8a 46%, #6f5da8 100%); color: #fff; }
.hub-hero::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: radial-gradient(600px 300px at 88% -10%, rgba(160,130,220,.4), transparent 60%),
              radial-gradient(500px 280px at 8% 110%, rgba(47,107,79,.35), transparent 60%); }
.hub-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hub-hero .hh-in { position: relative; z-index: 1; max-width: 680px; }
.hub-hero .hh-kick { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .16em;
  color: rgba(255,255,255,.9); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.hub-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 600; letter-spacing: -.025em; line-height: 1.12; margin: 0 0 16px; }
.hub-hero p { font-size: 16px; line-height: 1.8; color: rgba(255,255,255,.85); margin: 0 0 28px; max-width: 58ch; }
.hub-hero .hh-actions { display: flex; gap: 13px; flex-wrap: wrap; }
.hh-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: transform .18s, box-shadow .18s; }
.hh-btn.primary { background: #fff; color: var(--accent); box-shadow: 0 8px 22px -10px rgba(0,0,0,.5); }
.hh-btn.ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.hh-btn:hover { transform: translateY(-2px); text-decoration: none; }

.hub-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0 0 40px; }
.hstat { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; }
.hstat .v { font-size: 30px; font-weight: 600; letter-spacing: -.02em; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.hstat .v small { font-size: 14px; color: var(--muted); font-weight: 500; }
.hstat .k { font-size: 12.5px; color: var(--muted); margin-top: 9px; letter-spacing: .03em; }

.hub-section { margin: 0 0 40px; }
.hub-section .hs-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 20px; }
.hub-section .hs-head h2 { font-size: 19px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.hub-section .hs-head .cnt { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.hub-section .hs-head .rule { flex: 1; height: 1px; background: var(--border); }
.hub-section details { background: #fff; }

.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.gcard { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 26px 26px 22px; transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden; }
.gcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: 0; transition: opacity .2s; }
.gcard:hover { transform: translateY(-3px); border-color: #d8d2e8; box-shadow: 0 20px 44px -26px rgba(26,28,32,.5); text-decoration: none; }
.gcard:hover::before { opacity: 1; }
.gcard .gc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.gcard .gc-cat { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--accent); background: var(--accent-soft); padding: 4px 11px; border-radius: 999px; }
.gcard .gc-no { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; font-weight: 600; }
.gcard .gc-q { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.45; letter-spacing: -.01em; margin: 0 0 10px; }
.gcard .gc-d { font-size: 13.5px; color: var(--muted); line-height: 1.75; margin: 0 0 18px; flex: 1; }
.gcard .gc-teaser { display: flex; align-items: baseline; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.gcard .gc-teaser .t-num { font-size: 22px; font-weight: 600; color: var(--accent); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gcard .gc-teaser .t-lab { font-size: 12px; color: var(--muted); }
.gcard .gc-teaser .t-go { margin-left: auto; color: var(--accent); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }

/* 入场动画 */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; animation: fadeUp .6s cubic-bezier(.22,.61,.36,1) forwards; }
.reveal.d1 { animation-delay: .05s; }
.js .io-reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1); }
.js .io-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .io-reveal { opacity: 1; transform: none; } }

/* 滚动条 */
.data-scroll::-webkit-scrollbar { height: 8px; width: 8px; }
.data-scroll::-webkit-scrollbar-track { background: #f0efeb; }
.data-scroll::-webkit-scrollbar-thumb { background: #c3ccd6; border-radius: 8px; }
.data-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@media (max-width: 980px) {
  .guide-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}
@media (max-width: 680px) {
  .topbar .nav a:not(.current) { display: none; }
  .hub-hero { padding: 36px 26px; border-radius: 16px; }
  .hub-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hstat { padding: 18px; } .hstat .v { font-size: 25px; }
  .guide-grid, .related-grid { grid-template-columns: 1fr; }
  .cta-card { padding: 26px 24px; }
  .answer-box { padding: 20px 20px; }
  .prose h2 { font-size: 19px; }
  .gcard { padding: 22px 22px 18px; }
  .mini-calc { padding: 18px 16px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; animation: none; }
  * { transition: none !important; }
  .progress { transition: none; }
}