/* ==========================================================================
   Huangye · 全站 Header/Footer 收口（模板轮）
   --------------------------------------------------------------------------
   只覆盖 style.css 里 header/footer 那一段的配色与排版，不改结构类名，
   因此 /app/（自带 app/css 作用域）与其它页面的组件样式不受影响。
   口径：白底 + 黑字 + 黄页黄做强调；不引入效果图里的蓝/红。
   设计真相源：design/prototypes/home-mobile-first-v1.html 的 .bar / .foot
   （2026-10-20 按该模板逐项量过：顶栏 64px、nav gap 26、字标 19px、
   页脚 13px/#6B7076、列间距 22）。
   ========================================================================== */

/* --hy-hdr-y-ink 用在底部标签栏当前项的图标描边上：#FFC400 做前景对比不够，
   取效果图定稿的深黄 #8A6300。 */
:root{
  --hy-hdr-y:#FFC400;
  --hy-hdr-y-soft:#FFF6DC;
  --hy-hdr-y-wash:#FFFAEE;
  --hy-hdr-y-ink:#8A6300;
  --hy-hdr-ink:#16181B;
  --hy-hdr-ink2:#4E5358;
  --hy-hdr-ink3:#6B7076;
  --hy-hdr-line:#ECECE7;
  --hy-hdr-line2:#E0E0DA;
  --hy-hdr-bg:#FAFAF7;
}

/* ---- 顶栏尺寸：模板 .bar-in = 64px，style.css 的 74px 是旧口径 ----
   动的是 --header-h 变量而不是 .site-header{height}：吸顶的 .biz-tabs、文章 TOC、
   锚点 scroll-margin 全按这个变量定位，只改高度会让它们集体错位。
   排除 .hy-dashboard-v3：/mon-compte/ 自带 68px 的独立顶栏，两套口径不能互相盖。 */
body:not(.hy-dashboard-v3){--header-h:64px}
/* 模板的边线与阴影都是中性灰，style.css 那两条带蓝味（rgba(222,228,238) / 35,63,100）。 */
.site-header{border-bottom-color:var(--hy-hdr-line)}
.site-header.scrolled{box-shadow:0 6px 18px rgba(22,24,27,.07)}
.site-header .header-inner{gap:10px}


/* ---- 品牌：模板字标 = 19px，黄底「黄页」小方块 + 黑色 .fr ---- */
.site-header .brand{min-width:0}
.site-header .brand-copy strong{font-size:19px;letter-spacing:-.02em;color:var(--hy-hdr-ink)}
.site-header .brand-cn{
  display:inline-block;line-height:1.3;
  background:var(--hy-hdr-y);color:var(--hy-hdr-ink);
  padding:2px 6px;border-radius:5px;
}
.site-header .brand-copy .brand-tld{color:var(--hy-hdr-ink)}
.site-header .brand-copy small{color:var(--hy-hdr-ink2);font-size:11.5px;letter-spacing:.01em}

/* ---- 导航：紧跟字标左对齐，ink2 字色，命中项 ink + 2px 黄下划线 ----
   style.css 把 .desktop-nav 设成 flex:1 + 居中 + 满高 74px 的命中区，
   模板的 nav 是 margin-left:22px 的左对齐条，下划线贴着文字。
   align-items:center 是必须的：父级 stretch 会让每个 <a> 拉满 64px，
   height:auto 拦不住，下划线就会落到顶栏边线上而不是文字下方。 */
.site-header .desktop-nav{flex:0 1 auto;align-items:center;justify-content:flex-start;margin-left:22px;gap:26px}
.site-header .desktop-nav a{
  display:inline-flex;align-items:center;height:auto;padding:6px 0;
  color:var(--hy-hdr-ink2);font-weight:600;
  border-bottom:2px solid transparent;
}
.site-header .desktop-nav a::after{display:none}
.site-header .desktop-nav a:hover{color:var(--hy-hdr-ink);border-bottom-color:var(--hy-hdr-y)}
.site-header .desktop-nav a.active{color:var(--hy-hdr-ink);font-weight:800;border-bottom-color:var(--hy-hdr-y)}

