/* ============================================
   DOXA 数学版面 · 视觉系统 v2
   学术纸质感 × 现代知识平台
   配合 doxa.css 品牌色：indigo / verified / paper
   ============================================ */

/* ---- 数学版面局部 token ---- */
:root {
  --math-indigo: #1E2A78;
  --math-indigo-deep: #151d55;
  --math-indigo-soft: #EEF0F8;
  --math-green: #15A06A;
  --math-green-soft: #E3F4EC;
  --math-paper: #FAF8F2;
  --math-paper-2: #F3F0E7;
  --math-ink: #14161F;
  --math-muted: #5A5E70;
  --math-line: #E4E1D8;
  --math-line-strong: #D0CBBE;
  --math-surface: #FFFFFF;
  --math-shadow-sm: 0 1px 2px rgba(20, 22, 31, 0.04), 0 1px 3px rgba(20, 22, 31, 0.06);
  --math-shadow-md: 0 4px 16px rgba(20, 22, 31, 0.08), 0 1px 3px rgba(20, 22, 31, 0.04);
  --math-shadow-lg: 0 12px 40px rgba(30, 42, 120, 0.12), 0 2px 8px rgba(20, 22, 31, 0.04);
  --math-radius: 12px;
  --math-radius-sm: 8px;
  --math-radius-pill: 999px;
  --math-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --math-content: 720px;
  --math-wide: 1080px;
}

/* ---- 页面底纹：极淡网格 + 纸感 ---- */
body:has(.math-hero),
body:has(.math-hub) {
  background-color: var(--math-paper);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(30, 42, 120, 0.06), transparent 55%),
    linear-gradient(var(--math-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--math-line) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  background-attachment: fixed;
}

/* ---- 导航：全站一级导航始终保留，学院导航位于其下 ---- */
body:has(.math-hero) .site-nav,
body:has(.math-hub) .site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  background: rgba(250, 248, 242, 0.88);
  border-bottom: 1px solid var(--math-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

/* ---- 数学唯一导航栏（合并后） ---- */
.math-subnav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  min-height: 48px;
  background: var(--math-paper-2);
  color: var(--math-indigo);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: static;
  border-bottom: 1px solid var(--math-line);
  box-shadow: none;
}

@media (max-width: 760px) {
  .math-subnav { padding-inline: 16px; }
}

.math-subnav::-webkit-scrollbar { display: none; }

/* DOXA 回首页 */
.math-subnav .ms-brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--math-indigo);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px 4px 0;
  margin-right: 2px;
  border-right: 1px solid var(--math-line-strong);
  border-radius: 0;
  transition: color 0.15s, opacity 0.15s;
}
.math-subnav .ms-brand:hover {
  background: transparent;
  color: var(--math-green);
}

.math-subnav .ms-label {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--math-muted);
  padding-right: 10px;
  border-right: 1px solid var(--math-line-strong);
  margin-right: 4px;
  white-space: nowrap;
}

.math-subnav a:not(.ms-brand) {
  flex-shrink: 0;
  text-decoration: none;
  color: var(--math-muted);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--math-radius-pill);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.math-subnav a:not(.ms-brand):hover {
  background: var(--math-indigo-soft);
  color: var(--math-indigo);
}

.math-subnav a:not(.ms-brand).is-active {
  background: var(--math-indigo);
  color: var(--math-paper);
  font-weight: 600;
}

/* ---- 容器 ---- */
.math-wide {
  max-width: var(--math-wide);
  margin: 0 auto;
  padding: 0 24px;
}

body:has(.math-hero) .container,
body:has(.math-hub) .container {
  max-width: var(--math-wide);
}

.math-article.container,
.container.math-article {
  max-width: var(--math-content);
}

/* ---- Hero ---- */
.math-hero {
  position: relative;
  padding: 48px 24px 40px;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(238, 240, 248, 0.85) 0%, rgba(250, 248, 242, 0.4) 100%);
  border-bottom: 1px solid var(--math-line);
}

/* 顶部 accent 条 */
.math-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--math-indigo) 0%, var(--math-green) 55%, #5B7CFF 100%);
}

/* 装饰 ζ 水印 */
.math-hero::after {
  content: "ζ";
  position: absolute;
  right: 6%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: clamp(6rem, 18vw, 12rem);
  font-weight: 700;
  color: var(--math-indigo);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.math-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--math-muted);
  margin-bottom: 14px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.math-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: var(--math-indigo);
  position: relative;
  z-index: 1;
}

.math-hero .lead {
  color: var(--math-muted);
  max-width: 560px;
  margin: 0 auto 20px;
  font-size: 1.05rem;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.math-hero .lead strong {
  color: var(--math-ink);
  font-weight: 600;
}

/* ---- 状态徽标 ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 11px;
  border-radius: var(--math-radius-pill);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}
.badge-verified { color: #0E7A4C; background: #E3F4EC; border-color: #A8DCC4; }
.badge-disproven { color: #A02C22; background: #F8E6E3; border-color: #E5B8B1; }
.badge-open { color: var(--math-indigo); background: #E9EBF7; border-color: #C3C8E8; }
.badge-independent { color: var(--math-muted); background: var(--math-paper-2); border-color: var(--math-line); }
.badge-partial { color: #8A6412; background: #F7EFDB; border-color: #E3D2A3; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* ---- 统计条 + 时代快捷导航 ---- */
.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 28px 0 20px;
}

.stat-item {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--math-muted);
  background: var(--math-surface);
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius-sm);
  padding: 10px 16px;
  box-shadow: var(--math-shadow-sm);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stat-item:hover {
  border-color: var(--math-line-strong);
  box-shadow: var(--math-shadow-md);
}

.stat-item b {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--math-indigo);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.era-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 28px;
}

.era-nav a {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--math-indigo);
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius-pill);
  padding: 6px 14px;
  background: var(--math-surface);
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
  box-shadow: var(--math-shadow-sm);
}

.era-nav a:hover {
  border-color: var(--math-green);
  color: var(--math-green);
  background: var(--math-green-soft);
  box-shadow: none;
}

/* ---- 编年 / 难题表格 ---- */
.table-scroll {
  overflow-x: auto;
  box-shadow: var(--math-shadow-md);
  border-radius: var(--math-radius);
  background: var(--math-surface);
  margin-bottom: 28px;
  border: 1px solid var(--math-line);
  -webkit-overflow-scrolling: touch;
}

.problem-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--math-surface);
  min-width: 660px;
}

.problem-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: left;
  padding: 12px 16px;
  background: var(--math-indigo);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  border-bottom: none;
}

.problem-table thead th:first-child { border-radius: calc(var(--math-radius) - 1px) 0 0 0; }
.problem-table thead th:last-child { border-radius: 0 calc(var(--math-radius) - 1px) 0 0; }

.problem-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--math-line);
  vertical-align: top;
}

.problem-table tbody tr:last-child td { border-bottom: none; }

.problem-table tbody tr {
  transition: background 0.12s;
}

.problem-table tbody tr:nth-child(even):not(.era-sep) td {
  background: rgba(250, 248, 242, 0.55);
}

.problem-table tbody tr:not(.era-sep):hover td {
  background: var(--math-indigo-soft);
}

.problem-table .num {
  color: var(--math-muted);
  white-space: nowrap;
  width: 92px;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  font-family: var(--font-mono);
}

.problem-table .prob {
  font-weight: 600;
  color: var(--math-ink);
}

.problem-table .who {
  color: var(--math-muted);
  white-space: nowrap;
  font-size: 0.88rem;
}

.problem-table .status-cell {
  text-align: center;
  width: 118px;
}

