/* ==========================================================================
   频道首屏工具条（.rsc）—— /resource、/project 共用
   来源：2026-11-08 从 resource.css 抽离（那时叫「资源库首屏」），现在改成中性文件名，
   以后项目 / 活动频道要这套两段式布局，直接引这张表 + 加 .rsc 根类即可。

   配色口径（全部搬自 job.css 1071 行起，别在这里另配）：
     · 底 linear-gradient(180deg, #0a7b76 → #05605c 52% → #043f3b) + 顶边 1px 白高光；
     · 深底上文字 #f2fbfa / #eafaf7，装饰图标 #a9e3da；
     · 胶囊只能「加深」rgba(0,0,0,.14)，hover .28（提亮后白字只剩 3.1:1）；
     · 选中态一律反白：白底 + #066a65；
     · 搜索框留白底，是这块深色里唯一的亮面。
   ========================================================================== */

/* 组件自带 border-box：/post/list 这类没引 channel.css 的页面没有全局重置，
   不加的话 40px 的框会被 border 撑成 42、640 的上限会变成 680 */
.rsc-top *,
.rsc-top *::before,
.rsc-top *::after { box-sizing: border-box; }

/* 版心自带：不依赖宿主的 .ch-wrap / .pl-container（/post/* 既不引 channel.css，
   也不一定引列表页样式），组件在任何页面都能直接落地 */
.rsc .rsc-wrap {
  width: min(1450px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 640px) {
  .rsc .rsc-wrap { width: calc(100% - 24px); }
}

.rsc-top {
  background: linear-gradient(180deg, #0a7b76 0%, #05605c 52%, #043f3b 100%);
  border-bottom: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}
/* 行高 40 + 上下留白 18/10：框是「浮在深色带中间」，不把带子撑满。
   （下留白 16→10：吸顶条自带 12px 顶内边距，搜索行与胶囊的实际间距 = 10 + 12 = 22px） */
.rsc .rsc-top-in {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0 10px;
}

/* ---------------- 频道名 ---------------- */
.rsc .rsc-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  height: 40px;
  padding-right: 4px;
}
.rsc .rsc-brand-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .14);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #a9e3da;
  font-size: 16px;
}
.rsc .rsc-brand-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.rsc .rsc-brand-txt em { font-size: 10px; font-style: normal; letter-spacing: .4px; color: rgba(242, 251, 250, .72); }
.rsc .rsc-brand-txt b { font-size: 19px; font-weight: 700; color: #fff; }

/* slogan：竖线分隔，实色 #eafaf7（72% 白在 #0a7b76 上只有 3.4:1，13px 正文不够） */
.rsc .rsc-brand-slogan {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 20px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, .18);
  font-size: 13px;
  letter-spacing: .2px;
  color: #eafaf7;
  white-space: nowrap;
}

