/* CodeFun2000 Intro · 与主站统一（2026-11-16）
 * 放在 cf-intro.css / cf-intro-v2.css 之后加载。只统一「站点外壳」：页面底色、顶栏、页脚。
 * 页面内容（标题、按钮、栏目标签、卡片、强调色）保持 cf-intro-v2.css 的黑白灰原样——
 * 它也是 react-page 各应用内容区的参照（shared/shell/styles/intro-look.css）。
 */

/* ================= 令牌：只换底色与顶栏，其余沿用 v2 ================= */
html[data-skin][data-theme]:not([data-theme="dark"]),
html:not([data-theme="dark"]) {
  --bg: #EDF0F2; --bg-2: #FFFFFF;
  --nav-bg: rgba(255,255,255,.72);
  --nav-hover: rgba(15,23,42,.05); --nav-active: rgba(15,23,42,.07);
}
html[data-skin][data-theme="dark"],
html[data-theme="dark"] {
  /* 主站暗色底 #121212；v2 原卡片 #0F0F0F 会比底色更暗，抬到主站卡片色 */
  --bg: #121212; --bg-2: #1C1E24; --panel: #23262E; --code: #16181D;
  --surface: #1C1E24; --surface-2: #23262E;
  --nav-bg: rgba(13,17,23,.7); --sheet-bg: rgba(28,30,36,.94);
  --nav-hover: rgba(255,255,255,.07); --nav-active: rgba(255,255,255,.1);
}

/* ================= 顶栏：主站 Glass（始终磨砂 + 底部细线，胶囊悬停） ================= */
html[data-skin][data-theme] .nav,
html[data-skin][data-theme] .nav.v2-scrolled {
  background: var(--nav-bg);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
/* 规格同主站：高 45px、铺满视口宽度（左右 24px）、链接 14px；用 px 不随本页 rem 缩放 */
html[data-skin][data-theme] .nav .wrap { max-width: none; height: 45px; padding: 0 24px; gap: 12px; }
html[data-skin][data-theme] .brand { font-weight: 600; letter-spacing: -.01em; font-size: 16px; }
html[data-skin][data-theme] .brand b { color: var(--blue); font-weight: 600; }
html[data-skin][data-theme] .nav-links { gap: 0; font-size: 14px; color: var(--ink-3); align-self: stretch; }
html[data-skin][data-theme] .nav-links a {
  position: relative; z-index: 0; display: inline-flex; align-items: center; gap: .375rem;
  padding: 0 16px; font-weight: 500; color: var(--ink-2); transition: color .18s ease;
}
html[data-skin][data-theme] .nav-links a::after {
  content: ""; position: absolute; inset: 8px 5px; z-index: -1; border-radius: 8px;
  background: var(--nav-hover); opacity: 0; transform: scale(.92);
  transition: opacity .2s ease, transform .25s cubic-bezier(.4,0,.2,1);
}
html[data-skin][data-theme] .nav-links a:hover { color: var(--ink); }
html[data-skin][data-theme] .nav-links a:hover::after { opacity: 1; transform: scale(1); }
html[data-skin][data-theme] .nav-links a:focus-visible { outline: 2px solid var(--blue); outline-offset: -6px; border-radius: .5rem; }
html[data-skin][data-theme] .nav-camp svg { color: currentColor; }

/* 主题按钮 / 账号：主站顶栏图标按钮（无边框、圆角 10、悬停淡底） */
html[data-skin][data-theme] .theme-btn,
html[data-skin][data-theme] .nav-user-btn {
  border: 0; border-radius: .625rem; background: transparent; color: var(--ink-2);
  -webkit-backdrop-filter: none; backdrop-filter: none; transition: background .18s ease, color .18s ease;
}
html[data-skin][data-theme] .theme-btn { width: 36px; height: 36px; border-radius: 10px; }
html[data-skin][data-theme] .theme-btn:hover,
html[data-skin][data-theme] .nav-user-btn:hover { background: var(--nav-hover); color: var(--blue); border-color: transparent; }
html[data-skin][data-theme] .nav-user-menu { border-radius: .75rem; border-color: var(--line); background: var(--surface); box-shadow: var(--shadow); }

/* ================= 页脚：内容与样式来自主站 /site-nav/site-footer.js（.cf-footer） =================
 * 本页 cf-intro.css / v2 皮肤也给 .footer 写了内边距、字号和颜色，这里在占位元素内复位，保持与主站一致 */
html[data-skin][data-theme] .intro-site-footer { margin-top: 48px; }
html[data-skin][data-theme] [data-cf-site-footer] .footer {
  max-width: none; margin: 0; padding: 0; border: 0; font-size: 13px; line-height: 1.7; color: #8b95a7;
}
html[data-skin][data-theme="dark"] [data-cf-site-footer] .footer { color: #8b949e; }

/* 主站 Logo + 图标链接（同主站顶栏：Logo 高 32px，图标 15px、与文字间距 6px） */
html[data-skin][data-theme] .brand .brand-logo { display: block; height: 32px; width: auto; }
html[data-skin][data-theme] .nav-links a svg { width: 15px; height: 15px; flex: none; margin-right: 0; color: currentColor; }
html[data-skin][data-theme] .nav-links a { gap: 6px; }

/* ================= 内容宽度：同主站首页 =================
 * 主站 Hydro 栅格内容宽：≥1000px 950、≥1280px 1170、首页 ≥1500px 1410（.row − 左右 15px）。
 * react-page 落地页与各顶栏用同一组断点（shared/shell/styles/site-nav.css 的 --cf-content-max）。
 * .wrap 自带左右 --gutter 内边距，所以 --max = 内容宽 + 2 × gutter；顶栏内容居中在同一宽度。 */
@media (min-width: 1000px) { :root { --max: calc(950px + 2 * var(--gutter)); } }
@media (min-width: 1280px) { :root { --max: calc(1170px + 2 * var(--gutter)); } }
@media (min-width: 1500px) { :root { --max: calc(1410px + 2 * var(--gutter)); } }
html[data-skin][data-theme] .nav .wrap { max-width: var(--max); padding: 0 var(--gutter); }