.problem-table .note {
  color: var(--math-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* 时代分隔行 */
.era-sep td {
  background: linear-gradient(90deg, var(--math-indigo) 0%, #2a3a9a 100%) !important;
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.02rem;
  padding: 12px 16px;
  letter-spacing: 0.02em;
  border-bottom: none !important;
}

.era-sep td .era-count {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.8;
  margin-left: 12px;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .problem-table { font-size: 0.84rem; min-width: 620px; }
  .problem-table td,
  .problem-table th { padding: 9px 12px; }
  .problem-table .status-cell { width: 100px; }
}

/* ============================================
   Editorial unification · 2026-08-09
   数学版面与 DOXA 期刊工作台共用同一骨架
   ============================================ */
:root {
  --math-indigo: var(--doxa-indigo);
  --math-indigo-deep: var(--doxa-indigo-deep);
  --math-indigo-soft: var(--doxa-indigo-soft);
  --math-green: var(--doxa-verified);
  --math-green-soft: var(--doxa-verified-soft);
  --math-paper: var(--doxa-paper);
  --math-paper-2: var(--doxa-paper-2);
  --math-ink: var(--doxa-ink);
  --math-muted: var(--doxa-gray);
  --math-line: var(--doxa-line);
  --math-line-strong: var(--doxa-line-strong);
  --math-surface: var(--doxa-surface);
  --math-shadow-sm: none;
  --math-shadow-md: none;
  --math-shadow-lg: none;
  --math-radius: 6px;
  --math-radius-sm: 4px;
  --math-radius-pill: 4px;
  --math-wide: 1180px;
  --math-content: 780px;
}

body:has(.math-hero),
body:has(.math-hub) {
  background: var(--math-paper);
  background-image: none;
}

body:has(.math-subnav) .site-nav {
  display: grid !important;
  grid-template-columns: auto 1fr;
}

body:has(.math-subnav) .site-nav .nav-actions { justify-content: flex-end; }

.math-subnav {
  min-height: 44px;
  gap: 22px;
  padding: 0 max(20px, calc((100% - var(--math-wide)) / 2));
  top: 66px;
  overflow-x: auto;
  scrollbar-width: thin;
  color: var(--math-ink);
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--math-line);
  box-shadow: none;
}

.math-subnav .ms-brand { display: none; }
.math-subnav .ms-label {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  color: var(--math-faint, #8a8e98);
  border-right: 1px solid var(--math-line);
  padding: 0 20px 0 0;
  margin: 0;
}
.math-subnav a:not(.ms-brand) {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: #444852;
  font-size: .8rem;
}
.math-subnav a:not(.ms-brand):hover { color: var(--math-indigo); background: transparent; }
.math-subnav a:not(.ms-brand).is-active { color: var(--math-indigo); background: transparent; border-bottom-color: var(--math-indigo); }

.math-hero,
.ci-hero.math-hero,
.math-hub-hero {
  padding: 46px max(24px, calc((100% - var(--math-wide)) / 2)) 34px;
  text-align: left;
  background: #fff;
  border-bottom: 1px solid var(--math-line);
}
.math-hero::before,
.math-hero::after,
.math-hub-hero::before,
.ci-hero.math-hero::after,
.ci-hero-deco { display: none; }
.math-hero .eyebrow,
.math-hub-hero .eyebrow,
.ci-hero .eyebrow { margin-bottom: 12px; color: var(--math-muted); font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.math-hero h1,
.math-hub-hero h1,
.ci-hero h1 { max-width: 850px; margin: 0 0 12px; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.2; letter-spacing: -.035em; }
.math-hero .lead,
.math-hub-hero .lead,
.ci-hero .lead { max-width: 720px; margin: 0; text-align: left; color: var(--math-muted); font-size: 1rem; }
.math-hub-hero .hub-mark { display: none; }

.ci-hero-inner { max-width: var(--math-wide); margin: 0; }
.ci-stats { display: flex; flex-wrap: wrap; gap: 0; max-width: 760px; margin: 24px 0 16px; border-top: 1px solid var(--math-line); border-bottom: 1px solid var(--math-line); }
.ci-stat { min-width: 135px; padding: 14px 22px; border: 0; border-left: 1px solid var(--math-line); border-radius: 0; background: transparent; backdrop-filter: none; }
.ci-stat:first-child { padding-left: 0; border-left: 0; }
.ci-stat b { font-size: 1.55rem; }
.ci-legend { justify-content: flex-start; }

.badge,
.badge-field,
.type-tag,
.ci-count,
.chrono-pager a,
.era-nav a,
.chrono-links a {
  border-radius: 3px;
  box-shadow: none;
}

.ci-main { padding-top: 26px; }
.ci-rail { padding: 14px 8px 16px; margin-bottom: 34px; border-radius: 4px; box-shadow: none; }
.ci-rail::before { background: var(--math-line-strong); opacity: 1; }
.ci-rail-dot { box-shadow: none; border-width: 2px; }
.ci-band-label { margin-bottom: 4px; padding: 14px 0; }
.ci-band-no { width: 34px; height: 34px; border-radius: 3px; }
.ci-timeline { gap: 24px; }
.ci-era { grid-template-columns: 48px 1fr; }
.ci-era-node { width: 30px; height: 30px; border-radius: 50%; box-shadow: none; }
.ci-era-spine::before { width: 1px; background: var(--math-line-strong); }
.ci-era-body { margin: 0; padding: 17px 10px 17px 4px; border: 0; border-bottom: 1px solid var(--math-line); border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.ci-era-body::before { display: none; }
.ci-era:hover .ci-era-body { transform: none; box-shadow: none; border-color: var(--math-line-strong); }
.ci-era-title { color: var(--math-ink); }
.ci-count { background: transparent; }
.ci-bar { height: 2px; border: 0; border-radius: 0; background: var(--math-line); }
.ci-bar span { background: var(--math-indigo); border-radius: 0; }
.ci-go { color: var(--math-indigo); }

.math-article.container,
.container.math-article { max-width: var(--math-content); padding-top: 28px; }
.math-back { border-radius: 3px; box-shadow: none; }
.math-article .kn-sec { margin: 0; padding: 28px 0; border: 0; border-bottom: 1px solid var(--math-line); border-radius: 0; background: transparent; box-shadow: none; }
.math-article .kn-sec h2 { padding: 0; border: 0; font-size: 1.3rem; }
.kn-fig { margin: 24px 0 32px; padding: 22px 20px 14px; border-radius: 4px; box-shadow: none; }
.knowledge-record { display: grid; grid-template-columns: repeat(4, 1fr); margin: 6px 0 24px; border-top: 1px solid var(--math-line); border-bottom: 1px solid var(--math-line); background: #fff; }
.knowledge-record div { padding: 13px 14px; border-left: 1px solid var(--math-line); }
.knowledge-record div:first-child { border-left: 0; }
.knowledge-record span { display: block; color: var(--math-faint, #8a8e98); font-size: .68rem; }
.knowledge-record strong { display: block; margin-top: 4px; color: var(--math-ink); font-size: .76rem; line-height: 1.45; }

.hub-grid { grid-template-columns: repeat(2, 1fr); gap: 0; margin-top: 28px; border-top: 1px solid var(--math-line); }
.hub-card { min-height: 160px; padding: 24px 22px; border: 0; border-right: 1px solid var(--math-line); border-bottom: 1px solid var(--math-line); border-radius: 0; background: #fff; box-shadow: none; }
.hub-card:nth-child(even) { border-right: 0; }
.hub-card::after { display: none; }
.hub-card:hover { transform: none; box-shadow: none; background: #fcfcfa; }
.hub-card .hub-icon { width: auto; height: auto; display: block; margin-bottom: 12px; border-radius: 0; background: transparent; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }

.table-scroll,
.problem-table,
.stat-item,
.era-card,
.prob-inner,
.ev-inner { box-shadow: none !important; }

.site-footer .container.footer-inner { max-width: 1180px; }

@media (max-width: 780px) {
  body:has(.math-subnav) .site-nav { display: flex !important; }
  body:has(.math-subnav) .site-nav .nav-actions { justify-content: flex-start; }
  .math-subnav { top: 116px; gap: 18px; padding: 0 16px; }
  .math-hero, .ci-hero.math-hero, .math-hub-hero { padding: 34px 20px 28px; text-align: left; }
  .math-hero .lead, .ci-hero .lead { margin: 0; text-align: left; }
  .ci-legend { justify-content: flex-start; }
  .ci-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .ci-stat { min-width: 0; padding: 12px 14px; border-left: 1px solid var(--math-line); border-top: 1px solid var(--math-line); }
  .ci-stat:nth-child(odd) { border-left: 0; }
  .ci-stat:nth-child(-n+2) { border-top: 0; }
  .ci-era { grid-template-columns: 34px 1fr; }
  .ci-era-body { padding-left: 0; }
  .knowledge-record { grid-template-columns: 1fr 1fr; }
  .knowledge-record div:nth-child(odd) { border-left: 0; }
  .knowledge-record div:nth-child(n+3) { border-top: 1px solid var(--math-line); }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card { border-right: 0; }
}

@media (max-width: 520px) {
  .math-subnav { top: 116px; }
  .ci-stats { grid-template-columns: 1fr 1fr; }
  .ci-rail { scrollbar-width: auto; }
  .knowledge-record { grid-template-columns: 1fr; }
  .knowledge-record div { border-left: 0; border-top: 1px solid var(--math-line); }
  .knowledge-record div:first-child { border-top: 0; }
}

@media (min-width: 761px) {
  body:has(.math-hero) .site-nav .nav-actions,
  body:has(.math-hub) .site-nav .nav-actions,
  body.problems-page .site-nav .nav-actions { margin-left: auto !important; justify-content: flex-end !important; }
}

/* ---- 文章页（概念科普 / 知识详情）---- */
.math-article .container { max-width: var(--math-content); }

.math-article h2 {
  font-size: 1.35rem;
  margin-top: 2.2em;
  margin-bottom: 0.7em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--math-line);
  letter-spacing: -0.01em;
}

.math-article h3 {
  font-size: 1.1rem;
  margin-top: 1.6em;
  color: var(--math-indigo);
}

.math-article blockquote {
  margin: 1.6em 0;
  padding: 16px 20px;
  border: 1px solid var(--math-line);
  background: var(--math-paper-2);
  border-radius: var(--math-radius-sm);
  font-style: italic;
  color: var(--math-ink);
  font-size: 1.02rem;
}

.math-article ul,
.math-article ol {
  padding-left: 1.35em;
}

.math-article li {
  margin-bottom: 0.55em;
}

.math-article .tag-block {
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius);
  padding: 18px 22px;
  margin: 1.8em 0;
  background: var(--math-surface);
  box-shadow: var(--math-shadow-sm);
}

.math-article code,
.math-article .formula {
  font-family: var(--font-mono);
  background: var(--math-paper-2);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid var(--math-line);
}

.math-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--math-surface);
  border-radius: var(--math-radius-sm);
  overflow: hidden;
  box-shadow: var(--math-shadow-sm);
  border: 1px solid var(--math-line);
}

.math-article table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--math-indigo);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.math-article table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--math-line);
}

.math-article table tr:last-child td {
  border-bottom: none;
}

/* MathJax 显示公式块 */
.math-article mjx-container[display="true"],
.math-article .MathJax_Display {
  margin: 1.2em 0 !important;
  padding: 12px 8px;
  overflow-x: auto;
}

/* ---- 内文返回链接 ---- */
.math-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 20px 24px 0;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--math-muted);
  transition: color 0.15s;
}

.math-back:hover {
  color: var(--math-green);
}

/* ============================================
   数学知识图谱（map.html）
   ============================================ */
.map-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 14px 0 18px;
  color: var(--math-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.map-flow .arrow {
  font-size: 1.25rem;
  color: var(--math-green);
  line-height: 1;
  letter-spacing: 0;
}

.map-layer {
  background: var(--math-surface);
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius);
  padding: 22px 24px;
  margin-bottom: 0;
  box-shadow: var(--math-shadow-sm);
  transition: box-shadow 0.2s var(--math-ease);
}

.map-layer:hover {
  box-shadow: var(--math-shadow-md);
}

.map-layer h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--math-indigo);
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.map-layer h3 .tag {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  color: #fff;
}

