/* ============================================================
   TVVO 设计圈 · 统一 UI 规范层 (ui.css)
   最后加载，统一各二级页的页头 / 区块标题 / 返回链接 / 卡片 / 空状态 / 药丸标签
   所有规范以 --ui-* 变量为单一来源，保持全站一致。
   ============================================================ */
:root {
  --ui-radius:       16px;   /* 卡片统一圆角 */
  --ui-radius-sm:    13px;   /* 次级卡片 / 条目 */
  --ui-gap:          18px;
  /* 字号统一对齐首页档位：主标题沿用首页 clamp，描述 15px */
  --ui-title:        clamp(20px, 2.2vw, 26px);  /* 页面主标题：紧凑字号 */
  --ui-title-center: clamp(20px, 2.2vw, 26px);  /* 居中页主标题：紧凑字号 */
  --ui-h2:           22px;   /* 区块标题 */
  --ui-desc:         15px;   /* 描述文字 = 首页 */
}

/* ---------- 统一页头：眉标 + 主标题 + 描述 ---------- */
.ui-head { display: flex; flex-direction: column; gap: 9px; margin: 0 0 24px; }
.ui-head__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--brand);
}
.ui-head__title {
  margin: 0; font-family: var(--serif); font-size: var(--ui-title);
  font-weight: 700; line-height: 1.25; color: var(--ink);
}
.ui-head__title .em { color: var(--brand); }
.ui-head__desc { margin: 0; color: var(--ink-2); font-size: var(--ui-desc); line-height: 1.7; max-width: 56em; }

/* 居中变体（帮助中心等） */
.ui-head--center { align-items: center; text-align: center; margin-bottom: 26px; }
.ui-head--center .ui-head__title { font-size: var(--ui-title-center); }
.ui-head--center .ui-head__desc { max-width: 46em; }

/* 带操作按钮的变体（消息通知等）：左侧标题 + 右侧操作 */
.ui-head--row { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ui-head--row .ui-head__main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

/* ---------- 统一返回链接 ---------- */
.ui-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); text-decoration: none; font-size: 14px;
  margin: 0 0 16px; transition: color .15s;
}
.ui-back:hover { color: var(--brand); }

/* ---------- 统一区块标题 ---------- */
.ui-sec-title { margin: 0; font-family: var(--serif); font-size: var(--ui-h2); font-weight: 700; color: var(--ink); }

/* ---------- 统一卡片圆角 ---------- */
.ui-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ui-radius); }

/* ---------- 统一药丸标签切换 ---------- */
.ui-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.ui-tab {
  padding: 8px 16px; border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2); border-radius: 999px; font-size: 13.5px; cursor: pointer;
  transition: all .15s;
}
.ui-tab:hover { border-color: var(--border-2); color: var(--ink); }
.ui-tab.is-on, .ui-tab.on { border-color: var(--brand); color: var(--brand); background: rgba(214,21,24,.08); font-weight: 700; }

/* ---------- 统一空状态 ---------- */
.ui-empty { text-align: center; padding: 56px 20px; color: var(--ink-3); font-size: 14px; }
.ui-empty .big { font-size: 40px; margin-bottom: 12px; opacity: .5; }

/* ============================================================
   兼容映射：把各页原有的页头类统一到上面规范（无需改动 JS）
   ============================================================ */
.detail-head, .gig-hero { display: flex; flex-direction: column; gap: 9px; margin: 0 0 24px; }
.detail-head h1, .gig-hero h1, .hp-hd h1 {
  font-family: var(--serif); font-size: var(--ui-title); font-weight: 700; line-height: 1.25; margin: 0; color: var(--ink);
}
.detail-head > p, .gig-hero > p, .hp-hd p {
  margin: 0; color: var(--ink-2); font-size: var(--ui-desc); line-height: 1.7; max-width: 56em;
}
/* 眉标统一为品牌红小字（覆盖 hero__eyebrow 的胶囊样式） */
.detail-head .hero__eyebrow, .gig-hero .hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--brand);
  padding: 0; border: 0; background: none; margin: 0;
}
/* 帮助中心：居中页头 */
.hp-hd { text-align: center; margin-bottom: 26px; }
.hp-hd h1 { font-size: var(--ui-title-center); }
.hp-hd p { max-width: 46em; margin-left: auto; margin-right: auto; }
/* 消息通知：行式页头 */
.nt-hd { margin-bottom: 20px; }
.nt-hd h2, .lb-hd h2, .nt-sub, .lb-hd p { font-family: var(--serif); }
.nt-hd h2 { font-size: var(--ui-title); font-weight: 700; line-height: 1.25; margin: 0; color: var(--ink); }
.nt-sub { font-family: var(--font); color: var(--ink-2); font-size: var(--ui-desc); line-height: 1.6; margin-top: 6px; }
/* 创作者榜 */
.lb-hd { margin-bottom: 20px; }
.lb-hd h2 { font-size: var(--ui-title); font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.lb-hd p { font-family: var(--font); color: var(--ink-2); font-size: var(--ui-desc); line-height: 1.7; margin: 0; }
/* 统一返回链接（三套旧类统一外观） */
.pd-back, .pf-back, .lb-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); text-decoration: none; font-size: 14px; margin: 0 0 16px; transition: color .15s;
}
.pd-back:hover, .pf-back:hover, .lb-back:hover { color: var(--brand); }
/* 统一卡片圆角：二级页业务卡片 */
.pd-card, .pf-card, .hp-sec, .nt-item, .nt-login, .lb-row, .pf-post { border-radius: var(--ui-radius); }
.pf-post, .nt-item, .lb-row { border-radius: var(--ui-radius-sm); }
/* 榜单项头改为纵向排列以容纳眉标 */
.lb-hd { display: flex; flex-direction: column; gap: 8px; }

