/* ============================================================
   虾大侠博客主题 · CMS 风格（对齐 xiadaxia.com.cn/cms/ 设计体系）
   设计令牌与结构均取自线上 CMS 实测样式
   ============================================================ */
:root{--brand:#2f6fed;--ink:#1d2330;--mut:#6b7280;--bd:#eceff4;--bg:#ffffff;--good:#e84a3c}
*{box-sizing:border-box}
body{margin:0;color:var(--ink);font-family:-apple-system,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;background:#f7f8fb;line-height:1.75}
a{color:inherit;text-decoration:none}
img{max-width:100%}

/* ---------- 顶部公告栏 ---------- */
.global-bar{background:#fff;border-bottom:1px solid #E6E8EC;position:sticky;top:0;z-index:200}
.global-bar .in{max-width:1080px;margin:0 auto;padding:0 20px;display:flex;align-items:center;justify-content:space-between;height:32px}
.global-announce{display:flex;align-items:center;gap:8px;font-size:12px;color:#444;max-width:85%;overflow:hidden}
.global-announce .announce-label{display:inline-flex;align-items:center;gap:4px;background:#2f6fed;color:#fff;font-size:11px;font-weight:700;padding:2px 6px;border-radius:4px;white-space:nowrap;flex:none}
.global-announce span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.global-sites{display:flex;align-items:center;gap:12px;flex:none}
.global-sites a{font-size:12px;color:#6b7280;position:relative;padding:4px 0;transition:color .2s}
.global-sites a:hover{color:var(--ink)}
.global-sites a.on{color:#d32f2f;font-weight:700}
.global-sites a.on::after{content:"";position:absolute;left:0;bottom:-2px;right:0;height:2px;background:#d32f2f}

/* ---------- 头部：Logo + 红徽章 + 搜索 ---------- */
.head{background:#fff;border-bottom:1px solid #E6E8EC;position:sticky;top:32px;z-index:100}
.head .in{max-width:1080px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;height:72px;padding:0 20px;flex-wrap:nowrap}
.logo{display:flex;align-items:center;gap:10px;font-weight:800;color:var(--brand);white-space:nowrap}
.logo .logo-mark{height:52px;width:auto;flex:none;display:block}
.logo .site-tag{font-size:13px;font-weight:600;color:#fff;padding:5px 12px;border-radius:8px;background:linear-gradient(135deg,#e53935 0%,#c62828 100%);box-shadow:0 2px 6px rgba(229,57,53,.25);white-space:nowrap}
.search-hub{display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.searchbox{display:flex;align-items:center;background:#f2f4f7;border:1px solid #e6e8ec;border-radius:20px;height:36px;padding:2px 3px 2px 14px;transition:.15s}
.searchbox:focus-within{border-color:var(--brand);background:#fff}
.searchbox input{border:0;outline:none;background:transparent;font-size:13px;width:200px;color:var(--ink)}
.searchbox button{border:0;background:var(--brand);color:#fff;border-radius:18px;width:30px;height:30px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex:none}
.searchbox button:hover{filter:brightness(1.08)}
.hot-words{display:flex;flex-wrap:wrap;gap:5px;align-items:center;justify-content:flex-end;max-width:640px}
.hot-words .hw-label{font-size:12px;color:var(--mut)}
.hot-words a{font-size:12px;line-height:1.6;color:var(--mut);padding:1px 9px;border:1px solid var(--bd);border-radius:999px;transition:.15s}
.hot-words a:hover{color:var(--brand);border-color:var(--brand);background:#f7f9ff}

/* ---------- 三栏布局：左导航 + 内容 + 右侧 ---------- */
.wrap{max-width:1080px;margin:24px auto;padding:0 20px}
.main{display:grid;grid-template-columns:170px 1fr 300px;gap:20px;align-items:start}
.main>*{min-width:0}
@media(max-width:980px){.main{grid-template-columns:1fr 300px}.blog-nav{display:none}}
@media(max-width:820px){.main{grid-template-columns:1fr}}

/* ---------- 左侧栏目导航 ---------- */
.blog-nav{background:#fff;border:1px solid var(--bd);border-radius:12px;padding:8px 0;position:sticky;top:116px;align-self:start}
.blog-nav a{display:flex;align-items:center;gap:8px;padding:11px 16px;font-size:14px;color:#475569;transition:.15s;border-left:3px solid transparent}
.blog-nav a:hover{background:#f1f5ff;color:var(--brand)}
.blog-nav a.on{background:var(--brand);color:#fff;font-weight:600;border-left-color:rgba(255,255,255,.6)}
.blog-nav a.on:hover{background:var(--brand);color:#fff}
.blog-nav .nav-icon{font-size:16px;line-height:1}

/* ---------- 卡片 ---------- */
.card{background:#fff;border:1px solid var(--bd);border-radius:12px;padding:18px;margin-bottom:18px}
.card h3{margin:0 0 12px;font-size:16px}
.side .card h3{font-size:14px;color:var(--mut);text-transform:uppercase;letter-spacing:.5px}

/* ---------- 首页 hero ---------- */
.blog-hero{background:linear-gradient(110deg,#eef4ff 0%,#f8fafc 60%,#fff 100%);display:flex;flex-direction:column;justify-content:center;min-height:170px;padding:28px 30px;border-radius:12px;margin-bottom:18px;border:1px solid var(--bd)}
.blog-hero h2{margin:0 0 10px;font-size:24px;color:var(--ink)}
.blog-hero p{margin:0;color:var(--mut);font-size:15px;max-width:560px;line-height:1.7}
.blog-hero .hero-btns{margin-top:16px}
.blog-head{padding:22px 20px}
.blog-head h1{margin:0 0 6px;font-size:22px}
.blog-head-desc{color:var(--mut);font-size:14px;line-height:1.7}

/* ---------- 四栏目导航卡 ---------- */
.intro-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:720px){.intro-grid{grid-template-columns:1fr}}
.intro-item{display:block;border:1px solid var(--bd);border-radius:10px;padding:14px 16px;transition:.15s;background:#fbfcff}
.intro-item:hover{border-color:var(--brand);background:#f7f9ff;transform:translateY(-2px)}
.intro-item b{display:block;font-size:14.5px;color:var(--ink);margin-bottom:6px}
.intro-item span{font-size:13px;color:var(--mut);line-height:1.65;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---------- 文章列表 ---------- */
.blog-list .post{display:flex;gap:16px;padding:18px 0;border-bottom:1px solid var(--bd)}
.blog-list .post:last-child{border-bottom:0}
.post-body{flex:1;min-width:0}
.post-title{margin:0 0 8px;font-size:18px;line-height:1.4}
.post-title a{color:var(--ink)}
.post-title a:hover{color:var(--brand)}
.post-excerpt{margin:0 0 10px;color:#525a66;font-size:14.5px;line-height:1.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.post-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:var(--mut);font-size:13px}
.post-meta .dot{opacity:.7}
.art-cat{color:var(--brand)}
.empty-note{color:var(--mut);font-style:italic;padding:16px 0 4px;margin:0}

/* ---------- 按钮 / 标签 ---------- */
.btn{display:inline-block;background:var(--brand);color:#fff;border-radius:8px;padding:8px 18px;font-size:14px;margin:0 4px;transition:.15s}
.btn:hover{filter:brightness(1.08);color:#fff}
.btn.s{background:#fff;color:var(--brand);border:1px solid var(--brand)}
.tag{display:inline-block;background:#eef4ff;color:var(--brand);border-radius:20px;padding:2px 10px;font-size:12px;margin-right:6px}
a.tag:hover{background:#dfeaff}
.tagcloud{display:flex;flex-wrap:wrap;gap:8px}
.tagcloud .tag{margin:0}

/* ---------- 右侧列表 ---------- */
.hotlist{list-style:none;margin:0;padding:0}
.hotlist li{padding:9px 0;border-bottom:1px dashed var(--bd)}
.hotlist li:last-child{border-bottom:0}
.hotlist a{font-size:14px;color:#333;display:block;line-height:1.5}
.hotlist a:hover{color:var(--brand)}
.friendlist{list-style:none;margin:0;padding:0}
.friendlist li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:7px 0;border-bottom:1px dashed var(--bd);font-size:13.5px}
.friendlist li:last-child{border-bottom:0}
.friendlist a:hover{color:var(--brand);word-break:break-all}
.friendlist .ext{color:var(--mut);font-size:12px;flex:none}

/* ---------- 文章页 ---------- */
.art{max-width:760px;background:#fff;border:1px solid var(--bd);border-radius:12px;padding:28px 30px}
.bc{color:var(--mut);font-size:13px;margin-bottom:16px}
.bc a{color:var(--mut)}
.bc a:hover{color:var(--brand)}
.art-title{font-size:26px;margin:0 0 14px;line-height:1.35}
.art-meta{display:flex;flex-wrap:wrap;align-items:center;gap:14px;color:var(--mut);font-size:13.5px;padding-bottom:16px;margin-bottom:20px;border-bottom:1px solid var(--bd)}
.art .body{font-size:16.5px;line-height:1.9}
.art .body h2{font-size:21px;margin:30px 0 12px}
.art .body h3{font-size:18px;margin:24px 0 10px}
.copyright{margin-top:30px;background:#f8fafc;border:1px dashed var(--bd);border-radius:10px;padding:16px 18px}
.copyright h4{margin:0 0 8px;font-size:14px;color:var(--ink)}
.copyright p{margin:0;font-size:13px;color:var(--mut);line-height:1.7}

/* ---------- 文章内排版类（沿用原调性样式，适配新配色） ---------- */
.lead{font-size:17px;color:#3f4756;border-left:3px solid var(--brand);background:#f7f9ff;padding:12px 16px;margin:26px 0;border-radius:0 8px 8px 0;line-height:1.8}
.closing{margin-top:32px;padding-top:22px;border-top:1px dashed var(--bd);color:#3f4756;font-size:16px;line-height:1.85}
.steps{margin:20px 0;padding-left:0;list-style:none;counter-reset:step}
.steps li{position:relative;padding:11px 0 11px 44px;border-bottom:1px solid var(--bd);list-style:none}
.steps li:before{counter-increment:step;content:counter(step);position:absolute;left:0;top:11px;width:28px;height:28px;background:var(--brand);color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px}
.series-badge{display:inline-block;font-size:13px;color:var(--brand);background:#eef4ff;padding:3px 13px;border-radius:20px;margin:0}

/* ---------- 搜索结果页 ---------- */
.search-result-item{padding:14px 0;border-bottom:1px dashed var(--bd)}
.search-result-item:last-child{border-bottom:0}
.search-result-item h4{margin:0 0 6px;font-size:16px}
.search-result-item h4 a:hover{color:var(--brand)}
.search-result-item .m{font-size:13px;color:var(--mut)}
.search-hit-tag{color:var(--brand);font-weight:600}
.search-empty{color:var(--mut);padding:14px 0}

/* ---------- 页脚 ---------- */
.foot{background:var(--ink);color:#C9D2DC;padding:40px 0 30px;text-align:center;margin-top:30px}
.foot .company{color:#fff;font-weight:600;font-size:16px;margin-bottom:8px}
.foot .foot-links{display:flex;justify-content:center;flex-wrap:wrap;gap:18px;margin-bottom:12px;font-size:14px}
.foot .foot-links a{color:#C9D2DC;border-bottom:1px solid transparent;padding-bottom:1px}
.foot .foot-links a:hover{color:#fff;border-bottom-color:rgba(255,255,255,.55)}
.foot .beian{font-size:14px;display:inline-flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:center}
.foot .beian a{color:#FFC7AE;border-bottom:1px solid rgba(255,199,174,.4);display:inline-flex;align-items:center;gap:4px}
.foot .beian a:hover{color:#fff}
.foot .beian img{height:16px;vertical-align:middle}
.foot .copy{margin-top:12px;font-size:13px;color:#7C8896;max-width:640px;margin-left:auto;margin-right:auto;line-height:1.7;padding:0 20px}

/* ---------- 响应式 ---------- */
@media(max-width:720px){
  .hot-words{display:none}
  .search-hub .searchbox input{width:130px}
  .logo .site-tag{display:none}
  .art{padding:20px}
  .blog-hero{padding:22px}
}

.logo .brand-img{height:34px;width:auto;display:block}
/* 「虾大侠博客」红底白字胶囊 —— 样式对齐官网「企业官网」徽章 */
.logo .brand-pill{
  display:inline-flex;align-items:center;flex:none;
  padding:5px 13px;margin-left:4px;border-radius:9px;
  background:linear-gradient(135deg,#e53935,#c62828);
  color:#fff;font-size:13.5px;font-weight:700;letter-spacing:.5px;
  box-shadow:0 2px 6px rgba(198,40,40,.28);
  position:relative;overflow:hidden;
}
.logo .brand-pill::before{
  content:"";position:absolute;left:0;top:0;right:0;height:46%;
  background:linear-gradient(180deg,rgba(255,255,255,.28),rgba(255,255,255,0));
  border-radius:11px 11px 0 0;pointer-events:none;
}