.map-layer .tag-foundation { background: #5A5E70; }
.map-layer .tag-core { background: var(--math-indigo); }
.map-layer .tag-advanced { background: #3A3F5C; }
.map-layer .tag-app { background: var(--math-green); }

.map-layer .desc {
  color: var(--math-muted);
  font-size: 0.88rem;
  margin: 0 0 14px;
  line-height: 1.6;
}

.map-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.map-chip {
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius-sm);
  padding: 12px 14px;
  background: var(--math-surface);
  transition: border-color 0.15s, transform 0.15s var(--math-ease), box-shadow 0.15s;
  box-shadow: var(--math-shadow-sm);
}

.map-chip:hover {
  border-color: var(--math-line-strong);
  transform: translateY(-1px);
}

.map-chip .t {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--math-ink);
}

.map-chip .s {
  font-size: 0.78rem;
  color: var(--math-muted);
  margin-top: 4px;
  line-height: 1.5;
}

.map-app {
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius-sm);
  padding: 14px 16px;
  background: var(--math-surface);
  box-shadow: var(--math-shadow-sm);
}

.map-app .t {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--math-ink);
}

.map-app .deps { margin-top: 8px; }

.map-app .deps span {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--math-muted);
  background: #fff;
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius-pill);
  padding: 2px 9px;
  margin: 2px 4px 0 0;
}

.map-route {
  margin-top: 36px;
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius);
  background: var(--math-surface);
  padding: 24px;
  box-shadow: var(--math-shadow-sm);
}

.map-route h3 {
  font-family: var(--font-serif);
  color: var(--math-indigo);
  margin: 0 0 16px;
  font-size: 1.2rem;
}

.map-route table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.map-route th {
  text-align: left;
  padding: 10px 12px;
  background: var(--math-indigo);
  color: #fff;
  font-size: 0.8rem;
}

.map-route td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--math-line);
  background: #fff;
}

.map-route td:first-child {
  font-weight: 600;
  color: var(--math-ink);
}

@media (max-width: 520px) {
  .map-chips { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   数学编年史
   ============================================ */

/* 领域徽标 */
.badge-field {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--math-radius-pill);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}
.f-logic    { color: #5A3E91; background: #EFE9F7; border-color: #D3C3E8; }
.f-algebra  { color: #8A6412; background: #F7EFDB; border-color: #E3D2A3; }
.f-analysis { color: #0E7A4C; background: #E3F4EC; border-color: #A8DCC4; }
.f-geo      { color: #1E4E8A; background: #E3EAF7; border-color: #B8CCE8; }
.f-discrete { color: #7A4A3E; background: #F4E8E4; border-color: #DFC5B8; }
.f-prob     { color: #7A5A0E; background: #F7F0DB; border-color: #E3DFA3; }
.f-applied  { color: #A02C22; background: #F8E6E3; border-color: #E5B8B1; }
.f-inter    { color: #3A3F5C; background: #E9EAF2; border-color: #C3C6D8; }

.chrono-table .field-cell { text-align: center; width: 100px; }
.chrono-table .type-cell { text-align: center; width: 60px; }
.chrono-table .note { color: var(--math-muted); font-size: 0.85rem; }

.type-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--math-muted);
  background: var(--math-paper-2);
  border: 1px solid var(--math-line);
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
}

.chrono-cross {
  margin: 0 0 18px;
  padding: 12px 18px;
  border: 1px solid #E3D2A3;
  background: #F7EFDB;
  border-radius: var(--math-radius-sm);
  font-size: 0.88rem;
  color: #6B4E0E;
}

.chrono-cross a { color: var(--math-indigo); }

.chrono-placeholder {
  padding: 48px 24px;
  text-align: center;
  color: var(--math-muted);
  font-size: 0.95rem;
  background: var(--math-surface);
  border: 1px dashed var(--math-line-strong);
  border-radius: var(--math-radius);
  margin-bottom: 24px;
}

.era-count-line {
  font-size: 0.84rem;
  color: var(--math-muted);
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}

.era-count-line b {
  color: var(--math-indigo);
  font-size: 1.05rem;
}

/* 关键词行 */
.chrono-keywords {
  color: var(--math-muted);
  font-size: 0.85rem;
  text-align: center;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}

.chrono-footnote {
  color: var(--math-muted);
  font-size: 0.85rem;
  margin-bottom: 48px;
  line-height: 1.65;
}

/* ---- 时代网格卡片 ---- */
.era-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0 36px;
}

.era-card {
  position: relative;
  display: block;
  text-decoration: none;
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius);
  background: var(--math-surface);
  padding: 18px 18px 16px;
  overflow: hidden;
  box-shadow: var(--math-shadow-sm);
  transition: box-shadow 0.2s var(--math-ease), transform 0.2s var(--math-ease), border-color 0.2s;
}

.era-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--math-indigo), var(--math-green));
  border-radius: 3px 0 0 3px;
}

.era-card:hover {
  box-shadow: var(--math-shadow-lg);
  transform: translateY(-3px);
  border-color: var(--math-line-strong);
}

.era-card .era-no {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--math-green);
  text-transform: uppercase;
}

.era-card .era-name {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--math-ink);
  margin: 6px 0 6px;
  line-height: 1.35;
}

.era-card .era-span {
  font-size: 0.8rem;
  color: var(--math-muted);
  font-variant-numeric: tabular-nums;
}

.era-card .era-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ---- 翻页 ---- */
.chrono-pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 24px;
  flex-wrap: wrap;
}

.chrono-pager a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--math-indigo);
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius-sm);
  padding: 9px 14px;
  background: var(--math-surface);
  box-shadow: var(--math-shadow-sm);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chrono-pager a:hover {
  border-color: var(--math-green);
  color: var(--math-green);
  background: var(--math-green-soft);
}

.chrono-pager .to-index {
  margin-right: auto;
}

/* ---- 互链 pill ---- */
.chrono-links {
  margin: 8px 0 48px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chrono-links a {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--math-indigo);
  text-decoration: none;
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius-pill);
  padding: 8px 18px;
  background: var(--math-surface);
  box-shadow: var(--math-shadow-sm);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chrono-links a:hover {
  border-color: var(--math-green);
  color: var(--math-green);
  background: var(--math-green-soft);
}

@media (max-width: 520px) {
  .era-grid { grid-template-columns: 1fr; }
  .math-subnav { /* keep sticky single bar on small screens */ }
}

/* ---- 表格事件名 → 知识详情 ---- */
.problem-table .prob a.k-ev {
  color: var(--math-indigo);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}

.problem-table .prob a.k-ev:hover {
  color: var(--math-green);
  border-bottom-color: var(--math-green);
}

.k-hint {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--math-green);
  text-decoration: none;
  white-space: nowrap;
  margin-left: 6px;
  opacity: 0.85;
}

.k-hint:hover {
  text-decoration: underline;
  opacity: 1;
}

/* ---- 知识详情节 ---- */
.math-article .kn-sec {
  margin: 1.4em 0;
  padding: 18px 20px;
  background: var(--math-surface);
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius);
  box-shadow: var(--math-shadow-sm);
}

.math-article .kn-sec h2 {
  margin-top: 0;
  margin-bottom: 0.55em;
  font-size: 1.05rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--math-line);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* section titles plain — no decorative dots */

.math-article .kn-sec p {
  margin: 0;
  color: var(--math-ink);
  line-height: 1.75;
}

/* ---- 图示 ---- */
.kn-fig {
  margin: 0 0 28px;
  text-align: center;
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius);
  background: var(--math-surface);
  padding: 24px 20px 16px;
  box-shadow: var(--math-shadow-sm);
}

.kn-fig svg,
.kn-fig img {
  max-width: 100%;
  height: auto;
}

.kn-fig figcaption {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--math-line);
  font-size: 0.82rem;
  color: var(--math-muted);
  line-height: 1.5;
}

/* ============================================
   数学版面入口 hub（index.html）
   ============================================ */
.math-hub-hero {
  position: relative;
  padding: 64px 24px 52px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(30, 42, 120, 0.1), transparent 60%),
    linear-gradient(180deg, var(--math-indigo-soft) 0%, var(--math-paper) 100%);
  border-bottom: 1px solid var(--math-line);
}

.math-hub-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--math-indigo), var(--math-green), #5B7CFF);
}

.math-hub-hero .hub-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--math-indigo);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  box-shadow: var(--math-shadow-md);
}