/* ============================================================
   字号统一：各页写死的页头主标题 / 描述 → 首页档位
   （只覆盖页头容器内的直接标题，不影响卡片/区块小标题）
   ============================================================ */
.a-top h1,
.dx-hero h1,
.wp-cover h1,
.hero h1,
.gig-hero h1,
.hp-hd h1,
.lb-hd h2,
.nt-hd h2,
.detail-head h1 { font-size: var(--ui-title) !important; }
/* 描述行 = 首页 15px */
.dx-hero > p,
.wp-cover > p,
.hero__sub,
.gig-hero p,
.hp-hd p,
.lb-hd p,
.nt-sub,
.detail-head > p { font-size: var(--ui-desc) !important; }

/* ============================================================
   UI 精修：大标题缩小两档；主要图标放大一圈
   （等级徽章 .lv-ic、按钮内小图标保持不变）
   ============================================================ */
/* 内联写死、未走 --ui-title 变量的页头大标题 → 统一 26px 规范 */
.pf-name, .fl-hd h2, .dm-side__hd h2 { font-size: 26px !important; }

/* 1) 侧栏导航图标 21 → 25px */
.sidebar__icon svg { width: 25px; height: 25px; }
/* 2) 页头标题前的图标跟随标题适当放大 */
.ui-head__title .ic, .lb-hd h2 .ic, .nt-hd h2 .ic,
.fl-hd h2 .ic, .detail-head h1 .ic, .hp-hd h1 .ic,
.a-top h1 .ic, .dx-hero h1 .ic { font-size: 1.22em; }
/* 3) 功能入口 / 空状态大图标放大一圈 */
.lg-quick__ic .ic, .nt-ic .ic { width: 26px; height: 26px; }
.cert-band__badge .ic { width: 40px; height: 40px; }
.ui-empty .big { font-size: 46px; }

/* ============================================================
   UI 统一规范 · 按钮（全站）
   默认=灰色小按钮；hover=浅红；保留两个红色主 CTA 例外：
   ① 首页「立即诊断」.dx-send  ② 圈子「发布」#publish-btn
   ============================================================ */
.btn--primary, .btn--ghost, .btn--accent,
.a-btn--mail, .dm-new button, .dm-compose button {
  background: var(--surface-3) !important;
  color: var(--ink) !important;
  border: 1px solid var(--border-2) !important;
  padding: 8px 16px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  filter: none !important;
  transition: background .15s ease, color .15s ease, border-color .15s ease !important;
}
.btn--primary:hover, .btn--ghost:hover, .btn--accent:hover,
.a-btn--mail:hover, .dm-new button:hover, .dm-compose button:hover {
  background: var(--brand-soft) !important;
  color: #ff8a8c !important;
  border-color: rgba(214,21,24,.5) !important;
  box-shadow: none !important;
  filter: none !important;
}
/* 禁用态维持弱显示，不变红 */
.btn--primary:disabled, .btn--ghost:disabled, .btn--accent:disabled,
.dm-compose button:disabled { opacity: .5 !important; }
.btn--primary:disabled:hover, .btn--ghost:disabled:hover, .btn--accent:disabled:hover {
  background: var(--surface-3) !important; color: var(--ink) !important; border-color: var(--border-2) !important;
}
/* 例外①：圈子「发布」——恢复红色大按钮 */
#publish-btn, #publish-btn:hover {
  background: var(--brand) !important; color: #fff !important;
  border-color: var(--brand) !important; padding: 11px 26px !important;
  font-size: 15px !important; border-radius: 999px !important;
}
/* 例外②：首页「立即诊断」.dx-send 独立于 .btn 变体，天然保持红色大按钮，无需覆盖 */

/* ============================================================
   全站按钮形状统一：胶囊按钮（含筛选标签 / 分段控件 / 图标按钮）
   ============================================================ */
button, .btn, .ui-tab, .gig-tab, .seg button,
.composer__chip, .dm-new button, .dm-compose button,
.a-btn--mail, .dx-send, .sidebar__matrix a {
  border-radius: 999px !important;
}
