/* legacy-chrome.css —— 只在 styleSet="hybrid" 时加载，排在 site-scoped.css 之后。
 *
 * site-scoped.css 已经把 site.css 的全部规则搬进页头/页尾/CTA 子树，
 * 但它只能覆盖 site.css 本来就声明过的属性。旧主题里那些「site.css 没有对应声明」
 * 的属性仍会渗进新页头页尾，本文件逐条中和它们。
 *
 * 加一条就写清楚中和的是哪条旧规则，便于日后核对。
 * 详见 docs/SITE_REDESIGN_MIGRATION_PLAN.md §9.25。
 */

/* pledgebox-theme.css: a { padding-top: 24px; transition: all .5s }
   site.css 的 a 只声明 color / text-decoration，管不到这两个属性。
   padding-top 会把页头导航与页尾的每个链接整体撑高 24px。 */
:is(.header, body > .cta, body > footer) a,
.skip {
  padding-top: 0;
  transition: none;
}

/* pledgebox-theme.css: .button { letter-spacing:1px; margin-right:10px; line-height:20px }
   与 @479 的 .button { text-align:center }。site.css 的 .button 没有这几个属性，
   于是旧值直接渗进页头的 Log in / Get started 与 CTA 的 Subscribe，
   字距变宽、按钮之间多出 10px、行高被压到 20px。 */
:is(.header, body > .cta, body > footer) .button {
  letter-spacing: normal;
  margin-right: 0;
  line-height: 1.65;
  text-align: inherit;
}

/* pledgebox-theme.css: .button:hover { border-style:dashed; border-color:var(--orange-2) }
   site.css 的 .button:hover 只声明 background / color，悬停时边框会变成橙色虚线。
   取值照抄 site.css 的 .button / .button.primary。 */
:is(.header, body > .cta, body > footer) .button:hover {
  border-style: solid;
  border-color: #cbd4e3;
}
:is(.header, body > .cta, body > footer) .button.primary:hover {
  border-color: var(--blue);
}

/* pledgebox-theme.css: label { letter-spacing:1px; text-transform:uppercase; margin-bottom:10px;
   font-size:12px; font-weight:500; line-height:20px } 与 pledgebox-core.css: label { display:block;
   margin-bottom:5px; font-weight:bold }。V2 对 label 没有任何声明，全走 UA 默认与继承。
   页尾订阅框的 label 是 .sr-only（视觉隐藏），此处求的是与 V2 完全一致。 */
:is(.header, body > .cta, body > footer) label {
  display: inline;
  letter-spacing: normal;
  text-transform: none;
  margin-bottom: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* pledgebox-theme.css: .body-2 { padding-top: 64px }
   这 64px 是给旧的 fixed 导航栏让位的。新页头是 sticky、自己占位，留着它会在页头上方
   多出一条 64px 白带，并让 sticky 看起来失灵。projects / search / signup 三页用到 body-2。
   只中和 padding，正文内部的相对排版不受影响。 */
body.body-2 {
  padding-top: 0;
}

/* site.css: .header { z-index: 20 } / .skip { z-index: 100 }
   这两个值是按改版页的层级体系定的，但遗留页沿用旧体系——旧页头 .pb_navigation 是
   z-index:1000。search 页在 ≤1024px 会自动弹出搜索抽屉，遮罩 z-index:998、抽屉 999，
   会把 z-index:20 的新页头整个盖住，移动端导航点不到。
   取 1001：高于抽屉与遮罩，低于 search 的模态框（2000），与旧页头行为一致。 */
/* 重复类名是为了凑够特异性 (0,2,1)：site-scoped.css 里作用域化后的
   `.header:is(SCOPE)` 正是 (0,2,1)，选择器弱于它就压不住原来的 z-index。
   本文件排在 site-scoped.css 之后，同特异性即可胜出。 */
body > .header.header,
body > .skip.skip {
  z-index: 1001;
}
