/* =========================================================
   我的数学花园 · 基础样式 / 设计令牌 / 通用组件
   风格：Apple 浅色 + 玻璃拟态（Glassmorphism）
   ========================================================= */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 字体三件套，均由 assets/fonts/ 自托管（详见 fonts.css 顶部说明）：
     · 正文/界面 → MiSans VF，方块汉字里笔画最匀的一种现代黑体，替代系统雅黑
     · 大标题   → 思源宋体，衬线是数学印刷的母语（LaTeX 就是 Computer Modern）
     · 数字编号 → JetBrains Mono，等宽让数字成列，像仪表盘而不是句子 */
  --font-sans: "MiSans VF", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Noto Serif SC Variable", "Songti SC", "SimSun", Georgia, serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  /* 题目正文（题干 / 选项 / 答案 / 解析）单独一套：中文宋体，数字与西文 Times New Roman。
     顺序不能颠倒——Times 排在前面且自带拉丁字形，数字与英文按 Times 出，
     汉字它没有，才回落到思源宋体。想要的效果正好靠「有就用、没有就让」实现，
     不需要给字符分类。
     公式不受影响：KaTeX 的 .katex / .mord 自带 font-family，直接声明的规则
     永远赢过继承，所以容器上设什么都没关系（切勿写成 `.katex *`）。 */
  --font-read: "Times New Roman", "Tinos", "Liberation Serif",
    "Noto Serif SC Variable", "Songti SC", "STSong", "SimSun", serif;

  /* 页面底色：米白纸，不再是纯白（2026-11-09 视觉改版）。
     纯白配灰字最省事，但整屏白会显得空；纸色让白卡片自己浮起来，
     层次不用靠加粗边框去硬撑。 */
  --bg-1: #f2eee6;
  --bg-2: #e8e3d9;

  /* 玻璃面比纸底更白一档，长题干落在上面才清楚 */
  --glass: rgba(255, 255, 255, 0.88);
  --glass-2: rgba(255, 255, 255, 0.96);
  --glass-solid: #ffffff;
  /* 原先的「白色描边」在纸底上等于不存在，改为墨色发丝线 */
  --stroke: rgba(24, 31, 43, 0.075);
  --line: rgba(24, 31, 43, 0.11);
  --line-2: rgba(24, 31, 43, 0.18);

  /* 中性墨色文字层级，整体压深半档，纸底上更实 */
  --t1: #191d24;
  --t2: #565d67;
  --t3: #8a9099;
  /* 解析正文的墨色：比 --t2 深一档。宋体的横画只有竖画的四分之一粗，
     用 --t2 的灰在米白纸上会发虚，读长推导时眼睛吃力。 */
  --ink-read: #333b45;

  /* 主色由「电光蓝」改为「墨蓝」：降饱和、压明度。
     好处一是压得住纸色底，二是和难度语义色（青 / 琥珀 / 品红）不再撞调。 */
  --blue: #1d4b76;
  --blue-600: #153a5e;
  --blue-soft: rgba(29, 75, 118, 0.09);
  --green: #1c8055;
  --green-soft: rgba(28, 128, 85, 0.11);
  --orange: #b8791c;
  --orange-soft: rgba(184, 121, 28, 0.12);
  --red: #c2453c;
  --red-soft: rgba(194, 69, 60, 0.11);
  --purple: #6a5aa8;
  --purple-soft: rgba(106, 90, 168, 0.11);
  --teal: #0f8b8b;
  --teal-soft: rgba(15, 139, 139, 0.11);

  /* 难度语义色：色相取自 LeetCode 浅色主题 #00af9b / #ffb800 / #ff2d55。
     原色给圆点/色条，-ink 是白底上可读的文字版，-soft 是浅底。
     只表示难度，不挪用于通用的成功 / 警告 / 危险提示。 */
  /* 难度语义色：色相仍取力扣三色，但降了饱和、提了墨感，
     免得在纸色底上跳出三个荧光点。只表示难度，不挪用于成功/警告/危险。 */
  --sem-easy: #0f9b8a;  --sem-easy-ink: #0a7a6c;  --sem-easy-soft: #e6f4f1;
  --sem-mid:  #d9a021;  --sem-mid-ink:  #8f6309;  --sem-mid-soft:  #fbf1da;
  --sem-hard: #cf3b4c;  --sem-hard-ink: #ab2b3a;  --sem-hard-soft: #fbe7e9;

  /* 圆角整体收一档：22px 的胶囊感偏软，18px 更接近「印刷品切边」 */
  --r-xs: 6px;
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 18px;
  --r-xl: 26px;

  /* 阴影改暖调（墨色带一点褐），避免冷灰投影在米白纸上显脏 */
  --sh-1: 0 1px 2px rgba(28, 24, 18, 0.035), 0 6px 18px -8px rgba(28, 24, 18, 0.10);
  --sh-2: 0 14px 36px -14px rgba(28, 24, 18, 0.17);
  --sh-3: 0 32px 80px -26px rgba(28, 24, 18, 0.30);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --topbar-h: 64px;
  --maxw: 1400px;
}