.math-hub-hero .eyebrow {
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--math-muted);
  margin-bottom: 12px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.math-hub-hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 14px;
  letter-spacing: -0.03em;
}

.math-hub-hero .lead {
  color: var(--math-muted);
  max-width: 520px;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.7;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 40px 0 48px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--math-surface);
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius);
  padding: 24px 22px;
  box-shadow: var(--math-shadow-sm);
  transition: transform 0.2s var(--math-ease), box-shadow 0.2s var(--math-ease), border-color 0.2s;
  position: relative;
  overflow: hidden;
  min-height: 180px;
}

.hub-card::after {
  content: "→";
  position: absolute;
  right: 20px;
  bottom: 18px;
  font-size: 1.1rem;
  color: var(--math-green);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s var(--math-ease);
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--math-shadow-lg);
  border-color: var(--math-line-strong);
}

.hub-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.hub-card .hub-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 14px;
  background: var(--math-indigo-soft);
  color: var(--math-indigo);
  font-weight: 700;
  font-family: var(--font-serif);
}

.hub-card.featured .hub-icon {
  background: var(--math-green-soft);
  color: var(--math-green);
}

.hub-card h2 {
  font-size: 1.2rem;
  margin: 0 0 8px;
  color: var(--math-indigo);
}

.hub-card p {
  margin: 0;
  color: var(--math-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

.hub-card .hub-meta {
  margin-top: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--math-green);
  letter-spacing: 0.02em;
}

.hub-note {
  text-align: center;
  color: var(--math-muted);
  font-size: 0.9rem;
  margin: 0 0 56px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

/* ---- 响应式 ---- */
@media (max-width: 640px) {
  .math-hero {
    padding: 36px 20px 32px;
  }

  .math-hero::after {
    right: -4%;
    opacity: 0.03;
  }

  .math-subnav {
    padding: 8px 16px;
  }

  .stats-strip {
    margin-top: 20px;
  }

  .stat-item {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .stat-item b {
    font-size: 1.05rem;
  }

  .hub-grid {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .math-hub-hero {
    padding: 48px 20px 40px;
  }

  .math-article .kn-sec {
    padding: 14px 14px;
  }
}

/* 减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .era-card,
  .hub-card,
  .map-chip,
  .map-layer,
  .chrono-pager a,
  .era-nav a {
    transition: none;
  }
  .era-card:hover,
  .hub-card:hover {
    transform: none;
  }
}

/* ============================================
   数学编年史索引 chronology.html · 时间线重设计
   ============================================ */

/* 覆盖 hero：本页用 .ci-hero */
.ci-hero.math-hero {
  text-align: left;
  padding: 48px 24px 36px;
  background:
    radial-gradient(ellipse 90% 70% at 85% 20%, rgba(21, 160, 106, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 80% at 10% 80%, rgba(30, 42, 120, 0.1), transparent 55%),
    linear-gradient(165deg, #EEF0F8 0%, var(--math-paper) 55%, #F5F3ED 100%);
  overflow: hidden;
}

.ci-hero.math-hero::after {
  content: "CHRONOS";
  right: 4%;
  top: 42%;
  font-size: clamp(3rem, 10vw, 6.5rem);
  letter-spacing: 0.12em;
  opacity: 0.045;
  font-family: var(--font-sans);
  font-weight: 800;
}

.ci-hero-inner {
  max-width: var(--math-wide);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.ci-hero .eyebrow {
  margin-bottom: 16px;
}

.ci-hero h1 {
  font-size: clamp(2rem, 5vw, 2.85rem);
  margin-bottom: 14px;
  letter-spacing: -0.03em;
  max-width: 14em;
}

.ci-hero .lead {
  margin: 0 0 28px;
  max-width: 36em;
  text-align: left;
  font-size: 1.08rem;
}

/* 大数字统计 */
.ci-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 640px;
  margin-bottom: 22px;
}

.ci-stat {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius);
  padding: 14px 16px;
  box-shadow: var(--math-shadow-sm);
  backdrop-filter: blur(6px);
}

.ci-stat b {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--math-indigo);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-family: var(--font-serif);
}

.ci-stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--math-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.ci-legend {
  justify-content: flex-start;
  margin-top: 4px;
}

/* 右侧起止年装饰 */
.ci-hero-deco {
  position: absolute;
  right: max(24px, calc((100% - var(--math-wide)) / 2 + 8px));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.ci-deco-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--math-indigo);
  letter-spacing: 0.04em;
}

.ci-deco-line {
  width: 2px;
  height: 88px;
  background: linear-gradient(180deg, var(--math-indigo), var(--math-green));
  border-radius: 2px;
  opacity: 0.45;
}

/* 主区 */
.ci-main {
  padding-top: 28px;
  padding-bottom: 16px;
}

/* 横向速览轨 */
.ci-rail {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  margin: 0 0 36px;
  padding: 14px 8px 18px;
  background: var(--math-surface);
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius);
  box-shadow: var(--math-shadow-sm);
  position: relative;
}

.ci-rail::before {
  content: "";
  position: absolute;
  left: 72px;
  right: 20px;
  top: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--math-indigo), var(--math-green));
  opacity: 0.25;
  pointer-events: none;
}

.ci-rail-cap {
  flex-shrink: 0;
  align-self: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--math-muted);
  padding: 0 12px 0 10px;
  border-right: 1px solid var(--math-line);
  margin-right: 6px;
  z-index: 1;
}

.ci-rail-node {
  flex: 1 0 auto;
  min-width: 72px;
  max-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 0 6px;
  position: relative;
  z-index: 1;
  transition: transform 0.15s var(--math-ease);
}

.ci-rail-node:hover {
  transform: translateY(-2px);
}

.ci-rail-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--math-surface);
  border: 2.5px solid var(--math-indigo);
  box-shadow: 0 0 0 3px rgba(30, 42, 120, 0.12);
  transition: background 0.15s, border-color 0.15s;
}

.ci-rail-node:hover .ci-rail-dot {
  background: var(--math-green);
  border-color: var(--math-green);
}

.ci-rail-label {
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
  color: var(--math-muted);
  font-weight: 500;
}

.ci-rail-label em {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: var(--math-green);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.ci-rail-node:hover .ci-rail-label {
  color: var(--math-indigo);
}

/* 分期 band */
.ci-timeline {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-bottom: 40px;
}

.ci-band-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--math-line);
}

.ci-band-no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--math-indigo);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.ci-band-label strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--math-indigo);
  margin-bottom: 2px;
}

.ci-band-label p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--math-muted);
}

.ci-band-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 0;
}

/* 时代节点行 */
.ci-era {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 18px;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.ci-era-spine {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 22px;
}

/* 竖轴连线 */
.ci-era-spine::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(30, 42, 120, 0.2), rgba(21, 160, 106, 0.25));
}

.ci-band-list .ci-era:first-child .ci-era-spine::before {
  top: 34px;
}

.ci-band-list .ci-era:last-child .ci-era-spine::before {
  bottom: calc(100% - 34px);
  top: 0;
}

.ci-band-list .ci-era:only-child .ci-era-spine::before {
  display: none;
}

.ci-era-node {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--math-surface);
  border: 2px solid var(--math-indigo);
  color: var(--math-indigo);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(30, 42, 120, 0.08);
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ci-era:hover .ci-era-node {
  background: var(--math-indigo);
  color: #fff;
  border-color: var(--math-indigo);
  box-shadow: 0 0 0 5px rgba(30, 42, 120, 0.14);
}

.ci-era-body {
  background: var(--math-surface);
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius);
  padding: 18px 20px 16px;
  margin-bottom: 14px;
  box-shadow: var(--math-shadow-sm);
  transition: box-shadow 0.2s var(--math-ease), border-color 0.2s, transform 0.2s var(--math-ease);
  position: relative;
  overflow: hidden;
}

.ci-era-body::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--math-indigo), var(--math-green));
  opacity: 0;
  transition: opacity 0.2s;
}

.ci-era:hover .ci-era-body {
  box-shadow: var(--math-shadow-lg);
  border-color: var(--math-line-strong);
  transform: translateX(3px);
}

.ci-era:hover .ci-era-body::before {
  opacity: 1;
}

.ci-era-top {
  margin-bottom: 8px;
}

.ci-era-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.ci-era-span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--math-green);
  letter-spacing: 0.02em;
}

.ci-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--math-muted);
  background: var(--math-paper-2);
  border: 1px solid var(--math-line);
  border-radius: var(--math-radius-pill);
  padding: 2px 10px;
}

.ci-count b {
  color: var(--math-indigo);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  margin-right: 2px;
}

.ci-count.is-empty {
  color: #A89F90;
  font-weight: 500;
}

.ci-era-title {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--math-indigo);
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.ci-era-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--math-ink);
  line-height: 1.55;
}

.ci-era-kw {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--math-muted);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.ci-era-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "tags go"
    "bar  bar";
  gap: 10px 16px;
  align-items: center;
}

.ci-era-tags {
  grid-area: tags;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ci-go {
  grid-area: go;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--math-green);
  white-space: nowrap;
  opacity: 0.75;
  transition: opacity 0.15s, transform 0.15s;
}

.ci-era:hover .ci-go {
  opacity: 1;
  transform: translateX(3px);
}

.ci-bar {
  grid-area: bar;
  height: 4px;
  background: var(--math-paper-2);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--math-line);
}

