/* ==========================================================================
   Chrome浏览器 站点主题层（chrome.ijinshan.com）
   色板取自 logo.webp 的 Chrome 官方四色：蓝 #1A73E8 / 绿 #34A853
                                          红 #EA4335 / 黄 #FBBC05
   本文件在 global.css 之后加载，负责换色 + 站点专属组件。
   ========================================================================== */

:root {
  /* ── Chrome 品牌四色 ── */
  --brand:        #1A73E8;
  --brand-dk:     #1557B0;
  --brand-lt:     #E8F0FE;
  --brand-2:      #34A853;
  --brand-2-dk:   #188038;
  --brand-2-lt:   #E6F4EA;
  --brand-red:    #EA4335;
  --brand-yellow: #FBBC05;

  /* ── 渐变（取 logo 中蓝绿相邻色）── */
  --grad-brand:      linear-gradient(135deg, #1A73E8 0%, #34A853 100%);
  --grad-brand-soft: linear-gradient(135deg, #E8F0FE 0%, #E6F4EA 100%);
  --grad-brand-line: linear-gradient(90deg, #1A73E8 0%, #34A853 50%, #FBBC05 100%);

  --line:   #E8EAED;
  --ink:    #202124;
  --ink-2:  #5F6368;
  --ink-3:  #80868B;

  /* ── 覆写 global.css 默认变量，全站换色 ── */
  --blue:     #1A73E8;
  --blue-dk:  #1557B0;
  --green:    #34A853;
  --red:      #EA4335;
  --gray-50:  #F8F9FA;
  --gray-100: #F1F3F4;
  --gray-200: #E8EAED;
  --gray-600: #5F6368;
  --gray-700: #3C4043;
  --gray-900: #202124;
  --radius:   10px;
  --shadow:   0 1px 3px rgba(60,64,67,.08), 0 1px 2px rgba(60,64,67,.05);
  --shadow-md:0 4px 12px rgba(60,64,67,.10), 0 2px 4px rgba(60,64,67,.06);
}

/* ── 锚点跳转避开 sticky header ── */
html { scroll-behavior: smooth; }
.reading-main h2, .main-content h2, .reading-main h3 { scroll-margin-top: 84px; }

/* ── #7 全站 hover 一律不加下划线 ── */
a:hover, a:focus, a:active,
.lead a:hover, .main-content a:hover, .footer a:hover { text-decoration: none !important; }

/* ── #10 统一默认字体：清除代码块/参数值上的等宽字体栈 ── */
code, kbd, samp, pre, .code-block, pre.code-block,
.entity-value, .trust-panel-md5 code {
  font-family: inherit !important;
  letter-spacing: 0;
}
/* 长报错码/长字符串必须可断行，避免窄屏横向溢出 */
code, .code-line, .code-inline, .entity-value {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   #1 #2 单栏站点导航（合并原多栏导航，清掉金山毒霸栏）
   ========================================================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 3px rgba(60,64,67,.06);
}
.site-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 6px;
  height: 64px; padding: 0 20px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; text-decoration: none; padding: 4px 6px 4px 0;
}
.site-logo img {
  width: 40px; height: 40px; display: block;
  object-fit: contain; flex-shrink: 0;
}
.site-logo-txt {
  font-size: 19px; font-weight: 800; color: var(--ink);
  white-space: nowrap; letter-spacing: .2px;
}
.site-logo:hover .site-logo-txt { color: var(--brand-dk); }

.site-nav {
  display: flex; align-items: center; gap: 2px;
  flex: 1; min-width: 0; margin-left: 18px;
  overflow-x: auto; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  display: flex; align-items: center;
  height: 38px; padding: 0 14px; border-radius: 10px;
  font-size: 15px; font-weight: 600; color: #3C4043;
  white-space: nowrap; transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--brand-lt); color: var(--brand-dk); }
.site-nav a.active {
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 8px rgba(26,115,232,.28);
}
.site-header-cta {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 18px; border-radius: 12px; flex-shrink: 0;
  background: var(--grad-brand); color: #fff !important;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(26,115,232,.26);
  transition: transform .15s, box-shadow .15s;
}
.site-header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(26,115,232,.32);
}
.site-header-cta svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ==========================================================================
   #3 #9 Hero：左文右图（首页 / 下载页）
   ========================================================================== */
