/*
 * 统一顶栏（2026-12-01）：官网各页（博客、Growth Lab、价格、联盟）的头部与新首页（new-web）一致——
 * 48px 白底细分割线、左 logo、纯文字导航、直角按钮；保留「Start free」和语言切换。
 * 放在每个布局最后加载，覆盖 styles.css / blog / account 里旧的胶囊样式。桌面端为主。
 */
header.site-header,
header.site-header[data-home] {
  --hd-ink: #0a0a0a;
  --hd-text-2: #5c5c5c;
  --hd-line: #e3e3e3;
  --hd-brand: #003fe6;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 49px;
  min-height: 0;
  margin: 0;
  padding: 0 24px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--hd-line);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Arial, sans-serif;
  max-width: none;
  width: 100%;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
}
header.site-header .brand { position: static; flex: none; order: 0; margin: 0; transform: none; display: inline-flex; align-items: center; }
header.site-header .brand img,
header.site-header .brand svg { height: 18px; width: auto; }

@media (min-width: 561px) {
  header.site-header nav,
  header.site-header nav[data-open] {
    position: static;
    order: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    flex-direction: row;
    width: auto;
    height: auto;
  }
  header.site-header nav > a,
  header.site-header nav > a[aria-current="page"] {
    position: static;
    padding: 6px 10px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--hd-text-2);
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    transform: none;
    transition: color 120ms ease;
  }
  header.site-header nav > a:hover { color: var(--hd-ink); background: none; transform: none; }
  header.site-header nav > a[aria-current="page"] { color: var(--hd-ink); }
  header.site-header nav > a[aria-current="page"]::after { content: none; }
  header.site-header nav > .nav-demo-mobile { display: none; }
  header.site-header .menu-toggle { display: none; }
}

header.site-header .header-actions { order: 2; display: flex; align-items: center; gap: 8px; margin-inline-start: auto; flex: none; }

/* Start free：品牌色直角小按钮，和新首页「Generate brief」同色 */
header.site-header .header-demo {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--hd-brand);
  border-radius: 0;
  background: var(--hd-brand);
  box-shadow: none;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  transform: none;
}
header.site-header .header-demo:hover { background: #002fb0; border-color: #002fb0; transform: none; box-shadow: none; }

/* 语言切换：纯文字触发器 */
header.site-header .language-switcher > summary {
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--hd-text-2);
  font-size: 14px;
  font-weight: 500;
}
header.site-header .language-switcher > summary:hover,
header.site-header .language-switcher[open] > summary { color: var(--hd-ink); background: color-mix(in srgb, var(--hd-ink) 5%, transparent); }
header.site-header .language-switcher > div { border-radius: 0; }