.ci-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--math-indigo), var(--math-green));
  border-radius: 2px;
  min-width: 4px;
  transition: width 0.3s var(--math-ease);
}

/* 页脚说明 */
.ci-aside {
  margin: 8px 0 48px;
  padding-top: 8px;
}

.ci-aside-note {
  text-align: center;
  color: var(--math-muted);
  font-size: 0.85rem;
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto 20px;
}

.ci-aside-note code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: var(--math-paper-2);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--math-line);
}

/* 响应式 */
@media (max-width: 720px) {
  .ci-hero.math-hero {
    text-align: center;
    padding: 36px 20px 28px;
  }

  .ci-hero .lead {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .ci-stats {
    grid-template-columns: 1fr 1fr;
    max-width: none;
  }

  .ci-legend {
    justify-content: center;
  }

  .ci-hero-deco {
    display: none;
  }

  .ci-era {
    grid-template-columns: 40px 1fr;
    gap: 0 12px;
  }

  .ci-era-node {
    width: 32px;
    height: 32px;
    font-size: 0.68rem;
  }

  .ci-era-body {
    padding: 14px 14px 12px;
  }

  .ci-era-title {
    font-size: 1.1rem;
  }

  .ci-era-foot {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tags"
      "bar"
      "go";
  }

  .ci-go {
    justify-self: start;
  }

  .ci-rail::before {
    left: 56px;
  }
}

@media (max-width: 420px) {
  .ci-stats {
    grid-template-columns: 1fr 1fr;
  }

  .ci-stat b {
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ci-era,
  .ci-era-body,
  .ci-rail-node,
  .ci-go {
    transition: none;
  }
  .ci-era:hover .ci-era-body {
    transform: none;
  }
}

/* ============================================
   编年史时代页 + 难题编年 · 紧凑简约 v4
   少留白、小卡片、信息密、不花哨
   ============================================ */

body.era-page,
body.problems-page {
  background: #F5F3EC;
}

body.era-page .container,
body.problems-page .container {
  max-width: 820px;
}

/* 页头压缩 */
body.era-page .math-hero,
body.problems-page .math-hero {
  padding: 28px 20px 22px !important;
}
body.era-page .math-hero h1,
body.problems-page .math-hero h1 {
  font-size: 1.55rem !important;
  margin-bottom: 6px !important;
}
body.era-page .math-hero .lead,
body.problems-page .math-hero .lead {
  font-size: 0.92rem !important;
  margin-bottom: 10px !important;
  max-width: 520px;
}
body.era-page .math-hero .eyebrow,
body.problems-page .math-hero .eyebrow {
  margin-bottom: 8px !important;
  font-size: 0.78rem !important;
}
body.era-page .legend,
body.problems-page .legend {
  margin-top: 8px !important;
  gap: 6px !important;
}
body.era-page .legend .badge-field,
body.problems-page .legend .badge {
  padding: 3px 8px !important;
  font-size: 0.7rem !important;
}

/* 工具栏紧凑 */
.ev-toolbar {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #E4E0D5;
  border-radius: 10px;
  box-shadow: none;
}
.ev-search {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  margin-bottom: 8px;
  border: 1px solid #E4E0D5;
  border-radius: 8px;
  font-size: 0.86rem;
  font-family: var(--font-sans);
  color: var(--math-ink);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='none' stroke='%23888' stroke-width='1.7'%3E%3Ccircle cx='6.5' cy='6.5' r='4.5'/%3E%3Cpath d='M10 10l3 3'/%3E%3C/svg%3E") 10px 50% no-repeat,
    #FAF8F2;
}
.ev-search:focus {
  outline: none;
  border-color: #1E2A78;
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(30,42,120,0.1);
}
.ev-filters { display: flex; flex-direction: column; gap: 6px; }
.fl-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.fl-label {
  font-size: 0.7rem;
  font-weight: 650;
  color: #7A7F88;
  min-width: 2.2em;
}
.fl-chip {
  border: 1px solid #E0DCD0;
  background: #fff;
  color: #333;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  line-height: 1.4;
  box-shadow: none;
  transition: background .12s, border-color .12s, color .12s;
}
.fl-chip:hover { border-color: #1E2A78; color: #1E2A78; transform: none; }
.fl-chip.on {
  background: #1E2A78;
  border-color: #1E2A78;
  color: #fff;
  box-shadow: none;
}
.ev-count {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #EEEBE3;
  font-size: 0.75rem;
  font-weight: 600;
  color: #8A8F98;
}

/* ---- 事件：紧凑行卡 ---- */
.ev-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 28px;
}
.ev-card {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none !important;
  display: block !important;
  transform: none !important;
}
.ev-card::before,
.ev-list::before { display: none !important; content: none !important; }

.ev-inner {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 0 12px;
  align-items: start;
  background: #fff;
  border: 1px solid #E4E0D5;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: none;
  transition: border-color .12s, background .12s;
}
.ev-card:hover .ev-inner {
  border-color: #C9C4B6;
  background: #FFFEFA;
  transform: none;
  box-shadow: none;
}

.ev-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  background: none !important;
  align-items: flex-start;
}
.ev-year {
  display: block !important;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #1E2A78 !important;
  letter-spacing: -0.02em;
  line-height: 1.3;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
}
.ev-head .type-tag {
  background: #F0EEE6;
  border: 1px solid #E0DCD0;
  color: #5A5E70;
  font-size: 0.65rem;
  font-weight: 650;
  padding: 1px 6px;
  border-radius: 4px;
}

/* 领域小点色，不铺大色条 */
.ev-inner {
  border-left: 3px solid #C8C4B8;
}
.ev-card[data-field="f-logic"] .ev-inner { border-left-color: #7B5BB5; }
.ev-card[data-field="f-algebra"] .ev-inner { border-left-color: #C4922A; }
.ev-card[data-field="f-analysis"] .ev-inner { border-left-color: #15A06A; }
.ev-card[data-field="f-geo"] .ev-inner { border-left-color: #3B6FBF; }
.ev-card[data-field="f-discrete"] .ev-inner { border-left-color: #B06A52; }
.ev-card[data-field="f-prob"] .ev-inner { border-left-color: #B08A20; }
.ev-card[data-field="f-applied"] .ev-inner { border-left-color: #C04A40; }
.ev-card[data-field="f-inter"] .ev-inner { border-left-color: #5A5E70; }

.ev-title {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 3px;
  padding: 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #14161F;
}
.ev-title a {
  color: inherit;
  text-decoration: none;
}
.ev-title a:hover { color: #1E2A78; text-decoration: underline; text-underline-offset: 2px; }

.ev-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  align-items: center;
  padding: 0;
  margin: 0 0 4px;
}
.ev-who {
  font-size: 0.78rem;
  font-weight: 600;
  color: #5A5E70;
}
.ev-who::before { display: none; }

.ev-note {
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #6B716D;
  background: none;
  border: none;
  border-radius: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  align-self: center;
}
.ev-more {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 650;
  color: #1E2A78 !important;
  text-decoration: none !important;
  background: none;
  padding: 4px 0;
  border-radius: 0;
  box-shadow: none;
  white-space: nowrap;
}
.ev-more::after { content: " →"; }
.ev-more:hover {
  color: #15A06A !important;
  background: none;
  transform: none;
  box-shadow: none;
  text-decoration: underline !important;
}

.badge-field {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 650;
  border: 1px solid transparent;
}
.f-logic    { color: #5A3E91; background: #F3EEF8; border-color: #E2D6F0; }
.f-algebra  { color: #8A6412; background: #F8F2E4; border-color: #EDE0BE; }
.f-analysis { color: #0E7A4C; background: #EAF6F0; border-color: #C5E5D4; }
.f-geo      { color: #1E4E8A; background: #EAF0F8; border-color: #C8D7EC; }
.f-discrete { color: #7A4A3E; background: #F6EEEB; border-color: #E8D2C9; }
.f-prob     { color: #7A5A0E; background: #F7F2E4; border-color: #E8DFB8; }
.f-applied  { color: #A02C22; background: #F8ECEB; border-color: #EBCBC7; }
.f-inter    { color: #3A3F5C; background: #EEEFF3; border-color: #D5D7E0; }

.type-tag {
  display: inline-flex;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 650;
  color: #5A5E70;
  background: #F0EEE6;
  border: 1px solid #E0DCD0;
}

.ev-empty {
  text-align: center;
  padding: 28px 12px;
  color: #8A8F98;
  background: #fff;
  border: 1px dashed #D8D3C6;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.88rem;
}
.ev-empty.hide,
.ev-card.hide,
.prob-card.hide,
.prob-era.hide { display: none !important; }

.chrono-keywords {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #EEF0F4;
  border: 1px solid #E0E3EA;
  color: #4A4E5A;
  font-weight: 500;
  font-size: 0.8rem;
  line-height: 1.45;
}
.chrono-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.chrono-pager a {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1E2A78;
  background: #fff;
  border: 1px solid #E0DCD0;
  border-radius: 999px;
  padding: 4px 11px;
  box-shadow: none;
}
.chrono-pager a:hover {
  background: #F3F4F8;
  color: #1E2A78;
  border-color: #C3C8E0;
}
.chrono-footnote {
  margin: 6px 0 40px;
  padding: 10px 12px;
  font-size: 0.78rem;
  color: #8A8F98;
  line-height: 1.55;
  background: #fff;
  border: 1px solid #E8E4D8;
  border-radius: 8px;
}

/* ---- 难题：同样紧凑 ---- */
.problems-page .stats-strip {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 0 10px;
}
@media (min-width: 720px) {
  .problems-page .stats-strip {
    grid-template-columns: repeat(6, 1fr);
  }
}
.problems-page .stat-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  padding: 8px 10px !important;
  background: #fff !important;
  border: 1px solid #E4E0D5 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.problems-page .stat-item b {
  font-size: 1.15rem !important;
  font-weight: 750 !important;
  color: #1E2A78 !important;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.era-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 12px;
}
.era-nav a {
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1E2A78;
  background: #fff;
  border: 1px solid #E0DCD0;
  border-radius: 999px;
  padding: 4px 10px;
}
.era-nav a:hover {
  background: #1E2A78;
  color: #fff;
  border-color: #1E2A78;
}

.prob-era { margin-bottom: 18px; }
.prob-era-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #1E2A78;
  color: #fff;
  box-shadow: none;
}
.prob-era-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: #fff;
  letter-spacing: 0;
  font-weight: 700;
}
.prob-era-count {
  font-size: 0.7rem;
  font-weight: 650;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 2px 8px;
}

.prob-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.prob-card {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none !important;
  display: block !important;
  transform: none !important;
}
.prob-inner {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 0 10px;
  align-items: start;
  background: #fff;
  border: 1px solid #E4E0D5;
  border-radius: 8px;
  padding: 9px 11px;
  box-shadow: none;
  overflow: visible;
  transition: border-color .12s, background .12s;
}
.prob-card:hover .prob-inner {
  transform: none;
  border-color: #C9C4B6;
  background: #FFFEFA;
  box-shadow: none;
}

.prob-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
  background: none !important;
}
.prob-year {
  display: block !important;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #1E2A78 !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}
.prob-status {
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 6px;
  border: 1px solid transparent;
}
.st-verified { color: #0E7A4C; background: #EAF6F0; border-color: #C5E5D4; }
.st-disproven { color: #A02C22; background: #F8ECEB; border-color: #EBCBC7; }
.st-open { color: #1E2A78; background: #EEF0F8; border-color: #C8CEE8; }
.st-independent { color: #5A5E70; background: #F0F1F3; border-color: #D8DAE0; }
.st-partial { color: #8A6412; background: #F7F0DB; border-color: #E5D7A8; }

/* 细状态色条 */
.prob-inner { border-left: 3px solid #C8C4B8; }
.prob-card[data-status="verified"] .prob-inner { border-left-color: #15A06A; }
.prob-card[data-status="disproven"] .prob-inner { border-left-color: #C04A40; }
.prob-card[data-status="open"] .prob-inner { border-left-color: #3B4DB0; }
.prob-card[data-status="independent"] .prob-inner { border-left-color: #6A7080; }
.prob-card[data-status="partial"] .prob-inner { border-left-color: #C4922A; }

.prob-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 2px;
  padding: 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #14161F;
}
.prob-who {
  margin: 0 0 3px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #6B716D;
}
.prob-who::before {
  content: "";
  display: none;
}
.prob-note {
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #7A7F88;
  background: none;
  border: none;
  border-radius: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prob-note a {
  color: #0E7A4C;
  font-weight: 650;
  text-decoration: none;
  border-bottom: none;
}
.prob-foot {
  padding: 0;
  display: flex;
  align-items: center;
  align-self: center;
}
.prob-foot .badge {
  font-size: 0.65rem;
  padding: 2px 7px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 650;
  border: 1px solid transparent;
}
.badge-verified { color: #0E7A4C; background: #EAF6F0; border-color: #C5E5D4; }
.badge-disproven { color: #A02C22; background: #F8ECEB; border-color: #EBCBC7; }
.badge-open { color: #1E2A78; background: #EEF0F8; border-color: #C8CEE8; }
.badge-independent { color: #5A5E70; background: #F0F1F3; border-color: #D8DAE0; }
.badge-partial { color: #8A6412; background: #F7F0DB; border-color: #E5D7A8; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin-top: 8px;
}
.legend .badge {
  box-shadow: none;
  padding: 3px 8px;
  font-size: 0.7rem;
}

/* 主区上边距压缩 */
body.era-page main.container,
body.problems-page main.container {
  padding-top: 12px;
  padding-bottom: 32px;
}

@media (max-width: 640px) {
  .ev-inner {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 4px 10px;
  }
  .ev-foot { grid-column: 1 / -1; justify-content: flex-start; }
  .prob-inner {
    grid-template-columns: 78px minmax(0, 1fr);
  }
  .prob-foot { grid-column: 1 / -1; }
  .problems-page .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

/* Final cascade gate: keep the editorial system authoritative. */
body:has(.math-hero), body:has(.math-hub) { background: var(--doxa-paper) !important; background-image: none !important; }
body:has(.math-subnav) .site-nav { display: grid !important; grid-template-columns: auto 1fr !important; }
body:has(.math-subnav) .site-nav .nav-actions { justify-content: flex-end; }

.math-subnav {
  min-height: 44px !important;
  gap: 22px !important;
  padding: 0 max(20px, calc((100% - 1180px) / 2)) !important;
  top: 66px !important;
  color: var(--doxa-ink) !important;
  background: rgba(255,255,255,.97) !important;
  border-bottom: 1px solid var(--doxa-line) !important;
  box-shadow: none !important;
  scrollbar-width: thin !important;
}
.math-subnav .ms-brand { display: none !important; }
.math-subnav .ms-label { align-self: stretch; display: inline-flex; align-items: center; color: var(--doxa-faint); border-right: 1px solid var(--doxa-line); padding: 0 20px 0 0; margin: 0; }
.math-subnav a:not(.ms-brand) { align-self: stretch; display: inline-flex; align-items: center; padding: 0 !important; border-radius: 0 !important; border-bottom: 2px solid transparent; color: #444852 !important; font-size: .8rem; background: transparent !important; }
.math-subnav a:not(.ms-brand):hover { color: var(--doxa-indigo) !important; }
.math-subnav a:not(.ms-brand).is-active { color: var(--doxa-indigo) !important; border-bottom-color: var(--doxa-indigo); background: transparent !important; }

.math-hero, .ci-hero.math-hero, .math-hub-hero {
  padding: 46px max(24px, calc((100% - 1180px) / 2)) 34px !important;
  text-align: left !important;
  background: #fff !important;
  background-image: none !important;
  border-bottom: 1px solid var(--doxa-line) !important;
}

/* ============================================
   数学难题编年 · 清晰阅读结构
   ============================================ */
body.problems-page {
  background: #f7f6f2 !important;
  background-image: none !important;
}
body.problems-page .site-nav { display: flex !important; }
body.problems-page .problems-hero {
  padding: 54px max(24px, calc((100% - 1180px) / 2)) 34px !important;
  text-align: left !important;
  background: #fff !important;
  border-bottom: 1px solid var(--doxa-line) !important;
}

/* Page template contract · 2026-08-13 */
.nav-actions .academy-menu-panel { left: auto; right: 0; }
.math-hero .math-back {
  display: inline-flex;
  margin: 0 0 22px;
  color: var(--doxa-gray);
  font-size: .76rem;
  font-weight: 650;
  text-decoration: none;
}
.math-hero .math-back:hover { color: var(--doxa-indigo); }
.math-article { font-size: 1rem; }
.math-article > h2 { margin-top: 2.5rem; }
.math-article > p, .math-article > ul, .math-article > ol { line-height: 1.85; }
.kn-fig img, .kn-fig svg { max-height: 520px; object-fit: contain; }
@media (max-width: 640px) {
  .table-scroll { border: 0; }
  .chrono-table { min-width: 760px; }
  .math-article { font-size: .96rem; }
}
body.problems-page .problems-hero h1 { color: var(--doxa-indigo) !important; font-size: clamp(2.1rem, 4vw, 3rem) !important; }
body.problems-page .problems-hero .lead { max-width: 660px; margin-left: 0; font-size: 1rem !important; }
body.problems-page .problems-hero .faculty-context { margin-top: 22px; }
body.problems-page .problems-hero .faculty-tabs { margin-top: 18px; }
body.problems-page .math-context span:not(.current) { color: #b5b8bf; }
body.problems-page .container { max-width: 1180px !important; padding-inline: 24px; }
body.problems-page main.container { padding-top: 28px !important; padding-bottom: 56px !important; }
body.problems-page .stats-strip {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 16px !important;
  padding: 14px 0;
  background: transparent !important;
  border-top: 1px solid var(--doxa-line);
  border-bottom: 1px solid var(--doxa-line);
}
body.problems-page .stat-item {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  gap: 5px !important;
  min-height: 0;
  padding: 0 18px !important;
  background: transparent !important;
  border: 0 !important;
  border-left: 1px solid var(--doxa-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--doxa-gray);
  font-size: .76rem;
}
body.problems-page .stat-item:first-child { padding-left: 0 !important; border-left: 0 !important; }
body.problems-page .stat-item b { color: var(--doxa-indigo) !important; font-size: 1.2rem !important; }
body.problems-page .problems-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 12px 20px;
  align-items: center;
  margin-bottom: 28px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--doxa-line);
  border-radius: 6px;
}
body.problems-page .era-nav { grid-column: 1 / -1; order: 2; margin: 0; padding-top: 12px; border-top: 1px solid var(--doxa-line); }
body.problems-page .era-nav a { color: var(--doxa-gray); background: var(--doxa-paper); border-color: var(--doxa-line); border-radius: 4px; padding: 5px 10px; }
body.problems-page .era-nav a:hover { color: var(--doxa-indigo); background: var(--doxa-indigo-soft); border-color: #cdd3e9; }
body.problems-page .ev-toolbar { display: contents; margin: 0; padding: 0; background: transparent; border: 0; }
body.problems-page .ev-search { grid-column: 1; width: 100%; height: 38px; margin: 0; background-color: var(--doxa-paper); border-radius: 4px; }
body.problems-page .ev-filters { grid-column: 2; }
body.problems-page .fl-row { gap: 6px; }
body.problems-page .fl-chip { border-radius: 4px; padding: 5px 9px; }
body.problems-page .ev-count { grid-column: 2; justify-self: end; margin: 5px 0 0; padding: 0; border: 0; font-size: .76rem; }
body.problems-page .prob-era { margin-bottom: 30px; }
body.problems-page .prob-era-head { margin-bottom: 10px; padding: 10px 14px; background: #fff; color: var(--doxa-indigo); border: 1px solid var(--doxa-line); border-left: 3px solid var(--doxa-indigo); border-radius: 4px; }
body.problems-page .prob-era-head h2 { color: var(--doxa-indigo); font-size: 1rem; }
body.problems-page .prob-era-count { color: var(--doxa-gray); background: var(--doxa-paper); border-color: var(--doxa-line); }
body.problems-page .prob-list { gap: 6px; }
body.problems-page .prob-inner { grid-template-columns: 118px minmax(0, 1fr) 0; gap: 0 18px; padding: 13px 16px; border: 1px solid var(--doxa-line); border-left: 3px solid var(--doxa-line-strong); border-radius: 4px; box-shadow: none; }
body.problems-page .prob-card[data-status="verified"] .prob-inner { border-left-color: #15986a; }
body.problems-page .prob-card[data-status="disproven"] .prob-inner { border-left-color: #c04a40; }
body.problems-page .prob-card[data-status="open"] .prob-inner { border-left-color: #5665b3; }
body.problems-page .prob-card[data-status="independent"] .prob-inner { border-left-color: #7c818b; }
body.problems-page .prob-card[data-status="partial"] .prob-inner { border-left-color: #c4922a; }
body.problems-page .prob-card:hover .prob-inner { border-color: var(--doxa-line-strong); border-left-color: var(--doxa-indigo); background: #fff; }
body.problems-page .prob-foot { display: none; }
body.problems-page .prob-title { font-size: 1rem; color: var(--doxa-ink); }
body.problems-page .prob-who { font-size: .78rem; }
body.problems-page .prob-note { max-width: 680px; font-size: .8rem; }

@media (max-width: 760px) {
  body.problems-page .problems-hero { padding: 42px 16px 28px !important; }
  body.problems-page .container { padding-inline: 16px; }
  body.problems-page .stat-item { padding-inline: 10px !important; }
  body.problems-page .problems-controls { grid-template-columns: 1fr; }
  body.problems-page .ev-search, body.problems-page .ev-filters, body.problems-page .ev-count { grid-column: 1; }
  body.problems-page .ev-count { justify-self: start; }
  body.problems-page .prob-inner { grid-template-columns: 84px minmax(0, 1fr); gap: 0 12px; }
}

/* ============================================
   Problems page refinement · 2026-08-09
   降低边框与卡片噪音，建立「标题 → 工具 → 时代 → 条目」阅读顺序
   ============================================ */
body.problems-page {
  background: var(--doxa-paper) !important;
}

body.problems-page .problems-hero {
  padding-top: 34px !important;
  padding-bottom: 24px !important;
}
body.problems-page .problems-hero .faculty-hero-logo {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
}
body.problems-page .problems-hero h1 {
  margin-bottom: 8px !important;
  font-size: clamp(2rem, 4vw, 2.85rem) !important;
}
body.problems-page .problems-hero .faculty-context {
  margin-top: 18px;
  font-size: .76rem;
}
body.problems-page .problems-hero .faculty-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  margin-top: 18px;
  border-top: 1px solid var(--doxa-line);
  border-bottom: 1px solid var(--doxa-line);
}
body.problems-page .problems-hero .faculty-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  color: var(--doxa-gray);
  font-size: .76rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
body.problems-page .problems-hero .faculty-tabs a:hover,
body.problems-page .problems-hero .faculty-tabs a.is-active {
  color: var(--doxa-indigo);
  background: var(--doxa-indigo-soft);
  border-bottom-color: var(--doxa-indigo);
}

body.problems-page main.container {
  padding-top: 28px !important;
}
body.problems-page .stats-strip {
  display: flex !important;
  gap: 0;
  margin-bottom: 20px !important;
  padding: 12px 0;
  border-top: 1px solid var(--doxa-line-strong);
  border-bottom: 1px solid var(--doxa-line);
}
body.problems-page .stat-item {
  flex: 1 1 0;
  justify-content: center;
  padding: 0 14px !important;
  font-size: .72rem;
  white-space: nowrap;
}
body.problems-page .stat-item b {
  font-size: 1.08rem !important;
}

body.problems-page .problems-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 34px;
  padding: 0;
  background: transparent;
  border: 0;
}
body.problems-page .ev-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--doxa-line);
  border-radius: 5px;
}
body.problems-page .ev-search {
  grid-column: auto;
  width: 100%;
  height: 38px;
  margin: 0;
  background: var(--doxa-paper);
  border: 1px solid var(--doxa-line);
  border-radius: 4px;
}
body.problems-page .ev-filters {
  grid-column: auto;
}
body.problems-page .fl-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
body.problems-page .fl-label {
  margin-right: 2px;
  color: var(--doxa-faint);
  font-size: .72rem;
}
body.problems-page .fl-chip {
  padding: 5px 9px;
  color: var(--doxa-gray);
  background: #fff;
  border: 1px solid var(--doxa-line);
  border-radius: 4px;
  font-size: .72rem;
}
body.problems-page .fl-chip:hover,
body.problems-page .fl-chip.on {
  color: #fff;
  background: var(--doxa-indigo);
  border-color: var(--doxa-indigo);
}
body.problems-page .ev-count {
  grid-column: auto;
  justify-self: end;
  margin: 0;
  padding: 0 2px 0 8px;
  color: var(--doxa-faint);
  font-size: .72rem;
  white-space: nowrap;
}
body.problems-page .era-nav {
  order: 2;
  gap: 6px;
  margin: 0;
  padding: 0 2px;
}
body.problems-page .era-nav a {
  padding: 4px 9px;
  color: var(--doxa-gray);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--doxa-line-strong);
  border-radius: 0;
  font-size: .72rem;
}
body.problems-page .era-nav a:hover {
  color: var(--doxa-indigo);
  background: transparent;
  border-color: var(--doxa-indigo);
}

body.problems-page .prob-era {
  margin-bottom: 34px;
}
body.problems-page .prob-era-head {
  margin: 0;
  padding: 12px 0 10px;
  color: var(--doxa-indigo);
  background: transparent;
  border: 0;
  border-top: 2px solid var(--doxa-indigo);
  border-bottom: 1px solid var(--doxa-line-strong);
  border-radius: 0;
}
body.problems-page .prob-era-head h2 {
  color: var(--doxa-indigo);
  font-size: 1rem;
}
body.problems-page .prob-era-count {
  color: var(--doxa-gray);
  background: transparent;
  border: 0;
  font-size: .72rem;
}
body.problems-page .prob-list {
  gap: 0;
  border-bottom: 1px solid var(--doxa-line);
}
body.problems-page .prob-inner {
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 0 20px;
  padding: 15px 0 15px 14px;
  background: transparent;
  border: 0;
  border-left: 3px solid var(--doxa-line-strong);
  border-bottom: 1px solid var(--doxa-line);
  border-radius: 0;
}
body.problems-page .prob-card:last-child .prob-inner {
  border-bottom: 0;
}
body.problems-page .prob-card:hover .prob-inner {
  background: #fff;
  border-left-color: var(--doxa-indigo);
}
body.problems-page .prob-head {
  grid-column: 1;
  grid-row: 1 / span 3;
  padding-top: 1px;
}
body.problems-page .prob-title {
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 4px;
  font-size: 1rem;
}
body.problems-page .prob-who {
  grid-column: 2;
  grid-row: 2;
  margin-bottom: 3px;
  color: var(--doxa-indigo);
  font-size: .75rem;
}
body.problems-page .prob-note {
  grid-column: 2;
  grid-row: 3;
  max-width: 760px;
  color: var(--doxa-gray);
  font-size: .78rem;
}

@media (max-width: 760px) {
  body.problems-page .problems-hero { padding: 30px 16px 22px !important; }
  body.problems-page .problems-hero .faculty-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  body.problems-page .problems-hero .faculty-tabs a { flex: 0 0 auto; padding-inline: 10px; }
  body.problems-page .stats-strip { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 10px 0; }
  body.problems-page .stat-item { justify-content: flex-start; padding: 0 8px !important; border-left: 1px solid var(--doxa-line) !important; }
  body.problems-page .stat-item:nth-child(3n + 1) { padding-left: 0 !important; border-left: 0 !important; }
  body.problems-page .ev-toolbar { grid-template-columns: 1fr; }
  body.problems-page .fl-row { justify-content: flex-start; }
  body.problems-page .ev-count { justify-self: start; padding-left: 0; }
  body.problems-page .prob-inner { grid-template-columns: 86px minmax(0, 1fr); gap: 0 12px; padding-left: 10px; }
}
.math-hero::before, .math-hero::after, .math-hub-hero::before, .ci-hero.math-hero::after, .ci-hero-deco { display: none !important; content: none !important; }
.math-hero .eyebrow, .math-hub-hero .eyebrow, .ci-hero .eyebrow { margin-bottom: 12px !important; color: var(--doxa-gray) !important; font-size: .75rem !important; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.math-hero h1, .math-hub-hero h1, .ci-hero h1 { max-width: 850px; margin: 0 0 12px !important; font-size: clamp(2rem, 4.5vw, 3.2rem) !important; line-height: 1.2; letter-spacing: -.035em; }
.math-hero .lead, .math-hub-hero .lead, .ci-hero .lead { max-width: 720px; margin: 0 !important; text-align: left !important; color: var(--doxa-gray); font-size: 1rem; }
.math-hub-hero .hub-mark { display: none !important; }
.ci-hero-inner { max-width: 1180px !important; margin: 0 !important; }

.ci-stats { display: flex !important; flex-wrap: wrap; gap: 0 !important; max-width: 760px; margin: 24px 0 16px !important; border-top: 1px solid var(--doxa-line); border-bottom: 1px solid var(--doxa-line); }
.ci-stat { min-width: 135px; padding: 14px 22px !important; border: 0 !important; border-left: 1px solid var(--doxa-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; backdrop-filter: none !important; }
.ci-stat:first-child { padding-left: 0 !important; border-left: 0 !important; }
.ci-stat b { font-size: 1.55rem !important; }
.ci-legend { justify-content: flex-start !important; }

.badge, .badge-field, .type-tag, .ci-count, .chrono-pager a, .era-nav a, .chrono-links a { border-radius: 3px !important; box-shadow: none !important; }
.ci-main { padding-top: 26px !important; }
.ci-rail { padding: 14px 8px 16px !important; margin-bottom: 34px !important; border-radius: 4px !important; box-shadow: none !important; }
.ci-rail::before { background: var(--doxa-line-strong) !important; opacity: 1 !important; }
.ci-rail-dot { box-shadow: none !important; border-width: 2px !important; }
.ci-band-label { margin-bottom: 4px !important; padding: 14px 0 !important; }
.ci-band-no { width: 34px !important; height: 34px !important; border-radius: 3px !important; }
.ci-timeline { gap: 24px !important; }
.ci-era { grid-template-columns: 48px 1fr !important; }
.ci-era-node { width: 30px !important; height: 30px !important; box-shadow: none !important; }
.ci-era-spine::before { width: 1px !important; background: var(--doxa-line-strong) !important; }
.ci-era-body { margin: 0 !important; padding: 17px 10px 17px 4px !important; border: 0 !important; border-bottom: 1px solid var(--doxa-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible !important; }
.ci-era-body::before { display: none !important; }
.ci-era:hover .ci-era-body { transform: none !important; box-shadow: none !important; border-color: var(--doxa-line-strong) !important; }
.ci-era-title { color: var(--doxa-ink) !important; }
.ci-count { background: transparent !important; }
.ci-bar { height: 2px !important; border: 0 !important; border-radius: 0 !important; background: var(--doxa-line) !important; }
.ci-bar span { background: var(--doxa-indigo) !important; border-radius: 0 !important; }
.ci-go { color: var(--doxa-indigo) !important; }

.math-article.container, .container.math-article { max-width: 780px !important; padding-top: 28px; }
.math-article .kn-sec { margin: 0 !important; padding: 28px 0 !important; border: 0 !important; border-bottom: 1px solid var(--doxa-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.math-article .kn-sec h2 { padding: 0 !important; border: 0 !important; font-size: 1.3rem !important; }
.kn-fig { margin: 24px 0 32px !important; padding: 22px 20px 14px !important; border-radius: 4px !important; box-shadow: none !important; }
.knowledge-record { display: grid; grid-template-columns: repeat(4,1fr); margin: 6px 0 24px; border-top: 1px solid var(--doxa-line); border-bottom: 1px solid var(--doxa-line); background: #fff; }
.knowledge-record div { padding: 13px 14px; border-left: 1px solid var(--doxa-line); }
.knowledge-record div:first-child { border-left: 0; }
.knowledge-record span { display: block; color: var(--doxa-faint); font-size: .68rem; }
.knowledge-record strong { display: block; margin-top: 4px; color: var(--doxa-ink); font-size: .76rem; line-height: 1.45; }

.hub-grid { grid-template-columns: repeat(2,1fr) !important; gap: 0 !important; margin-top: 28px !important; border-top: 1px solid var(--doxa-line); }
.hub-card { min-height: 160px !important; padding: 24px 22px !important; border: 0 !important; border-right: 1px solid var(--doxa-line) !important; border-bottom: 1px solid var(--doxa-line) !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; }
.hub-card:nth-child(even) { border-right: 0 !important; }
.hub-card::after { display: none !important; }
.hub-card:hover { transform: none !important; box-shadow: none !important; background: #fcfcfa !important; }
.hub-card .hub-icon { width: auto !important; height: auto !important; display: block !important; margin-bottom: 12px !important; border-radius: 0 !important; background: transparent !important; font-size: .75rem !important; letter-spacing: .08em; text-transform: uppercase; }
.table-scroll, .problem-table, .stat-item, .era-card, .prob-inner, .ev-inner { box-shadow: none !important; }

@media (max-width: 780px) {
  body:has(.math-subnav) .site-nav { display: flex !important; }
  body:has(.math-subnav) .site-nav .nav-actions { justify-content: flex-start; }
  .math-subnav { top: 116px !important; gap: 14px !important; padding: 0 12px !important; }
  .math-hero, .ci-hero.math-hero, .math-hub-hero { padding: 34px 20px 28px !important; }
  .ci-stats { display: grid !important; grid-template-columns: 1fr 1fr; }
  .ci-stat { min-width: 0; padding: 12px 14px !important; border-top: 1px solid var(--doxa-line) !important; }
  .ci-stat:nth-child(odd) { border-left: 0 !important; }
  .ci-stat:nth-child(-n+2) { border-top: 0 !important; }
  .ci-era { grid-template-columns: 34px 1fr !important; }
  .knowledge-record { grid-template-columns: 1fr 1fr; }
  .knowledge-record div:nth-child(odd) { border-left: 0; }
  .knowledge-record div:nth-child(n+3) { border-top: 1px solid var(--doxa-line); }
  .hub-grid { grid-template-columns: 1fr !important; }
  .hub-card { border-right: 0 !important; }
}

@media (max-width: 520px) {
  .knowledge-record { grid-template-columns: 1fr; }
  .knowledge-record div { border-left: 0; border-top: 1px solid var(--doxa-line); }
  .knowledge-record div:first-child { border-top: 0; }
}

/* Final authority for the single-column problems page. */
body.problems-page .site-nav { display: flex !important; }
body.problems-page .problems-hero { padding: 54px max(24px, calc((100% - 1180px) / 2)) 34px !important; text-align: left !important; background: #fff !important; }
body.problems-page .problems-hero h1 { font-size: clamp(2.1rem, 4vw, 3rem) !important; }
body.problems-page .problems-hero .lead { margin-left: 0 !important; }
body.problems-page .problems-hero .faculty-context { margin-top: 22px; }
body.problems-page .problems-hero .faculty-tabs { margin-top: 18px; }
body.problems-page .container { max-width: 1180px !important; }
body.problems-page main.container { padding-top: 28px !important; padding-bottom: 56px !important; }
body.problems-page .problems-controls { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 20px; align-items: center; margin-bottom: 28px; padding: 14px 16px; background: #fff; border: 1px solid var(--doxa-line); border-radius: 6px; }
body.problems-page .era-nav { grid-column: 1 / -1; order: 2; margin: 0; padding-top: 12px; border-top: 1px solid var(--doxa-line); }
body.problems-page .ev-toolbar { display: contents !important; }
body.problems-page .ev-search { grid-column: 1; width: 100%; height: 38px; margin: 0; }
body.problems-page .ev-filters { grid-column: 2; }
body.problems-page .ev-count { grid-column: 2; justify-self: end; margin: 5px 0 0; padding: 0; border: 0; }
body.problems-page .prob-era-head { background: #fff; color: var(--doxa-indigo); border: 1px solid var(--doxa-line); border-left: 3px solid var(--doxa-indigo); }
body.problems-page .prob-era-head h2 { color: var(--doxa-indigo); }
body.problems-page .prob-inner { grid-template-columns: 118px minmax(0, 1fr) 0; gap: 0 18px; padding: 13px 16px; border: 1px solid var(--doxa-line); border-left: 3px solid var(--doxa-line-strong); border-radius: 4px; }
body.problems-page .prob-foot { display: none; }
body.problems-page .prob-card:hover .prob-inner { border-color: var(--doxa-line-strong); border-left-color: var(--doxa-indigo); background: #fff; }
@media (max-width: 760px) {
  body.problems-page .problems-hero { padding: 42px 16px 28px !important; }
  body.problems-page .container { padding-inline: 16px; }
  body.problems-page .problems-controls { grid-template-columns: 1fr; }
  body.problems-page .ev-search, body.problems-page .ev-filters, body.problems-page .ev-count { grid-column: 1; }
  body.problems-page .ev-count { justify-self: start; }
  body.problems-page .prob-inner { grid-template-columns: 84px minmax(0, 1fr); gap: 0 12px; }
}