/* ---- 右侧动作：搜索 → 登录 → ＋发布信息 ----
   模板三个控件都是 38-44px 一档：搜索钮 44×44 圆、登录与发布 38px 高胶囊。
   只作用在 .header-actions，避免把 .mobile-menu 里竖排的按钮也压成 38px。 */
.site-header .icon-button{width:44px;height:44px;color:var(--hy-hdr-ink)}
.site-header .icon-button:hover{background:var(--hy-hdr-y-wash)}
.site-header .header-actions{gap:8px}
.site-header .header-actions .button{border-radius:999px;height:38px;padding:0 14px;line-height:1}
.site-header .button-ghost.login-button,
.mobile-menu .button-ghost.login-button{
  color:var(--hy-hdr-ink);border-color:var(--hy-hdr-line2);background:#fff;
}
.site-header .button-ghost.login-button:hover,
.mobile-menu .button-ghost.login-button:hover{background:var(--hy-hdr-y-wash);color:var(--hy-hdr-ink);border-color:var(--hy-hdr-y)}
/* 效果图里「发布信息」是黄底主按钮：覆盖 style.css 的珊瑚红（那两条带 !important）。 */
.site-header .button.publish-shortcut,
.mobile-menu .button.publish-shortcut{
  color:var(--hy-hdr-ink) !important;
  background:var(--hy-hdr-y) !important;
  border-color:transparent !important;
  font-weight:800;
  box-shadow:0 2px 0 rgba(0,0,0,.06);
}
.site-header .button.publish-shortcut:hover,
.mobile-menu .button.publish-shortcut:hover{
  background:#FFB300 !important;
  color:var(--hy-hdr-ink) !important;
  box-shadow:0 4px 14px rgba(255,196,0,.35);
}

/* ---- 已登录账户触发器 ---- */
.site-header .hy-account-trigger{color:var(--hy-hdr-ink)}
.site-header .hy-account-avatar{border-color:var(--hy-hdr-line)}

/* ---- Footer：模板 .foot = 浅灰底 + 13px 小字多列 + 底部一行，不是深色块 ----
   2026-10-20 收口轮：页脚按模板收缩为「品牌区 + 4 组」，桌面轨道与模板
   .foot-cols{grid-template-columns:2fr repeat(4,1fr)} 一致（品牌 2fr + 4 组）。 */
.site-footer{background:var(--hy-hdr-bg);color:var(--hy-hdr-ink3);border-top:1px solid var(--hy-hdr-line)}
.site-footer a{color:var(--hy-hdr-ink3);text-decoration:none}
.site-footer a:hover{color:var(--hy-hdr-ink)}

/* style.css 把 .site-footer 做成单行 flex 居中；这一版有两行（链接区 + 版权条），
   所以先把它拉回块级流，否则两个 container 会并排。 */
.site-footer.hy-foot2{
  display:block;
  min-height:0;
  align-items:initial;
  padding:22px 0 0;
  font-size:13px;
  line-height:1.6;
}
.hy-foot2-inner{
  display:grid;
  grid-template-columns:minmax(230px,2fr) repeat(4,minmax(0,1fr));
  gap:22px;
  padding-bottom:20px;
}
.hy-foot2-brand{display:grid;align-content:start;min-width:0}
.hy-foot2-brand .hy-foot2-logo{
  display:inline-flex;align-items:center;gap:9px;margin-top:2px;
  color:var(--hy-hdr-ink);font-weight:800;font-size:19px;letter-spacing:-.02em;line-height:1;
}
.hy-foot2-brand .brand-cn{
  display:inline-block;line-height:1.3;padding:2px 6px;border-radius:5px;
  background:var(--hy-hdr-y);color:var(--hy-hdr-ink);
}
.hy-foot2-brand p{
  margin:10px 0 0;max-width:26em;
  color:var(--hy-hdr-ink3);font-size:13px;
}
.hy-foot2-col{display:grid;align-content:start;gap:7px;min-width:0}
.hy-foot2-col h2{
  margin:0 0 8px;
  color:var(--hy-hdr-ink);font-size:13px;font-weight:700;letter-spacing:0;line-height:1.6;
}
.hy-foot2-col a{color:var(--hy-hdr-ink3);font-size:13px;transition:color .16s ease}
.hy-foot2-col a:hover{color:var(--hy-hdr-ink)}