/* Sign in：白底细边直角按钮，和新首页一致 */
header.site-header .user-login,
header.site-header .user-account-slot .user-menu-trigger {
  display: inline-flex;
  align-items: center;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--hd-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  color: var(--hd-text-2);
  font-size: 13px;
  font-weight: 500;
}
header.site-header .user-login:hover { background: #f4f4f4; color: var(--hd-ink); }
/* 隐形占位字和按钮叠在同一格（与手机端同一做法），不再并排多出 75px、按钮也不再顶到上边 */
header.site-header .user-account-slot { display: inline-grid; height: 32px; min-width: 0; min-height: 0; align-items: center; }
header.site-header .user-account-slot > * { grid-area: 1 / 1; align-self: center; margin: 0; }
header.site-header .user-account-slot > .user-account-size { visibility: hidden; height: 32px; min-height: 0; padding: 0 10px; font-size: 13px; font-weight: 500; }

/* 旧样式里有更具体的选择器（带 !important / 页面前缀）会把高度、内边距和按钮尺寸撑回去：这里钉死关键尺寸。 */
@media (min-width: 561px) {
  header.site-header,
  header.site-header[data-home] { height: 49px !important; min-height: 0 !important; padding: 0 24px !important; gap: 24px !important; }
  header.site-header nav > a { height: 32px !important; min-height: 0 !important; display: inline-flex; align-items: center; }
  header.site-header .header-demo,
  header.site-header .user-login,
  header.site-header .user-account-slot .user-menu-trigger { height: 32px !important; min-height: 0 !important; padding: 0 12px !important; font-size: 13px !important; line-height: 1 !important; }
  header.site-header .user-login { padding: 0 10px !important; color: var(--hd-text-2) !important; }
  header.site-header .user-account-slot { height: 32px !important; }
}
/* logo 占位与新首页一致（136px 宽），这样导航起点对齐 */
@media (min-width: 561px) {
  header.site-header .brand { width: 136px !important; min-width: 136px; max-width: none !important; }
}
/* 当前页：深色文字，不用蓝色和下划线（博客样式里有旧规则） */
header.site-header nav > a[aria-current="page"] { color: var(--hd-ink) !important; }
header.site-header nav > a[aria-current="page"]::after { content: none !important; display: none !important; }
/* 导航文字不换行（窄桌面时 “Growth Lab” 会折成两行） */
header.site-header nav > a { white-space: nowrap; }

/* 手机端（≤560px，与新首页收起导航的断点一致）：同一套白底 48px 细线顶栏——logo、Start free、语言、Sign in、直角菜单按钮；导航收进下拉 */
@media (max-width: 560px) {
  header.site-header,
  header.site-header[data-home] { height: 49px !important; min-height: 0 !important; padding: 0 12px !important; gap: 6px !important; display: flex !important; }
  header.site-header .brand { flex: none !important; width: auto !important; min-width: 0 !important; max-width: none !important; }
  header.site-header .header-actions { order: 1; gap: 4px; align-items: center; }
  header.site-header .header-demo { height: 32px !important; padding: 0 10px !important; font-size: 13px !important; min-height: 0 !important; }
  header.site-header .language-switcher > summary { padding: 0 6px; }
  header.site-header .user-login,
  header.site-header .user-account-slot .user-menu-trigger { height: 32px !important; min-height: 0 !important; padding: 0 8px !important; font-size: 13px !important; }
  header.site-header .user-account-slot { display: inline-grid !important; width: auto !important; min-width: 0 !important; }
  header.site-header .user-account-slot > * { grid-area: 1 / 1; align-self: center; margin: 0 !important; }
  header.site-header .user-account-slot > .user-account-size { visibility: hidden; height: 32px !important; padding: 0 8px !important; font-size: 13px !important; min-height: 0 !important; display: inline-flex; align-items: center; }
  header.site-header .menu-toggle {
    order: 2;
    flex: none;
    width: 32px;
    height: 32px;
    gap: 4px;
    border: 1px solid var(--hd-line);
    border-radius: 0;
    background: #fff;
  }
  header.site-header .menu-toggle span { width: 14px; height: 1.5px; background: var(--hd-ink); }
  header.site-header .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(2.75px) rotate(45deg); }
  header.site-header .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-2.75px) rotate(-45deg); }
  header.site-header nav { top: 48px; padding: 8px 16px 12px; border-top: 1px solid var(--hd-line); border-bottom: 1px solid var(--hd-line); box-shadow: none; border-radius: 0; }
  header.site-header nav > a,
  header.site-header nav > a[aria-current="page"] { min-height: 44px; padding: 0; display: flex; align-items: center; background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--hd-text-2); font-size: 15px; font-weight: 500; }
  header.site-header nav > a + a { border-top: 1px solid var(--hd-line); }
  header.site-header nav > .nav-demo-mobile { display: none !important; }
}

/*
 * 页面底色与新首页一致（2026-12-01）：纯白，不要点阵、鼠标跟随的点阵光晕和淡紫渐变。
 * 新首页（new-web）是纯白底；官网各页原先有 body::before/::after 点阵和 main 渐变，看起来像两套站。
 */