/* ---------------- 搜索框 ---------------- */
.rsc .rsc-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 640px;
  height: 40px;
  padding-left: 38px;
  border: 1px solid rgba(255, 255, 255, .30);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(2, 30, 28, .20);
  transition: border-color .18s, box-shadow .18s;
}
.rsc .rsc-search:focus-within {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .22), 0 6px 18px rgba(2, 30, 28, .20);
}
.rsc .rsc-search > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #667085;
  font-size: 12.5px;
}
.rsc .rsc-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 10px 0 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #1d2939;
  outline: none;
}
.rsc .rsc-search input::placeholder { color: #667085; }
/* 按钮贴右边满高、只圆右角（对齐 /job 的 .jb-search-btn） */
.rsc .rsc-search-btn {
  flex: 0 0 auto;
  align-self: stretch;
  margin: -1px -1px -1px 0;
  padding: 0 20px;
  border: 0;
  border-radius: 0 9px 9px 0;
  background: #087e78;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .16s;
}
.rsc .rsc-search-btn:hover { background: #066a65; }

/* ---------------- 右侧操作 ---------------- */
.rsc .rsc-top-acts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin-left: auto; }
.rsc a.rsc-top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  color: #eafaf7;
  font-size: 13px;
  white-space: nowrap;
  transition: background-color .16s, color .16s;
}
.rsc a.rsc-top-link i { font-size: 12px; color: #a9e3da; }
.rsc a.rsc-top-link:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.rsc a.rsc-top-link:hover i { color: #fff; }
.rsc a.rsc-top-link.is-strong {
  padding: 0 16px;
  background: #fff;
  color: #066a65;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(2, 30, 28, .22);
}
.rsc a.rsc-top-link.is-strong i { color: #066a65; }
.rsc a.rsc-top-link.is-strong:hover { background: #f0fdfa; color: #054b47; }
.rsc a.rsc-top-link.is-strong:hover i { color: #054b47; }
.rsc .rsc-split { flex: 0 0 auto; width: 1px; height: 18px; margin: 0 4px; background: rgba(255, 255, 255, .18); }

/* ---------------- 子分类：一行排开，超出横滑 ---------------- */
.rsc .rsc-cats {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rsc .rsc-cats::-webkit-scrollbar { display: none; }
.rsc a.rsc-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .14);
  color: #eafaf7;
  font-size: 13px;
  white-space: nowrap;
  transition: background-color .16s, color .16s;
}
.rsc a.rsc-cat i { font-size: 11px; color: #a9e3da; }
.rsc a.rsc-cat:hover { background: rgba(0, 0, 0, .28); color: #fff; }
.rsc a.rsc-cat:hover i { color: #fff; }
.rsc a.rsc-cat.is-on { background: #fff; color: #066a65; font-weight: 600; box-shadow: 0 4px 14px rgba(2, 30, 28, .18); }
.rsc a.rsc-cat.is-on i { color: #066a65; }

/* ---------------- 子分类吸顶条 ----------------
   2026-11-13 从 .rsc-top 里独立出来：sticky 只在「未被父级截断」时有行程，
   藏在深色带内部永远吸不住。背景用渐变的收尾色 #043f3b，接缝不可见；
   宿主页传 $po_sticky/$pc_sticky/$rc_sticky 时才吸顶，吸住后补投影与下方内容分层。
   顶内边距 12px：吸住时胶囊不贴视口顶（底边距由 .rsc-cats 的 14px 兜住，12/14 视觉居中）。

   2026-11-14 修：选择器不能再带 `.rsc ` 前缀。/post 片段的外层 div 自己就是
   `class="rsc rsc-catsbar"`，没有 .rsc 祖先 → `.rsc .rsc-catsbar`（后代选择器）
   完全不命中，背景与内边距全丢（子分类行变成透明、贴在页面灰底上）。
   /project、/resource 包在 .ch-page.rsc 里能命中，只有 /post 三个页面暴露。 */
.rsc-catsbar {
  padding-top: 12px;
  background: #043f3b;
}
.rsc-catsbar.is-sticky {
  position: sticky;
  top: 0;
  z-index: 40;
}
.rsc-catsbar.is-sticky.is-stuck { box-shadow: 0 10px 24px rgba(2, 30, 28, .25); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1200px) {
  .rsc .rsc-search { max-width: 520px; }
}
@media (max-width: 1100px) {
  /* 版心收窄后 slogan 会和搜索框抢位置，直接收起（频道名已说明是哪个频道） */
  .rsc .rsc-brand-slogan { display: none; }
}
@media (max-width: 1040px) {
  .rsc .rsc-top-in { gap: 12px; }
  .rsc .rsc-search { max-width: 430px; }
  .rsc a.rsc-top-link { padding: 0 8px; font-size: 12.5px; }
}
@media (max-width: 900px) {
  .rsc .rsc-top-in { flex-wrap: wrap; gap: 10px 12px; padding: 14px 0 13px; }
  .rsc .rsc-top-acts { order: 1; margin-left: auto; }
  .rsc .rsc-search { order: 3; flex: 1 1 100%; max-width: none; }
  .rsc .rsc-cats { padding-bottom: 12px; }
}
@media (max-width: 560px) {
  .rsc .rsc-top-acts { width: 100%; margin-left: 0; }
  .rsc a.rsc-top-link.is-strong { flex: 1 1 auto; justify-content: center; }
  .rsc .rsc-brand-txt b { font-size: 17px; }
  .rsc a.rsc-cat { height: 28px; padding: 0 10px; font-size: 12.5px; }
}

/* ==========================================================================
   发布 / 编辑页内容卡片（.publish .unify_box）—— /post/create、/post/ 编辑页共用
   2026-11-10：原本 .unify_box 没有任何背景规则，表单直接铺在 body 灰底
   (#f2f4f7) 上，layui 输入框那圈 #eee 描边在灰底上几乎看不见 →
   统一改成白底卡片 + 描边加深 + 聚焦品牌青。
   ========================================================================== */
.publish .unify_box {
  background: #fff;
  border: 1px solid #e9eef3;
  border-radius: 14px;
  padding: 18px 24px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .04);
}
.publish .unify_box > .top {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f6;
}
/* 小节标题左侧色条：沿用全站品牌青，替换遗留的 #00B38A */
.publish .unify_box > .top .title::before { background: #087e78; }
.publish .layui-form-label { color: #1d2939; }
.publish .layui-input,
.publish .layui-textarea {
  background: #fff;
  border-color: #d8e0ea;
  color: #1d2939;
}
.publish .layui-input::placeholder,
.publish .layui-textarea::placeholder { color: #98a2b3; opacity: 1; }
.publish .layui-input:hover,
.publish .layui-textarea:hover { border-color: #b9c6d4; }
.publish .layui-input:focus,
.publish .layui-textarea:focus,
.publish .layui-input.layui-input-focus { border-color: #087e78; }
@media (max-width: 640px) {
  .publish .unify_box { padding: 14px 16px 18px; }
}

/* ==========================================================================
   发布页「置顶推广」卡片（.publish .tc-*）—— /post/create
   2026-11-14：发布前直接选置顶卡（发布成功后自动生效），没有卡时给购买入口。
   配色沿用品牌青 + 金色只用于「置顶」标识（与会员/置顶口径一致）。
   ========================================================================== */
.publish .tc-list { display: flex; flex-wrap: wrap; gap: 10px; }
.publish .tc-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: calc(50% - 5px);
  min-width: 260px;
  padding: 14px 16px;
  border: 1px solid #e9eef3;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s, background-color .16s;
}
.publish .tc-item:hover { border-color: #b9d6d2; }
.publish .tc-item.is-on {
  border-color: #087e78;
  background: #f2fbfa;
  box-shadow: 0 0 0 1px #087e78 inset;
}
/* 原生 radio 隐藏但保留可聚焦，选中态用自绘圆点 */
.publish .tc-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.publish .tc-radio {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid #c3cfdb;
  border-radius: 50%;
  background: #fff;
  transition: border-color .16s;
}
.publish .tc-item.is-on .tc-radio { border-color: #087e78; border-width: 5px; }
.publish .tc-item input[type="radio"]:focus-visible + .tc-radio { box-shadow: 0 0 0 3px rgba(8, 126, 120, .22); }
.publish .tc-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.publish .tc-main b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1d2939;
}
.publish .tc-main em {
  font-style: normal;
  font-size: 12.5px;
  line-height: 1.5;
  color: #667085;
}
.publish .tc-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: #fdf6e9;
  color: #8a641f;
  font-size: 11.5px;
  font-weight: 600;
}
.publish .tc-tag.is-plain { background: #eef2f6; color: #475467; font-weight: 500; }
.publish .tc-tip {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #667085;
}
.publish .tc-tip a { color: #087e78; }
.publish .tc-tip a:hover { text-decoration: underline; }

/* 没有卡：空状态 + 可直接购买的档位 */
.publish .tc-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px dashed #d9e3ec;
  border-radius: 12px;
  background: #fbfcfe;
}
.publish .tc-empty-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fdf6e9;
  color: #b8873b;
  font-size: 15px;
}
.publish .tc-empty-txt { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.publish .tc-empty-txt b { font-size: 14px; color: #1d2939; }
.publish .tc-empty-txt em { font-style: normal; font-size: 12.5px; line-height: 1.5; color: #667085; }
.publish .tc-buy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 9px;
  background: #087e78;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.publish .tc-buy:hover { background: #066a65; color: #fff !important; }
.publish .tc-plans { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.publish .tc-plan {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #e9eef3;
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  color: #475467 !important;
  text-decoration: none;
  transition: border-color .16s, color .16s;
}
.publish .tc-plan b { font-weight: 600; color: #1d2939; }
.publish .tc-plan i { font-style: normal; font-weight: 700; color: #b8873b; }
.publish .tc-plan em { font-style: normal; color: #667085; }
.publish .tc-plan:hover { border-color: #087e78; }
.publish .tc-plan:hover b { color: #087e78; }

@media (max-width: 760px) {
  .publish .tc-item { width: 100%; min-width: 0; }
  .publish .tc-empty { flex-wrap: wrap; }
  .publish .tc-buy { width: 100%; justify-content: center; }
}