.hero-split {
  position: relative; overflow: hidden;
  padding: 52px 0 46px;
  background:
    radial-gradient(circle at 8% 12%, rgba(26,115,232,.13) 0%, transparent 42%),
    radial-gradient(circle at 92% 8%,  rgba(251,188,5,.15) 0%, transparent 38%),
    radial-gradient(circle at 78% 92%, rgba(52,168,83,.13) 0%, transparent 44%),
    radial-gradient(circle at 18% 88%, rgba(234,67,53,.10) 0%, transparent 40%),
    #fff;
  border-bottom: 1px solid var(--line);
}
.hero-split-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: 44px; align-items: center;
}
.hero-split-text { min-width: 0; }
.hero-split-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; margin-bottom: 16px;
  border-radius: 999px; background: var(--brand-lt); color: var(--brand-dk);
  font-size: 13px; font-weight: 700;
}
.hero-split h1 {
  margin: 0 0 14px; color: var(--ink);
  font-size: 44px; line-height: 1.16; font-weight: 800;
}
.hero-split h1 .accent {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-split-sub {
  margin: 0 0 24px; max-width: 620px;
  color: var(--ink-2); font-size: 17px; line-height: 1.78;
}
.hero-split-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.hero-btn-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 12px 26px; border-radius: 12px;
  background: var(--grad-brand); color: #fff !important;
  box-shadow: 0 10px 24px rgba(26,115,232,.28);
  transition: transform .15s, box-shadow .15s;
}
.hero-btn-main:hover { transform: translateY(-1px); box-shadow: 0 13px 30px rgba(26,115,232,.34); }
.hero-btn-main .btn-txt { display: block; text-align: left; }
.hero-btn-main .btn-txt > span { display: block; font-size: 17px; font-weight: 800; line-height: 1.25; }
.hero-btn-main .btn-txt small {
  display: block; margin-top: 2px;
  color: rgba(255,255,255,.86); font-size: 11.5px; font-weight: 500;
}
.hero-btn-main svg { width: 21px; height: 21px; flex-shrink: 0; }

/* hero 之后的下载卡片区（原 hero 右栏内容下移） */
.hero-followup { padding: 28px 0 0; background: #fff; }
.hero-followup .chrome-download-card {
  max-width: 780px; margin: 0 auto;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 22px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  color: var(--ink) !important; font-weight: 700;
  transition: border-color .15s, background .15s;
}
.hero-btn-ghost:hover { border-color: var(--brand); background: var(--brand-lt); }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-top: 18px; color: var(--ink-2); font-size: 13px;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 5px; }
.hero-trust svg { width: 15px; height: 15px; color: var(--brand-2); flex-shrink: 0; }

.hero-split-media { min-width: 0; }
.hero-shot {
  display: block; width: 100%; height: auto;
  border-radius: 16px; border: 1px solid var(--line);
  box-shadow: 0 20px 44px rgba(60,64,67,.18);
  background: #fff;
}

/* ==========================================================================
   #9 内页 Hero（logo.webp 图标 + H1 + 副标，无矢量图）
   ========================================================================== */
.page-hero {
  position: relative; overflow: hidden;
  padding: 40px 0 32px;
  background:
    radial-gradient(circle at 6% 0%,  rgba(26,115,232,.10) 0%, transparent 46%),
    radial-gradient(circle at 94% 4%, rgba(52,168,83,.10) 0%, transparent 42%),
    #fff;
  border-bottom: 1px solid var(--line);
}
.page-hero-inner { display: flex; gap: 20px; align-items: flex-start; }
.page-hero-logo {
  width: 72px; height: 72px; flex-shrink: 0; display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(60,64,67,.16));
}
.page-hero-body { min-width: 0; }
.page-hero h1 {
  margin: 0 0 10px; color: var(--ink);
  font-size: 32px; line-height: 1.24; font-weight: 800;
}
.page-hero-sub {
  margin: 0; color: var(--ink-2);
  font-size: 16px; line-height: 1.78;
}

/* ==========================================================================
   #6 更新署名胶囊（H1 正下方，低权重 + 脉冲呼吸灯）
   ========================================================================== */
.update-capsule {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 16px; padding: 6px 14px;
  border-radius: 999px; border: 1px solid var(--line);
  background: #F8F9FA; color: var(--ink-3);
  font-size: 12.5px; line-height: 1; font-weight: 500;
}
.page-hero h1 + .update-capsule { margin: 12px 0 12px; }
.update-capsule time { color: var(--ink-3); font-weight: 600; }
.update-capsule .pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-2);
  animation: capsule-pulse 2s ease-in-out infinite;
}
@keyframes capsule-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,168,83,.55); }
  50%      { opacity: .5; box-shadow: 0 0 0 6px rgba(52,168,83,0); }
}

/* ==========================================================================
   #11 左侧悬挂目录 + 正文两栏
   ========================================================================== */