html, body { background: #fff !important; }
body::before, body::after { content: none !important; display: none !important; }
main { background: transparent !important; }

/* 顶栏字体与新首页同一份 Inter（拷自 new-web 的 next/font 文件），否则各机器回落到系统字体，导航宽度差 1–2px，切页时会跳 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * 价格页卡片与新首页一致（2026-12-01）：Inter 字体、深色字、品牌蓝 #003fe6、8px 圆角按钮、紧凑字号；
 * 桌面一行 4 张（原来窄桌面会折成 2×2，按钮又大又圆，像另一个站）。
 */
#pricing .pricing-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: min(1200px, calc(100% - 48px)) !important;
  max-width: none !important;
  margin: 48px auto 0 !important;
}
@media (max-width: 1099px) { #pricing .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 760px) { #pricing .pricing-grid { grid-template-columns: 1fr !important; } }
#pricing .plan, #pricing .plan * { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Arial, sans-serif !important; }
#pricing .plan {
  min-height: 0 !important;
  max-width: none !important;
  padding: 24px !important;
  border: 1px solid #e3e3e3 !important;
  border-radius: 12px !important;
  color: #0a0a0a !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column;
}
#pricing .plan-team { border-color: #003fe6 !important; }
#pricing .plan-header { height: auto !important; gap: 12px !important; align-items: center; }
#pricing .plan-icon { width: 40px !important; height: 40px !important; }
#pricing .plan-header h3 { font-size: 18px !important; line-height: 24px !important; font-weight: 600 !important; letter-spacing: -0.01em; }
#pricing .plan-header p { font-size: 13px !important; line-height: 18px !important; font-weight: 400 !important; color: #5c5c5c; margin-top: 2px; }
#pricing .plan-price { margin-top: 24px !important; min-height: 0 !important; font-size: 36px !important; line-height: 40px !important; font-weight: 600 !important; letter-spacing: -0.02em; }
#pricing .plan-price .currency { font-size: 20px !important; line-height: 28px !important; }
#pricing .plan-price .period { font-size: 14px !important; margin-left: 4px !important; font-weight: 500; color: #5c5c5c; letter-spacing: 0; }
#pricing .plan-allowance { margin-top: 16px !important; min-height: 40px !important; padding: 8px 12px !important; border-radius: 8px !important; font-size: 13px !important; line-height: 18px !important; background: #f7f7f7 !important; border-color: #e3e3e3 !important; }
#pricing .plan-action {
  margin-top: 12px !important;
  height: 40px !important;
  border-radius: 8px !important;
  background: #003fe6 !important;
  border: 1px solid #003fe6 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transform: none !important;
}
#pricing .plan-action:hover { background: #002fb0 !important; border-color: #002fb0 !important; }
#pricing .plan-enterprise .plan-action { background: #fff !important; color: #0a0a0a !important; border-color: #e3e3e3 !important; }
#pricing .plan-enterprise .plan-action:hover { background: #f4f4f4 !important; }
#pricing .plan-features { margin-top: 20px !important; padding-top: 20px !important; border-top-color: #e3e3e3 !important; font-size: 13px !important; line-height: 20px !important; font-weight: 400 !important; }
#pricing .plan-features > p { font-weight: 500 !important; margin-bottom: 10px !important; }
#pricing .plan-features li { gap: 8px !important; margin-top: 8px !important; font-size: 13px !important; }
#pricing .plan-features li img { width: 16px !important; height: 16px !important; }
#pricing .pricing-grid > .plan::before, #pricing .pricing-grid > .plan::after { display: none !important; }
#pricing .pricing-grid > .plan:hover { transform: none !important; }

/* 页脚简介：放宽并均衡换行，避免末行孤字 */
#site-footer .footer-description { width: auto !important; max-width: 100% !important; text-wrap: balance; }

/* 月付 / 年付切换（纯 CSS，无需客户端 JS） */
#pricing .billing-toggle { display:flex; gap:4px; width:max-content; margin:0 auto 28px; padding:4px; border:1px solid #e5e7eb; border-radius:999px; background:#fff; font-family:Inter,system-ui,sans-serif; font-size:14px; }
#pricing .billing-toggle input { position:absolute; opacity:0; pointer-events:none; }
#pricing .billing-toggle label { padding:8px 16px; border-radius:999px; cursor:pointer; color:#5c5c5c; transition:background .2s, color .2s; }
#pricing .billing-toggle input:checked + label { background:#003fe6; color:#fff; }
#pricing .billing-toggle input:focus-visible + label { outline:2px solid #003fe6; outline-offset:2px; }
#pricing .billing-save { margin-left:4px; font-size:12px; font-weight:600; color:#16a34a; }
#pricing .billing-toggle input:checked + label .billing-save { color:#d1fae5; }
#pricing .plan-price[data-billing="annual"] { display:none; }
#pricing:has(#billing-annual:checked) .plan-price[data-billing="annual"] { display:block; }
#pricing:has(#billing-annual:checked) .plan-price[data-billing="monthly"] { display:none; }
#pricing .plan-billed { display:block; margin-top:4px; font-size:13px; font-weight:400; color:#5c5c5c; letter-spacing:0; }

/*
 * 价格卡片 v2（2026-12-01）：借鉴「顶部价格面板 + 折扣 + 积分换算成能数的工作量 + 分组功能」的结构，
 * 仍用 CoreMate 自己的白底、Inter、品牌蓝 #003fe6；推荐档 Growth 用品牌蓝渐变面板。
 */