.hy-foot2-bottom{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:8px 24px;
  padding:14px 0 26px;
  border-top:1px solid var(--hy-hdr-line);
}
.hy-foot2-bottom .footer-copyright{margin:0;color:var(--hy-hdr-ink3);font-size:12px;white-space:normal}
.hy-foot2-legal{gap:2px}
.hy-foot2-legal a{
  padding:0 12px;border-left:1px solid var(--hy-hdr-line2);
  color:var(--hy-hdr-ink3);font-size:12px;
}
.hy-foot2-legal a:first-child{padding-left:0;border-left:0}
.hy-foot2-legal a:hover{color:var(--hy-hdr-ink)}

/* 模板 700+ 用 3 列、<700 单列堆叠；本站手机只有 4 组 16 条，
   收在 2 列比模板单列更短，避免出现上一版近 1000px 的超长页脚。 */
@media (max-width:1119px){
  .hy-foot2-inner{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 22px}
  .hy-foot2-brand{grid-column:1/-1}
  .hy-foot2-brand p{max-width:60ch}
}
@media (max-width:767px){
  .hy-foot2-inner{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 18px;padding-bottom:20px}
  .hy-foot2-brand{grid-column:1/-1}
  .hy-foot2-brand p{max-width:none}
  .hy-foot2-bottom{flex-direction:column;align-items:flex-start;gap:6px}
  .hy-foot2-legal a{padding:0 10px}
  .hy-foot2-legal a:first-child{padding-left:0}
}

/* ==========================================================================
   手机顶栏（效果图 §1）：只留 品牌 + 搜索 + ＋发布，导航下沉到底部标签栏
   与 hy-tabbar.css 同界（≤1023px 正是 style.css 收起 .desktop-nav 的那一档）。
   ========================================================================== */
@media (max-width:1023px){
  /* 收的是 --header-h-mobile 这个变量而不是 .site-header{height}：
     .mobile-menu / .biz-tabs 等吸顶层都按它定位，改 height 会让它们错位。 */
  :root{--header-h-mobile:56px}

  .site-header .brand-copy strong{font-size:19px;white-space:nowrap}
  /* style.css:1112 把 .brand 设成 flex:1 + min-width:0，在桌面宽度下等于「吃掉剩余」；
     手机上一旦多出动作钮，basis:0 就让字标被压到换行溢出顶栏。改成按内容占位。 */
  .site-header .brand{flex:0 0 auto;min-width:0}

  /* 效果图 §1：手机顶栏 = 品牌 + 搜索 + 发布。登录不在这三件里，
     游客入口由底部栏「我的」/「收藏」接住（/mon-compte 未登录 302 到 /deng-ru）。
     必须带 .site-header 前缀：style.css:284 的 .site-header .button{display:inline-flex}
     是 (0,2,0)，裸 .login-button{display:none} 那一条从来就没赢过。 */
  .site-header .header-actions .login-button{display:none}

  /* 拇指落点补到 44×44（效果图 --tap）；36px 那颗留给桌面。 */
  .site-header .icon-button{width:44px;height:44px}

  /* style.css:1120 在 ≤1023 藏起这颗胶囊，是因为那时发布只存在于汉堡菜单里。
     现在底部栏接住了导航，顶栏按效果图重新露出主操作。 */
  .site-header .header-actions .publish-shortcut{display:inline-flex}

  /* 模板 §1 的落点补偿：按钮视觉仍是 38px 胶囊，实际可点区撑到 ~44px 高。
     两条样式规则里唯一用到伪元素的是 .publish-shortcut::before（左侧图标），
     这里只加 ::after，互不冲突。 */
  .site-header .header-actions .button{position:relative}
  .site-header .header-actions .button::after{content:"";position:absolute;top:-3px;right:-2px;bottom:-3px;left:-2px}

  /* 汉堡不再驱动导航。markup + main.js + .mobile-menu 全部原样留着：
     退出登录改由「我的」→ /mon-compte/（Dashboard V3 侧栏 nav-logout）承载。 */
  .menu-button{display:none}
}