.reading-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 36px; align-items: start;
  padding: 32px 20px 8px;
}
.reading-side { position: sticky; top: 84px; }
.toc-left {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 12px;
  box-shadow: var(--shadow);
}
.toc-left h3 {
  margin: 0 0 10px; padding: 0 8px;
  font-size: 13px; font-weight: 800; color: var(--ink);
  letter-spacing: .4px;
}
.toc-left nav { display: flex; flex-direction: column; gap: 2px; }
.toc-left a {
  display: block; padding: 7px 10px;
  border-left: 3px solid transparent; border-radius: 0 8px 8px 0;
  font-size: 13.5px; line-height: 1.45; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.toc-left a:hover { background: var(--brand-lt); color: var(--brand-dk); }
.toc-left a.active {
  border-left-color: var(--brand-2); background: var(--brand-2-lt);
  color: var(--brand-2-dk); font-weight: 600;
}
.reading-main { min-width: 0; }
/* 左侧栏内复用的原有侧栏卡片 */
.reading-extra { margin-top: 16px; }
.reading-extra .sidebar-card {
  margin: 0 0 16px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow);
}
.reading-extra .sidebar-card:last-child { margin-bottom: 0; }
.reading-extra .sidebar-card h3 { color: var(--ink); }

/* ==========================================================================
   #8 卡片化排版 + bullet 规范化
   ========================================================================== */
.section-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 4px 26px 20px;
  margin: 22px 0; box-shadow: var(--shadow);
  border-top: 3px solid transparent;
  border-image: var(--grad-brand-line) 1;
  border-image-slice: 0 0 3 0;
}
.section-card > h2:first-child { margin-top: 20px; }
.section-card > h2 { border-bottom: none; padding-bottom: 0; }