#pricing .pricing-grid { align-items: start; }
#pricing .pc { padding: 0 !important; border: 0 !important; background: transparent !important; overflow: visible; }
#pricing .pc-head { position: relative; padding: 22px 22px 20px; border: 1px solid #e3e3e3; border-radius: 14px; background: linear-gradient(180deg, #f7f8fb 0%, #ffffff 100%); }
#pricing .pc-featured .pc-head { border-color: transparent; color: #fff; background: radial-gradient(120% 90% at 100% 0%, #5b8cff 0%, rgba(91,140,255,0) 60%), linear-gradient(160deg, #1d56ff 0%, #003fe6 55%, #0030b3 100%); box-shadow: 0 18px 40px -18px rgba(0,63,230,.55); }
#pricing .pc-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#pricing .pc-title h3 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 650; letter-spacing: -0.02em; }
#pricing .pc-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28); font-size: 12px; font-weight: 600; }
#pricing .pc-fit { margin: 4px 0 0; min-height: 36px; font-size: 13px; line-height: 18px; color: #5c5c5c; }
#pricing .pc-featured .pc-fit { color: rgba(255,255,255,.82); }
#pricing .pc-price { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 0; min-height: 40px; }
#pricing .pc-price b { font-size: 36px; line-height: 40px; font-weight: 650; letter-spacing: -0.03em; }
#pricing .pc-price s { font-size: 22px; font-weight: 500; color: #9a9a9a; text-decoration-thickness: 2px; }
#pricing .pc-featured .pc-price s { color: rgba(255,255,255,.55); }
#pricing .pc-price span { font-size: 13px; font-weight: 500; color: #5c5c5c; }
#pricing .pc-featured .pc-price span { color: rgba(255,255,255,.82); }
#pricing .pc-cta { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; margin-top: 18px; border-radius: 10px; background: #003fe6; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, transform .15s; }
#pricing .pc-cta:hover { background: #002fb0; }
#pricing .pc-featured .pc-cta { background: #fff; color: #0a0a0a; }
#pricing .pc-featured .pc-cta:hover { background: #eef2ff; }
#pricing .plan-enterprise .pc-cta { background: #fff; color: #0a0a0a; border: 1px solid #e3e3e3; }
#pricing .plan-enterprise .pc-cta:hover { background: #f4f4f4; }
#pricing .pc-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; background: #e7eeff; color: #003fe6; font-style: normal; font-size: 12px; font-weight: 650; }
#pricing .pc-cta:not(:hover) .pc-pill { }
#pricing .plan:not(.pc-featured) .pc-cta .pc-pill { background: rgba(255,255,255,.18); color: #fff; }
#pricing .pc-pill i { width: 1px; height: 10px; background: currentColor; opacity: .4; }
#pricing .pc-cta .pc-pill[data-billing="annual"],
#pricing .pc-price[data-billing="annual"] { display: none; }
#pricing:has(#billing-annual:checked) .pc-price[data-billing="annual"],
#pricing:has(#billing-annual:checked) .pc-pill[data-billing="annual"] { display: inline-flex; }
#pricing:has(#billing-annual:checked) .pc-price[data-billing="monthly"],
#pricing:has(#billing-annual:checked) .pc-pill[data-billing="monthly"] { display: none; }

#pricing .pc-body { padding: 4px 22px 8px; }
#pricing .pc-credits { padding: 18px 0; border-bottom: 1px solid #ececec; }
#pricing .pc-credits p { margin: 0; }
#pricing .pc-credits-main { font-size: 15px; line-height: 22px; }
#pricing .pc-credits-main b { font-weight: 650; color: #0a0a0a; }
#pricing .pc-featured .pc-credits-main b { color: #003fe6; }
#pricing .pc-credits-main span { color: #8a8a8a; }
#pricing .pc-credits-sub { position: relative; margin-top: 8px !important; padding-left: 20px; font-size: 13px; line-height: 20px; color: #6b6b6b; }
#pricing .pc-credits-sub::before { content: ""; position: absolute; left: 6px; top: -4px; width: 8px; height: 13px; border-left: 1.5px solid #cfd6e4; border-bottom: 1.5px solid #cfd6e4; border-bottom-left-radius: 4px; }
#pricing .pc-credits-sub b { color: #0a0a0a; font-weight: 600; }
#pricing .pc-group { padding: 16px 0; }
#pricing .pc-group + .pc-group { border-top: 1px solid #ececec; }
#pricing .pc-label { margin: 0 0 10px; font-size: 12px; line-height: 16px; font-weight: 500; color: #8a8a8a; }
#pricing .pc-seats { margin: 0; font-size: 14px; font-weight: 600; }
#pricing .pc ul { margin: 0; padding: 0; list-style: none; }
#pricing .pc li { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; font-size: 13px; line-height: 20px; color: #262626; }
#pricing .pc li:first-child { margin-top: 0; }
#pricing .pc li svg { flex: none; margin-top: 2px; color: #003fe6; }
#pricing .pc-price { flex-wrap: wrap; row-gap: 0; }
#pricing .pc-price span { white-space: nowrap; }
#pricing .pc-price[data-billing="annual"] { column-gap: 6px; }
#pricing .pc-price[data-billing="annual"] s { font-size: 18px; }