/* ---------- 2. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
/* 经典 sticky footer：body 竖向撑满一屏，.view 吃掉剩余高度，
   内容不足一屏时页脚也贴在视口底部，不会在页脚下方留一大片背景空白 */
body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--font-sans);
  color: var(--t1);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.62;
  letter-spacing: 0.006em;   /* 黑体在 15px 上下略挤，给一丁点字距 */
}
h1, h2, h3, h4, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(29, 75, 118, 0.18); }

/* ---------- 3. 背景层 ---------- */
/* 2026-11-09：从「纯白平铺」改为「纸 + 坐标方格」。
   方格是这个站的母语——数学题的底稿就是坐标纸。做成 32px 的极淡网格，
   用径向遮罩让它只在天头隐约出现、往下化掉，不干扰读题；
   再叠两层极淡的冷暖光晕（左上偏青、右上偏米），把平面"照亮"一点点。
   想退回纯白：把 .bg-grid 的 display 改回 none，.bg-layer::before 的
   background 改回 #ffffff 即可。 */
.bg-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
/* 四周压暗一档（不到 3%），中心留亮：纸面因此有了被台灯照着的体积感 */
.bg-layer::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(130% 90% at 50% 12%, transparent 58%, rgba(24, 31, 43, 0.035) 100%);
}
.bg-layer::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 560px at 6% -8%, rgba(203, 217, 230, 0.45), transparent 62%),
    radial-gradient(920px 520px at 97% -6%, rgba(232, 221, 202, 0.50), transparent 58%),
    radial-gradient(1000px 620px at 50% 106%, rgba(226, 222, 213, 0.45), transparent 62%),
    linear-gradient(180deg, #f8f5ef 0%, var(--bg-1) 46%, #efece5 100%);
}
.blob { display: none; position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.18; }
.blob-a { width: 520px; height: 520px; top: -160px; left: -120px; background: radial-gradient(circle at 30% 30%, #dce8ff, #eef4ff); animation: float1 22s var(--ease) infinite alternate; }
.blob-b { width: 460px; height: 460px; top: 120px; right: -140px; background: radial-gradient(circle at 60% 40%, #e6e9f5, #f3f5fb); animation: float2 26s var(--ease) infinite alternate; opacity: 0.12; }
.blob-c { width: 420px; height: 420px; bottom: -180px; left: 38%; background: radial-gradient(circle at 40% 60%, #e2f0f3, #f1f8f9); animation: float3 30s var(--ease) infinite alternate; opacity: 0.10; }
.bg-grid {
  display: block;
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(24, 31, 43, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 31, 43, 0.075) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center top;
  mask-image: radial-gradient(ellipse 74% 44% at 50% 0%, #000 20%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 74% 44% at 50% 0%, #000 20%, transparent 76%);
}
@keyframes float1 { to { transform: translate(60px, 40px) scale(1.08); } }
@keyframes float2 { to { transform: translate(-50px, 60px) scale(1.12); } }
@keyframes float3 { to { transform: translate(40px, -50px) scale(1.06); } }

/* ---------- 4. 布局 ---------- */
.topbar, .view, .footer { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.view { flex: 1 0 auto; padding: 28px 0 56px; }
/* 打印容器：屏幕上始终不占位（否则会在页脚下方撑出一大片空白）；仅 @media print 时显示 */
#print-root { display: none; }

/* ---------- 5. 顶栏 ---------- */
.topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  background: rgba(253, 252, 250, 0.78);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid var(--line);
  /* 顶栏浮在纸上：一条发丝分界 + 一层几乎看不见的下沉阴影 */
  box-shadow: 0 10px 30px -26px rgba(24, 31, 43, 0.8);
  z-index: 50;
}
.topbar-inner { display: flex; align-items: center; gap: 22px; height: 100%; }
/* 字号 / 字重 / 颜色统一在后面的「字体分工」一节里定，这里只管布局 */
.brand { display: flex; align-items: center; gap: 10px; }
/* 品牌名宁可溢出也不能换行：flex 收缩到 90 多像素时，宋体会一个字一行竖排下来。
   空间不够的宽度区间交给下面的断点去收紧间距，不靠文字折行解决。 */
.brand > span { white-space: nowrap; }
/* 品牌标记：四叶玫瑰线（极坐标 r=cos2θ 的四瓣形）抽象成花瓣，
   呼应「数学 + 花园」。内联 SVG，无外链素材、任意缩放不糊。 */
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #1d4b76, #41708f);
  box-shadow: 0 6px 16px rgba(29, 75, 118, .30);
}
.logo-mark .logo-svg { width: 24px; height: 24px; display: block; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: #6c7480; letter-spacing: 1.4px; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--t2);
  white-space: nowrap;   /* 窄屏宁可横向滚动，也不要把「题库」挤成竖排两个字 */
  transition: all .22s var(--ease);
}
.nav a:hover { background: rgba(24,31,43,.05); color: var(--t1); }
.nav a.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* B73：顶栏搜索框已移除。搜索入口统一收敛到各页页内搜索框
   （真题页 / 个人题库 / 好题圈），不再保留一处「碰运气」的全局入口。 */

.icon-btn {
  position: relative; height: 36px; min-width: 36px; padding: 0 10px;
  border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.75); border: 1px solid var(--line);
  font-size: 14px; color: var(--t2); transition: all .2s var(--ease);
  flex: none; white-space: nowrap;
}
.icon-btn:hover { background: #fff; color: var(--t1); transform: translateY(-1px); box-shadow: var(--sh-1); }
.badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px #fff;
}

.user-menu { position: relative; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 650; font-size: 14px; color: #fff;
  background: linear-gradient(145deg, #41708f, #6a5aa8);
  cursor: pointer; box-shadow: 0 4px 12px rgba(29, 75, 118, .28);
}
.dropdown {
  position: absolute; right: 0; top: 46px; width: 210px; padding: 8px;
  border-radius: var(--r-m);
  background: var(--glass-2);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--stroke); box-shadow: var(--sh-3);
  animation: popIn .2s var(--ease);
}
.dropdown .dd-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown .dd-name { font-weight: 650; }
.dropdown .dd-sub { font-size: 12.5px; color: var(--t3); }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border-radius: var(--r-s); font-size: 14px; color: var(--t2); text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: rgba(24,31,43,.05); color: var(--t1); }

@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

/* ---------- 6. 玻璃卡片 ---------- */
/* 卡片现在是「纸上的白卡」：底色本身的对比已经够，所以只需一条发丝边
   和一层很浅的暖投影；顶部再加一道 1px 内高光，模拟纸张受光的上边缘。 */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--sh-1);
}
.card { border-radius: var(--r-l); padding: 20px; }
.card-hover { transition: transform .28s var(--ease), box-shadow .28s var(--ease); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  font-size: 14.5px; font-weight: 550; white-space: nowrap;
  transition: all .22s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(29,75,118,.3); }
.btn-primary:hover { background: var(--blue-600); }
.btn-ghost { background: rgba(255,255,255,.7); border: 1px solid var(--line); color: var(--t2); }
.btn-ghost:hover { background: #fff; color: var(--t1); border-color: var(--line-2); }
.btn-soft { background: var(--blue-soft); color: var(--blue); }
.btn-soft:hover { background: rgba(29,75,118,.16); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: rgba(229,72,77,.2); }
/* 错题本专用：橙色警示感，区别于删除的红色 */
.btn-warn { background: var(--orange-soft); color: var(--orange); }
.btn-warn:hover { background: rgba(234,140,0,.2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 8. 表单 ---------- */
.field { margin-bottom: 14px; }
.label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; color: var(--t2); }
.input, .select, .textarea {
  width: 100%; padding: 10px 13px;
  border-radius: var(--r-s);
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  outline: none; font-size: 14.5px;
  transition: all .2s var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(29,75,118,.45);
  box-shadow: 0 0 0 4px var(--blue-soft);
  background: #fff;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.65; }
.hint { font-size: 12.5px; color: var(--t3); margin-top: 5px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* 分段控件 */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(24,31,43,.05); }
.seg button {
  padding: 6px 15px; border-radius: 999px; font-size: 13.5px; color: var(--t2);
  transition: all .22s var(--ease);
}
.seg button.active { background: #fff; color: var(--t1); font-weight: 600; box-shadow: var(--sh-1); }

/* ---------- 9. 标签 / 徽章 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 550;
  background: rgba(24,31,43,.05); color: var(--t2);
}
.chip-blue { background: var(--blue-soft); color: var(--blue); }
.chip-green { background: var(--green-soft); color: var(--green); }
.chip-orange { background: var(--orange-soft); color: var(--orange); }
.chip-red { background: var(--red-soft); color: var(--red); }
.chip-purple { background: var(--purple-soft); color: var(--purple); }
.chip-teal { background: var(--teal-soft); color: var(--teal); }

/* 难度点 */
.diff { display: inline-flex; gap: 3px; align-items: center; }
.diff i { width: 6px; height: 6px; border-radius: 50%; background: rgba(24,31,43,.14); }
.diff i.on { background: var(--orange); }
/* 五档难度按力扣三色着色：容易/较易 青，中等 琥珀，较难/困难 红。
   用 title 后缀匹配（不能用 *=「难」，会误中「难度：」三个字），
   纯 CSS 实现，不碰 ui.js 的 diffDots() 生成逻辑。 */
.diff[title$="容易"] i.on, .diff[title$="较易"] i.on { background: var(--sem-easy); }
.diff[title$="中等"] i.on { background: var(--sem-mid); }
.diff[title$="较难"] i.on, .diff[title$="困难"] i.on { background: var(--sem-hard); }

/* ---------- 10. 表格 ---------- */
.tbl-wrap { border-radius: var(--r-l); overflow: hidden; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl thead th {
  position: sticky; top: 0; z-index: 2;
  padding: 12px 14px; text-align: left; font-size: 12.5px; font-weight: 650;
  color: var(--t2); letter-spacing: .3px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl tbody td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr { transition: background .18s var(--ease); }
.tbl tbody tr:hover { background: rgba(29,75,118,.045); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .col-act { white-space: nowrap; }
.stem-cell { max-width: 520px; }
.stem-clamp {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; color: var(--t1);
}

/* ---------- 11. 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(24, 31, 43, 0.32);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px;
  animation: fadeIn .22s var(--ease);
}
.modal {
  width: 100%; max-width: 560px; max-height: 86vh; overflow: auto;
  border-radius: var(--r-xl); padding: 26px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--stroke); box-shadow: var(--sh-3);
  animation: modalIn .34s var(--spring);
}
.modal-wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-title { font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.modal-close { width: 30px; height: 30px; border-radius: 50%; color: var(--t3); display: grid; place-items: center; }
.modal-close:hover { background: rgba(24,31,43,.06); color: var(--t1); }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.96); } }

/* ---------- 12. 吐司 ---------- */
.toast-root {
  position: fixed; top: 78px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 550;
  background: rgba(28,31,38,.9); color: #fff;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--sh-2);
  animation: toastIn .32s var(--spring);
}
.toast.ok { background: rgba(22,163,74,.94); }
.toast.err { background: rgba(229,72,77,.94); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.94); } }
.toast.out { animation: toastOut .24s var(--ease) forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* ---------- 13. 空状态 / 骨架 ---------- */
.empty { padding: 56px 20px; text-align: center; color: var(--t3); }
.empty.sm { padding: 22px 16px; }          /* 弹窗 / 聊天里的小号空状态 */
.empty-icon { font-size: 40px; margin-bottom: 10px; opacity: .6; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--t2); margin-bottom: 4px; }

/* ---------- 14. 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager button {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--r-xs);
  font-size: 13.5px; color: var(--t2); transition: all .2s var(--ease);
}
.pager button:hover { background: rgba(24,31,43,.06); color: var(--t1); }
.pager button.active { background: var(--blue); color: #fff; font-weight: 650; }
.pager button:disabled { opacity: .35; cursor: not-allowed; }
/* 跳转到指定页：页码折叠后点不到远处的页，直接输页码更快 */
.pager-jump {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 8px; font-size: 13px; color: var(--t3); white-space: nowrap;
}
.pager-jump-input {
  width: 50px; height: 32px; padding: 0 6px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--r-xs); background: #fff;
  font-size: 13.5px; color: var(--t1); font-variant-numeric: tabular-nums;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pager-jump-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.pager .pager-jump-go {
  height: 32px; padding: 0 13px; border-radius: var(--r-xs);
  background: var(--blue); color: #fff; font-size: 13.5px; font-weight: 600;
}
.pager .pager-jump-go:hover { background: var(--blue); color: #fff; filter: brightness(1.06); }
@media (max-width: 640px) {
  .pager { gap: 4px; }
  .pager-jump { margin-left: 0; }
}

/* ---------- 15. 动画工具 ---------- */
.stagger > * { animation: rise .5s var(--ease) backwards; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .10s; }
.stagger > *:nth-child(4) { animation-delay: .14s; }
.stagger > *:nth-child(5) { animation-delay: .18s; }
.stagger > *:nth-child(6) { animation-delay: .22s; }
.stagger > *:nth-child(7) { animation-delay: .26s; }
.stagger > *:nth-child(8) { animation-delay: .30s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.page-enter { animation: pageIn .42s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }

/* 数学公式排版微调 */
.katex { font-size: 1.02em; }
.q-stem .katex-display { margin: 10px 0; }

/* ---------- 16. 页脚 ---------- */
.footer {
  flex: none;
  margin-top: 40px;
  padding: 34px 0 30px;
  border-top: 1px solid var(--line);
  background: rgba(250, 249, 246, 0.55);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

/* 竖排 + 居中：品牌区、导航、版权各占一行，整体水平居中 */
.footer-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.footer-brand .logo-mark { width: 30px; height: 30px; }
.footer-brand .logo-mark .logo-svg { width: 22px; height: 22px; }

.footer-title { font-size: 16px; font-weight: 650; color: var(--t1); letter-spacing: .2px; }
.footer-sub { margin-top: 3px; font-size: 12.5px; color: var(--t3); letter-spacing: .3px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
}
.footer-links a {
  font-size: 14px;
  color: var(--t2);
  transition: color .22s var(--ease);
}
.footer-links a:hover { color: var(--blue); }

.footer-copy { font-size: 12.5px; color: var(--t3); line-height: 1.7; }

/* 备案号行（ICP / 公安联网备案）：必须常驻页脚，颜色克制但不隐藏 */
.footer-meta {
  margin-top: 6px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 4px 16px;
  font-size: 12.5px; line-height: 1.7;
}
.footer-meta a {
  color: var(--t3);
  transition: color .22s var(--ease);
}
.footer-meta a:hover { color: var(--blue); }

@media (max-width: 640px) {
  .footer-brand { flex-direction: column; gap: 8px; }
  .footer-links { gap: 10px 14px; }
}

/* ---------- 顶栏窄屏适配 ----------
   分享链接常被微信 / QQ 打开，第一屏就是手机宽度：
   先收紧间距，再让导航横向滚动，保证品牌区与导航不互相挤压。 */
@media (max-width: 1240px) {
  .topbar-inner { gap: 12px; }
  .nav a { padding: 8px 10px; font-size: 13.5px; }
}
@media (max-width: 1120px) {
  .brand > span:last-child { display: none; }   /* 只留 logo，省出横向空间 */
  .nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 760px) {
  .icon-btn { padding: 0 8px; }
  .topbar-right { gap: 8px; }
}

/* =========================================================
   17. 字体分工与小节细节（2026-11-09 视觉改版）
   ---------------------------------------------------------
   三种字体各管一段，互不越界：
     衬线（思源宋体）  只管页面级大标题 —— 品牌、页标题、页脚标题
     黑体（MiSans）    管正文、表单、按钮、卡片内一切文字
     等宽（JetBrains）  管纯数字与英文小标签 —— 统计值、页码、题数、eyebrow
   越界的后果很具体：标题全用衬线会像旧报纸，数字全用等宽会像终端。
   ========================================================= */

/* 页面级标题：衬线，字重收到 600（页脚这种长段落用 600 更稳） */
.brand,
.footer-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
}
/* 品牌名比页脚标题再重一档：它是刊头，要和导航拉开层级。
   这里的 700 是思源宋体变量轴上的真实字重，不是浏览器合成加粗，
   笔画变厚但不会糊成一团（17.5px 时确实是 600 更妥，19px 撑得住 700）。 */
.brand {
  font-size: 19px; font-weight: 700; color: #14181e;
  letter-spacing: 0.015em;
}
.brand small { font-family: var(--font-sans); letter-spacing: 1.4px; }

/* 注：.page-title 与 .eyebrow 的字体设置在 pages.css 里就地定义，
   不在这里覆盖 —— 本文件先于 pages.css 加载，同权重下后来的会赢，
   写这儿等于白写。这条踩过一次，留着提醒。 */

/* 纯数字/编号的界面元素：等宽 + 表格数字，纵向自然对齐 */
.stat-value,
#real-count,
.rank-no,
.rk-count,
.pager button,
.pager-jump-input,
.badge {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.01em;
}
.stat-value { font-weight: 600; }

/* 公式区不再重复设字体：kaTeX.min.css 已经给 .katex 及其子类指定了
   KaTeX_Main / KaTeX_Math 等专用字体。这里只是提醒——**不要**给
   `.katex` 或 `.katex *` 写 font-family，那会盖掉 .mathrm/.mathit 的
   字体区分，正体斜体全变一个样。 */

/* 滚动条：细、墨色、无轨道，和纸底融合 */
* { scrollbar-width: thin; scrollbar-color: rgba(24, 31, 43, 0.2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(24, 31, 43, 0.17);
  border: 3px solid transparent; border-radius: 99px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(24, 31, 43, 0.3); background-clip: content-box; }

/* 键盘可达性：鼠标点击不出现描边，Tab 聚焦才出现 */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid rgba(29, 75, 118, 0.55);
  outline-offset: 2px;
}

/* =========================================================
   18. 题目阅读区：宋体 + Times New Roman（2026-11-09）
   ---------------------------------------------------------
   界面用黑体（按钮、导航、标签），阅读用宋体——这是印刷品的常规分工：
   黑体适合短、粗、需要快速扫读的界面文字；成段的数理推导用宋体，
   横细竖粗的笔画能让上下标、括号、逗号这些细碎符号在字流里站住，
   也不会像黑体那样一大片糊成同等的黑。
   数字与西文走 Times New Roman（--font-read 的第一个），与宋体同属旧式
   衬线，两者混排的粗细、字重天然接近；换成无衬线数字会突兀。
   ========================================================= */
.q-stem,
.q-opt,
.q-ans p,
.q-sol-body,
.q-sol-body p,
.q-tbl,
.stem-clamp,
.rp-q-stem,
.wr-pick-stem,
.ps-stem,
.pr-sol p {
  font-family: var(--font-read);
  /* 宋体的字面比黑体小，字号不变时会显得"缩"了一号，用行距补回来 */
  font-feature-settings: "kern" 1;
}

.q-stem { line-height: 1.92; letter-spacing: 0.005em; }
.q-opt { line-height: 1.8; }
.q-ans p,
.q-sol-body { line-height: 1.95; }

/* 解析里的分段（渲染时在「所以 / 因此 / 若 / 当…时」前插入的换行）：
   比普通换行多留一点空，一步一行才看得出是一步。 */
.q-sol-body br,
.pr-sol p br { line-height: inherit; }