/* 正文段落与列表的规范化间距 */
.reading-main p, .main-content p { line-height: 1.82; }
.reading-main h2, .main-content h2 {
  font-size: 22px; line-height: 1.4; margin: 34px 0 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--gray-100);
}
.reading-main ul, .reading-main ol,
.main-content ul, .main-content ol { padding-left: 0; list-style: none; }
.reading-main li, .main-content li {
  position: relative; padding-left: 22px; margin-bottom: 9px; line-height: 1.78;
}
.reading-main ul > li::before, .main-content ul > li::before {
  content: ""; position: absolute; left: 6px; top: .72em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-2);
}
.reading-main ol > li, .main-content ol > li { counter-increment: stepc; }
.reading-main ol, .main-content ol { counter-reset: stepc; }
.reading-main ol > li::before, .main-content ol > li::before {
  content: counter(stepc); position: absolute; left: 0; top: .18em;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--brand-lt); color: var(--brand-dk);
  font-size: 11px; font-weight: 800; line-height: 17px; text-align: center;
}
/* 步骤列表（.step-list）卡片化 */
.step-list > li {
  padding: 10px 14px 10px 40px; border: 1px solid var(--line);
  border-radius: 10px; background: #FCFCFD; margin-bottom: 10px;
}
.step-list > li::before {
  left: 13px; top: 13px !important; background: var(--grad-brand) !important;
  color: #fff !important; width: 18px !important; height: 18px !important;
  line-height: 18px !important;
}
/* 正文结构化组件（原内联样式收敛） */
.refer-card {
  margin: 24px 0; padding: 18px 20px;
  background: var(--brand-lt); border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  color: #174EA6; font-size: 14.5px; line-height: 1.78;
}
.refer-card strong { color: var(--brand-dk); }
.refer-card a { color: var(--brand-dk); font-weight: 700; }
.code-line {
  display: inline-block; margin: 8px 0; padding: 5px 12px;
  border-radius: 6px; background: var(--ink); color: #fff; font-size: 13.5px;
}
.code-inline {
  padding: 2px 7px; border-radius: 5px;
  background: var(--gray-100); color: var(--ink); font-size: .95em;
}
.info-card {
  margin: 24px 0; padding: 20px 22px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.card-title-flush { margin-top: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.card-desc { font-size: 14px; margin-bottom: 12px; color: var(--ink-2); }
.cta-row-center {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin: 40px 0 20px; text-align: center;
}
.figure-block { margin: 32px 0; text-align: center; }
.figure-svg {
  max-width: 100%; height: auto;
  background: var(--gray-50); border: 1px solid var(--line);
  border-radius: 12px;
}
.figure-caption { margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.btn-meta { margin: 6px 0 0; font-size: 12px; opacity: .78; }
.btn-lg { font-size: 16px; padding: 14px 40px; }
.btn-sm { font-size: 15px; }
.btn-outline { background: #fff; color: var(--brand-dk); border: 1px solid var(--brand); }
.btn-outline:hover { background: var(--brand-lt); }
.link-em { color: var(--brand-dk); font-weight: 700; }
.spaced { margin-top: 24px; }

/* 提示条 */
.reading-main .note, .main-content .note, .tip-box {
  background: var(--brand-lt); border-left: 4px solid var(--brand);
  border-radius: 0 10px 10px 0; padding: 13px 16px; margin: 16px 0;
  color: #174EA6; font-size: 14px;
}
.tip-box { background: var(--brand-2-lt); border-left-color: var(--brand-2); color: #0D652D; }

/* 卡片网格与工具项的 Chrome 化 */
.tool-item {
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow);
}
.tool-item h3 { color: var(--ink); }
.card:hover, .hub-card-v2:hover { border-color: var(--brand); }
.entity-card {
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, #fff, #FAFBFC);
  box-shadow: var(--shadow);
}
.entity-card h2 { border-bottom: none; }

/* 表格 Chrome 化 */
.compare-table th { background: var(--gray-100); color: var(--ink); }
.compare-table tr:hover td { background: var(--brand-lt); }

/* 面包屑 */
.breadcrumb { color: var(--ink-3); padding: 12px 20px 0; }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { color: var(--gray-200); }

/* FAQ Chrome 化 */
.faq-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.faq-q {
  background: #F8F9FA; color: var(--ink);
  border-left: 3px solid var(--brand-2);
}
.faq-item-v2 { background: #fff; }

/* 按钮 Chrome 化 */
.btn-primary {
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 6px 16px rgba(26,115,232,.24);
}
.btn-secondary { background: #fff; color: var(--brand-dk); border: 1px solid var(--line); }
.cta-primary {
  background: var(--grad-brand) !important; color: #fff !important;
  box-shadow: 0 8px 20px rgba(26,115,232,.26);
}
.cta-secondary { border: 1px solid var(--line); color: var(--ink) !important; }

/* 页脚底部导航悬停色 */
.footer-col a:hover { color: var(--brand-yellow); }

/* ==========================================================================
   响应式：#3 图在文字下方（页面缩窄时）
   ========================================================================== */
@media (max-width: 900px) {
  .hero-split { padding: 34px 0 30px; }
  .hero-split-inner { grid-template-columns: 1fr; gap: 26px; }
  .hero-split h1 { font-size: 30px; }
  .hero-split-sub { font-size: 15.5px; }
  .hero-split-media { order: 2; }
  .hero-split-text { order: 1; }
  .hero-split-actions { display: grid; grid-template-columns: 1fr; }
  .hero-btn-main, .hero-btn-ghost { width: 100%; min-height: 52px; }

  .page-hero { padding: 28px 0 24px; }
  .page-hero h1 { font-size: 25px; }
  .page-hero-logo { width: 56px; height: 56px; }

  .reading-layout { grid-template-columns: 1fr; gap: 20px; padding: 20px 20px 8px; }
  .reading-side { position: static; }
  .toc-left { padding: 14px 10px; }
  .toc-left nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .toc-left a { border-left: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
  .toc-left a.active { border-color: var(--brand-2); }
  .section-card { padding: 4px 18px 16px; }

  .site-header-inner { height: 58px; gap: 4px; }
  .site-logo img { width: 34px; height: 34px; }
  .site-logo-txt { font-size: 16.5px; }
  .site-nav { margin-left: 8px; }
  .site-nav a { height: 34px; padding: 0 10px; font-size: 14px; }
  .site-header-cta { height: 38px; padding: 0 13px; font-size: 14px; }
  .site-header-cta span { display: none; }
}

@media (max-width: 640px) {
  /* 窄屏 header 拆两行：第一行 logo + 下载按钮，第二行导航（可横滑） */
  .site-header-inner { flex-wrap: wrap; height: auto; padding: 8px 16px 0; }
  .site-logo { order: 1; }
  .site-logo img { width: 32px; height: 32px; }
  .site-logo-txt { font-size: 16px; }
  .site-header-cta { order: 2; margin-left: auto; }
  .site-nav {
    order: 3; flex: 0 0 100%; margin: 0;
    border-top: 1px solid var(--line); padding-top: 2px;
  }
  .site-nav a { height: 38px; }
  .update-capsule { font-size: 12px; padding: 5px 12px; }
}

@media (max-width: 480px) {
  .hero-split h1 { font-size: 26px; }
  .page-hero-inner { gap: 14px; }
  .page-hero h1 { font-size: 22px; }
  .site-nav a { padding: 0 10px; font-size: 13.5px; }
}
