/* ==========================================================================
   《读懂牛顿》全站样式表
   设计基调：教材的清晰 + Apple 官网的留白。大字号、高对比、克制用色。
   断点：>=1000 宽屏双栏 / 640-999 单栏两列 / <640 全单栏
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --brand:       #3B5BDB;   /* 主色 靛蓝 */
  --brand-dark:  #2F49AF;
  --brand-soft:  #EDF1FD;
  --brand-line:  #C7D2FE;
  --accent:      #F59F00;   /* 强调 琥珀 */
  --accent-soft: #FFF8E9;
  --accent-line: #F2D675;
  --green:       #0CA678;
  --green-soft:  #E6FCF5;
  --purple:      #7048E8;
  --purple-soft: #F1EBFF;
  --orange:      #E8590C;
  --orange-soft: #FFF0E8;

  --bg:      #F7F9FC;
  --bg-alt:  #EDF1F7;
  --card:    #FFFFFF;
  --line:    #E3E8EF;
  --line-2:  #D4DBE5;
  --ink:     #1B2530;
  --ink-2:   #56617A;
  --ink-3:   #8B96AA;


  /* --- 设计系统 v1 扩充令牌（同值收敛，v1.0） --- */
  --accent-deep    : #854F0B;
  --accent-ink     : #A16207;
  --accent-ink-2   : #B26A00;
  --accent-ink-deep: #412402;
  --accent-wash    : #FFF6E5;
  --accent-wash-2  : #FFF4E0;
  --bg-elev        : #FBFCFE;
  --brand-a11      : rgba(59,91,219,.11);
  --brand-a13      : rgba(59,91,219,.13);
  --brand-a26      : rgba(59,91,219,.26);
  --brand-a30      : rgba(59,91,219,.3);
  --brand-a32      : rgba(59,91,219,.32);
  --brand-a40      : rgba(59,91,219,.4);
  --brand-hover    : #DDE5FC;
  --brand-ink      : #2C3E7A;
  --brand-light    : #6E8BFF;
  --brand-wash     : #EEF2FE;
  --foot-dim       : #7B8798;
  --foot-fg        : #A9B4C4;
  --foot-line      : #2C3846;
  --foot-link      : #CBD5E1;
  --green-ink      : #087F5B;
  --green-line     : #B2F0DC;
  --highlight-bg   : #FFF3BF;
  --highlight-fg   : #6B4E12;
  --img-bg         : #F4F6FA;
  --ink-a18        : rgba(27,37,48,.18);
  --ink-body       : #2B3644;
  --ink-soft       : #5C6B82;
  --ink-strong     : #14202B;
  --nav-bg         : rgba(255,255,255,.86);
  --orange-ink     : #C2410C;
  --overlay        : rgba(20,30,45,.42);
  --purple-ink     : #5B30C4;
  --swatch-gray    : #CCCCCC;
  --white          : #FFFFFF;
  --hero-bg        : #0E1219;   /* 深色首屏底（门户首页 · 图标桌面） */
  --hero-bg-2      : #171E2B;   /* 深色首屏顶部渐亮端 */

  --print-ink      : #000000;

  --radius:   16px;
  --radius-s: 10px;
  --shadow-s: 0 1px 2px rgba(27,37,48,.05);
  --shadow-m: 0 4px 16px rgba(27,37,48,.07);
  --shadow-l: 0 18px 50px rgba(27,37,48,.16);
  --shadow-hero    : 0 12px 28px rgba(0, 0, 0, .5);   /* 深底图标浮起投影 */

  --nav-h:   62px;
  --max-w:   1160px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.35; font-weight: 800; letter-spacing: -.01em; margin: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.5em; }
li { margin-bottom: .4em; }
strong { font-weight: 700; color: var(--ink-strong); }
button { font-family: inherit; font-size: inherit; cursor: pointer; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---------- 3. 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s;
}
.nav.scrolled { box-shadow: var(--shadow-m); }
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: var(--nav-h); display: flex; align-items: center; gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 17.5px; color: var(--ink); letter-spacing: -.02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .apple {
  width: 27px; height: 27px; flex: none;
  background: linear-gradient(140deg, var(--brand), var(--brand-light));
  border-radius: 8px; display: grid; place-items: center;
  font-size: 15px; color: var(--white); box-shadow: 0 3px 8px var(--brand-a32);
}
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  padding: 7px 13px; border-radius: 9px; font-size: 15px; font-weight: 600;
  color: var(--ink-2); transition: background .18s, color .18s;
}
.nav-links a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.nav-links a.active { color: var(--brand); background: var(--brand-soft); }

.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.nav-toggle i { width: 17px; height: 2px; background: var(--ink); border-radius: 2px; display: block; transition: .25s; }
.nav.open .nav-toggle i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .nav-toggle i:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

#progress {
  position: absolute; left: 0; bottom: -1px; height: 2.5px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width .1s linear; border-radius: 0 2px 2px 0;
}

/* ---------- 4. 通用排版组件 ---------- */
section { padding: 60px 0; }
section.tight { padding: 34px 0; }
.sec-head { margin-bottom: 30px; }
.sec-kicker {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: 1.4px;
  color: var(--brand); background: var(--brand-soft);
  padding: 4px 11px; border-radius: 7px; margin-bottom: 12px;
}
.sec-head h2 { font-size: 30px; }
.sec-head p { color: var(--ink-2); font-size: 16px; margin: 10px 0 0; max-width: 62ch; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-s);
}
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 20px; border-radius: 11px; font-size: 15px; font-weight: 700;
  background: var(--brand); color: var(--white); border: none;
  box-shadow: 0 3px 10px var(--brand-a26); transition: transform .16s, box-shadow .16s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px var(--brand-a30); text-decoration: none; color:var(--white); }
.btn.ghost { background: var(--white); color: var(--brand); border: 1.5px solid var(--brand-line); box-shadow: none; }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.sm { padding: 7px 14px; font-size: 14px; border-radius: 9px; }

/* ---------- 5. 可点击术语 ---------- */
.term {
  color: var(--brand); font-weight: 600; cursor: pointer;
  border-bottom: 1.5px dotted var(--brand);
  padding: 0 1px; border-radius: 2px;
  transition: background .15s, border-color .15s;
}
.term:hover { background: var(--brand-soft); border-bottom-style: solid; }
.term:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- 6. 术语弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: var(--overlay);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .22s;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  width: min(560px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--white); border-radius: 20px; box-shadow: var(--shadow-l);
  transform: translateY(14px) scale(.98); transition: transform .24s cubic-bezier(.2,.9,.3,1.2);
  -webkit-overflow-scrolling: touch;
}
.modal-mask.show .modal { transform: none; }
.modal-head {
  padding: 22px 24px 16px; border-bottom: 1px solid var(--line);
  position: relative;
}
.modal-cat {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .8px;
  color: var(--ink-3); background: var(--bg-alt);
  padding: 3px 9px; border-radius: 6px; margin-bottom: 9px;
}
.modal-head h3 { font-size: 24px; padding-right: 44px; }
.modal-head .short {
  margin: 10px 0 0; font-size: 16px; color: var(--brand);
  font-weight: 700; line-height: 1.6;
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-2);
  font-size: 19px; line-height: 1; display: grid; place-items: center;
  transition: background .16s;
}
.modal-close:hover { background: var(--bg-alt); color: var(--ink); }
.modal-body { padding: 20px 24px 8px; }
.mb { margin-bottom: 16px; }
.mb:last-child { margin-bottom: 4px; }
.mb .mt {
  font-size: 12px; font-weight: 800; letter-spacing: .6px;
  color: var(--ink-3); margin-bottom: 5px; display: block;
}
.mb p { margin: 0; font-size: 15.5px; line-height: 1.8; color: var(--ink-2); }
.mb.analogy {
  background: var(--accent-soft); border-radius: 12px; padding: 14px 16px;
  border: 1px solid var(--accent-line);
}
.mb.analogy .mt { color: var(--accent-ink); }
.mb.analogy p { color: var(--highlight-fg); }
.mb.extra {
  background: var(--brand-soft); border-radius: 12px; padding: 14px 16px;
  border: 1px solid var(--brand-line);
}
.mb.extra p { color: var(--brand-ink); }
.hl { background: var(--highlight-bg); padding: 0 4px; border-radius: 4px; font-weight: 600; color: var(--highlight-fg); }
.modal-related {
  padding: 14px 24px 4px; border-top: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
}
.modal-related .mt { font-size: 12px; font-weight: 800; color: var(--ink-3); margin-right: 2px; }
.chip {
  font-size: 13px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  padding: 4px 11px; border-radius: 999px; cursor: pointer; transition: background .15s;
}
.chip:hover { background: var(--brand-hover); }
.modal-foot {
  padding: 16px 24px 20px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.modal-foot .tip { font-size: 13px; color: var(--ink-3); }
.modal-foot .go {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand); color: var(--white); font-size: 14.5px; font-weight: 700;
  padding: 10px 18px; border-radius: 10px; box-shadow: 0 3px 10px var(--brand-a26);
}
.modal-foot .go:hover { text-decoration: none; filter: brightness(1.06); }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--brand-wash) 0%, var(--bg) 55%, var(--accent-wash) 100%);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -80px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, var(--brand-a13), transparent 68%);
}
.hero-inner {
  position: relative; z-index: 1; max-width: var(--max-w); margin: 0 auto;
  padding: 66px 24px 60px; display: grid;
  grid-template-columns: 1.15fr .85fr; gap: 46px; align-items: center;
}
.hero h1 { font-size: 46px; letter-spacing: -.03em; margin-bottom: 6px; }
.hero .sub {
  font-size: 19px; color: var(--ink-2); font-weight: 600; margin: 0 0 20px;
  line-height: 1.7;
}
.hero .lead { font-size: 16.5px; color: var(--ink-2); max-width: 52ch; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { display: flex; justify-content: center; }
.hero-portrait {
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-m);
  border: 5px solid var(--white); background: var(--white); max-width: 300px;
}
.hero-portrait img { width: 100%; }
.hero-portrait figcaption {
  font-size: 12.5px; color: var(--ink-3); padding: 9px 6px 3px; text-align: center;
  line-height: 1.5;
}
.hero-stats { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.stat .n { font-size: 27px; font-weight: 800; color: var(--brand); line-height: 1.2; font-family: var(--mono); }
.stat .l { font-size: 13px; color: var(--ink-2); }

/* ---------- 8. 成就卡片 ---------- */
.ach-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-s);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ach-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-m);
  border-color: var(--brand-line); text-decoration: none;
}
.ach-card .thumb {
  height: 132px; display: grid; place-items: center;
  background: var(--brand-soft); border-bottom: 1px solid var(--line);
  padding: 14px;
}
.ach-card .thumb img { max-height: 104px; width: auto; }
.ach-card .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.ach-card .year {
  font-size: 12px; font-weight: 800; color: var(--ink-3);
  font-family: var(--mono); letter-spacing: .5px;
}
.ach-card h3 { font-size: 19px; margin: 4px 0 8px; }
.ach-card p { font-size: 14.5px; color: var(--ink-2); margin: 0 0 14px; flex: 1; line-height: 1.75; }
.ach-card .more { font-size: 14px; font-weight: 700; color: var(--brand); }

/* ---------- 9. 时间轴 ---------- */
.timeline { position: relative; padding-left: 8px; }
.tl-item {
  display: grid; grid-template-columns: 92px 30px 1fr; gap: 0;
  align-items: start; position: relative; padding-bottom: 8px;
}
.tl-rail { position: relative; display: flex; justify-content: center; height: 100%; }
.tl-rail::before {
  content: ""; position: absolute; top: 0; bottom: -8px; left: 50%;
  width: 2px; transform: translateX(-50%); background: var(--line-2);
}
.tl-item:last-child .tl-rail::before { bottom: 40%; }
.tl-dot {
  position: relative; z-index: 2; width: 15px; height: 15px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--brand-line); margin-top: 20px;
  transition: border-color .2s, transform .2s;
}
.tl-item.open .tl-dot, .tl-item.highlight .tl-dot { border-color: var(--brand); transform: scale(1.15); }
.tl-item.highlight .tl-dot { background: var(--brand); }
.tl-year {
  font-family: var(--mono); font-size: 15.5px; font-weight: 700;
  color: var(--brand); padding-top: 15px; text-align: right; padding-right: 18px;
}
.tl-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  margin: 8px 0; overflow: hidden; box-shadow: var(--shadow-s);
  transition: box-shadow .2s, border-color .2s;
}
.tl-item.open .tl-card { border-color: var(--brand-line); box-shadow: var(--shadow-m); }
.tl-head { padding: 15px 18px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; }
.tl-head:hover { background: var(--bg-elev); }
.tl-head .t { font-size: 17.5px; font-weight: 700; margin: 0; flex: 1; }
.tl-head .s { font-size: 14.5px; color: var(--ink-2); margin: 4px 0 0; }
.tl-arrow {
  flex: none; width: 22px; height: 22px; color: var(--ink-3);
  transition: transform .24s; margin-top: 4px;
}
.tl-item.open .tl-arrow { transform: rotate(180deg); color: var(--brand); }
.tl-panel { display: none; padding: 0 18px 18px; border-top: 1px dashed var(--line); }
.tl-item.open .tl-panel { display: block; animation: fadeDown .26s ease; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tl-panel p { font-size: 15.5px; color: var(--ink-2); margin: 14px 0; }
.tl-panel figure { margin: 0 0 14px; }
.tl-panel figure img {
  border-radius: 12px; border: 1px solid var(--line);
  display: block; width: auto; max-width: 100%; height: auto; max-height: 360px; object-fit: contain;
  background: var(--img-bg); margin: 0 auto;
}
.tl-panel figure img[src$=".svg"] { width: 100%; max-width: 100%; }  /* 矢量图放大无损，保持满宽 */
.tl-panel figcaption { font-size: 13px; color: var(--ink-3); margin-top: 7px; line-height: 1.6; text-align: center; }  /* 图片按比例居中后，图注随之居中，保持同一条中轴 */
.tl-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tag {
  font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 7px;
  background: var(--bg-alt); color: var(--ink-2);
}
.tag.b { background: var(--brand-soft); color: var(--brand); }
.tag.g { background: var(--green-soft); color: var(--green-ink); }
.tag.o { background: var(--orange-soft); color: var(--orange-ink); }
.tag.p { background: var(--purple-soft); color: var(--purple-ink); }
.tag.a { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- 10. 详解页布局 ---------- */
.detail-wrap {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 268px; gap: 42px; align-items: start;
}
.page-head {
  background: linear-gradient(150deg, var(--brand-wash), var(--bg) 70%);
  border-bottom: 1px solid var(--line); padding: 44px 0 40px;
}
.page-head .wrap { max-width: var(--max-w); }
.crumb { font-size: 13.5px; color: var(--ink-3); margin-bottom: 14px; }
.crumb a { color: var(--ink-2); }
.crumb a:hover { color: var(--brand); }
.page-head h1 { font-size: 38px; letter-spacing: -.025em; }
.page-head .big-claim {
  font-size: 20px; font-weight: 700; color: var(--brand);
  margin: 14px 0 0; line-height: 1.65; max-width: 46ch;
}
.page-head .meta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.article { padding-top: 40px; padding-bottom: 30px; min-width: 0; }
.article h2 {
  font-size: 25px; margin: 44px 0 16px; padding-top: 8px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.article h2:first-child { margin-top: 0; }

/* 任何可能作为锚点的元素，跳转时都让开吸顶导航。
   .article h2 那条只覆盖了 h2，而术语锚点还有挂在 <p>/<li>/<div> 上的，
   它们会正好停在 y=0 被导航栏压住，跳过去等于没跳到位。 */
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
.article h3 { font-size: 19px; margin: 28px 0 10px; }
.article p { font-size: 16.5px; color: var(--ink-body); }
.article ul li, .article ol li { font-size: 16.5px; color: var(--ink-body); }
.article > p:last-child { margin-bottom: 0; }

figure.fig { margin: 26px 0; }
figure.fig img {
  width: 100%; border-radius: 14px; border: 1px solid var(--line); background: var(--white);
}
figure.fig figcaption {
  font-size: 13.5px; color: var(--ink-3); margin-top: 9px;
  line-height: 1.7; padding-left: 2px;
}
figure.fig figcaption b { color: var(--ink-2); }

.callout {
  border-radius: 14px; padding: 18px 20px; margin: 24px 0;
  border: 1px solid var(--brand-line); background: var(--brand-soft);
}
.callout.amber { border-color: var(--accent-line); background: var(--accent-soft); }
.callout.green { border-color: var(--green-line); background: var(--green-soft); }
.callout .ct { font-size: 14px; font-weight: 800; margin-bottom: 6px; display: block; }
.callout p { margin: 0; font-size: 15.5px; }
.callout p + p { margin-top: 8px; }

/* 公式卡 */
.formula {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 22px; margin: 26px 0; text-align: center; box-shadow: var(--shadow-s);
}
.formula .eq {
  font-family: var(--mono); font-size: 28px; font-weight: 700;
  color: var(--ink); letter-spacing: .5px; margin-bottom: 4px;
  display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 2px;
}
.formula .eq .sym {
  cursor: pointer; padding: 0 3px; border-radius: 6px;
  border-bottom: 2px dotted var(--brand); color: var(--brand); transition: background .15s;
}
.formula .eq .sym:hover, .formula .eq .sym.on { background: var(--brand-soft); }
.formula .eq-note { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.sym-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.sym-notes { margin-top: 16px; text-align: left; }
.sym-note {
  display: none; background: var(--brand-soft); border: 1px solid var(--brand-line);
  border-radius: 12px; padding: 13px 16px; font-size: 15px; color: var(--brand-ink); line-height: 1.75;
}
.sym-note.show { display: block; animation: fadeDown .2s; }
.sym-note b { font-family: var(--mono); font-size: 16px; }

/* 侧边栏 */
.side { position: sticky; top: calc(var(--nav-h) + 20px); padding-top: 40px; }
.side-box {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-s);
}
.side-box h4 {
  font-size: 12.5px; font-weight: 800; letter-spacing: 1px;
  color: var(--ink-3); margin-bottom: 12px;
}
.toc { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a {
  display: block; padding: 6px 10px; border-radius: 8px; font-size: 14.5px;
  color: var(--ink-2); border-left: 2.5px solid transparent; transition: .15s;
}
.toc a:hover { background: var(--bg-alt); text-decoration: none; color: var(--ink); }
.toc a.active { color: var(--brand); background: var(--brand-soft); border-left-color: var(--brand); font-weight: 700; }
.side-terms { display: flex; flex-wrap: wrap; gap: 6px; }
.side-box .fact { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.side-box .fact b { color: var(--ink); }

.page-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin: 46px 0 0; padding-top: 26px; border-top: 1px solid var(--line);
}
.pn {
  border: 1px solid var(--line); border-radius: 13px; padding: 15px 18px;
  background: var(--white); transition: border-color .18s, background .18s;
}
.pn:hover { border-color: var(--brand-line); background: var(--brand-soft); text-decoration: none; }
.pn .lab { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.pn .tt { font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 3px; }
.pn.next { text-align: right; }

/* ---------- 11. 交互演示 ---------- */
.lab {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; margin: 26px 0; box-shadow: var(--shadow-s);
}
.lab-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.lab-head h4 { font-size: 17px; }
.lab-head .badge {
  font-size: 11.5px; font-weight: 800; background: var(--green-soft); color: var(--green-ink);
  padding: 3px 9px; border-radius: 6px;
}
.lab-desc { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }
.lab canvas {
  width: 100%; height: auto; display: block; border-radius: 12px;
  background: var(--bg-elev); border: 1px solid var(--line); touch-action: none;
}
.lab-controls { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.ctrl { flex: 1; min-width: 190px; }
.ctrl label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px;
}
.ctrl label .v { font-family: var(--mono); color: var(--brand); font-size: 14px; }
.ctrl input[type=range] {
  width: 100%; height: 5px; border-radius: 3px; appearance: none;
  background: var(--line-2); outline: none;
}
.ctrl input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand); border: 3px solid var(--white); cursor: pointer;
  box-shadow: 0 2px 6px var(--brand-a40);
}
.ctrl input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--brand);
  border: 3px solid var(--white); cursor: pointer;
}
.lab-readout {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--bg-alt); font-size: 14.5px; color: var(--ink-2);
  font-family: var(--mono); text-align: center; line-height: 1.7;
}

/* ---------- 12. 词典页 ---------- */
.search-bar { position: relative; margin-bottom: 22px; }
.search-bar input {
  width: 100%; padding: 14px 18px 14px 46px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 13px; background: var(--white);
  color: var(--ink); font-family: inherit; outline: none; transition: border-color .18s;
}
.search-bar input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-a11); }
.search-bar .ico { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cat-btn {
  padding: 7px 15px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--white); font-size: 14px; font-weight: 700; color: var(--ink-2); transition: .16s;
}
.cat-btn:hover { border-color: var(--brand-line); color: var(--brand); }
.cat-btn.on { background: var(--brand); border-color: var(--brand); color: var(--white); }
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.term-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 13px;
  padding: 16px 18px; cursor: pointer; transition: .18s; text-align: left; width: 100%;
}
.term-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow-m); transform: translateY(-2px); }
.term-card .tc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.term-card .tc-cat { font-size: 11px; font-weight: 800; color: var(--ink-3); background: var(--bg-alt); padding: 2px 7px; border-radius: 5px; }
.term-card h3 { font-size: 17px; margin: 0; }
.term-card p { font-size: 14.5px; color: var(--ink-2); margin: 0; line-height: 1.7; }
.term-card .go { font-size: 12.5px; font-weight: 700; color: var(--brand); margin-top: 9px; display: block; }
.empty { text-align: center; padding: 50px 20px; color: var(--ink-3); }

/* ---------- 13. 页脚 ---------- */
.foot {
  background: var(--ink); color: var(--foot-fg); padding: 42px 0 30px; margin-top: 0;
  font-size: 14px;
}
.foot a { color: var(--foot-link); }
.foot a:hover { color: var(--white); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.foot h5 { color: var(--white); font-size: 14px; margin-bottom: 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 6px; }
.foot .brand-f { color: var(--white); font-weight: 800; font-size: 16px; display: flex; gap: 9px; align-items: center; margin-bottom: 10px; }
.foot-bottom {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--foot-line);
  font-size: 13px; color: var(--foot-dim); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ---------- 14. 返回顶部 ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-m);
  display: grid; place-items: center; color: var(--ink-2); font-size: 18px;
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: .24s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: var(--brand); border-color: var(--brand-line); }

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1000px) {
  .detail-wrap { grid-template-columns: 1fr; gap: 0; }
  .side { position: static; padding-top: 0; }
  .side-box:first-child { margin-top: 24px; }
  .side-main { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .side-main .side-box { margin-bottom: 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 30px; padding: 46px 24px 44px; }
  .hero h1 { font-size: 36px; }
  .hero-art { order: -1; justify-content: flex-start; }
  .hero-portrait { max-width: 220px; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap, .nav-inner, .hero-inner, .detail-wrap { padding-left: 16px; padding-right: 16px; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px;
    box-shadow: var(--shadow-m); gap: 2px;
  }
  .nav.open .nav-links { display: flex; animation: fadeDown .2s; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .nav-toggle { display: flex; }
  .hero h1 { font-size: 29px; }
  .hero .sub { font-size: 17px; }
  .hero-stats { gap: 18px; }
  .stat .n { font-size: 23px; }
  .sec-head h2 { font-size: 24px; }
  section { padding: 42px 0; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .term-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 29px; }
  .page-head .big-claim { font-size: 17.5px; }
  .article h2 { font-size: 21.5px; }
  .formula .eq { font-size: 22px; }
  .foot-grid { grid-template-columns: 1fr; gap: 22px; }
  .tl-item { grid-template-columns: 62px 26px 1fr; }
  .tl-year { font-size: 13.5px; padding-right: 10px; padding-top: 13px; }
  .tl-head { padding: 13px 14px; }
  .tl-head .t { font-size: 16px; }
  .tl-panel { padding: 0 14px 16px; }
  .side-main { grid-template-columns: 1fr; }
  .page-nav { grid-template-columns: 1fr; }
  .pn.next { text-align: left; }
  .lab-controls { gap: 12px; }

  /* 弹窗 → 底部抽屉 */
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal {
    width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0;
    transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.9,.3,1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal-mask.show .modal { transform: none; }
  .modal::before {
    content: ""; display: block; width: 38px; height: 4px; border-radius: 3px;
    background: var(--line-2); margin: 10px auto 0;
  }
  .modal-head { padding: 16px 20px 14px; }
  .modal-head h3 { font-size: 21px; }
  .modal-body { padding: 16px 20px 6px; }
  .modal-related, .modal-foot { padding-left: 20px; padding-right: 20px; }
}

/* ---------- 16. 无障碍 / 打印 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

@media print {
  .nav, .to-top, .modal-mask, .lab-controls, .hero-art { display: none !important; }
  body { background: var(--white); font-size: 11pt; }
  .card, .ach-card, .tl-card { break-inside: avoid; box-shadow: none; }
  .tl-panel { display: block !important; }
  a { color: var(--print-ink); }
}

/* ---------- 17. 影响世界的10个科学家 · 名单 ---------- */
.roster { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 26px; }
.roster-item {
  border: 1px solid var(--line); border-radius: 14px; background: var(--white);
  padding: 15px 15px 16px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.roster-item.done { border-color: var(--brand-line); box-shadow: var(--shadow-s); }
.roster-item.done:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.roster-idx { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); letter-spacing: .5px; }
.roster-name { font-size: 16px; font-weight: 700; line-height: 1.25; margin: 2px 0 0; }
.roster-en { font-size: 12px; color: var(--ink-3); }
.roster-years { font-family: var(--mono); font-size: 12.5px; color: var(--brand); margin-top: 2px; }
.roster-desc { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin: 6px 0 8px; }
.roster-pill {
  align-self: flex-start; font-size: 11.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 7px; margin-top: auto;
}
.pill-done { background: var(--bg-alt); color: var(--brand); }
.pill-plan { background: var(--accent-wash-2); color: var(--accent-ink-2); }
.roster-note { font-size: 14px; color: var(--ink-2); margin-top: 18px; }

/* 系列门户：科学家检索栏（仅根目录总览页使用） */
.filter-bar {
  display: flex; align-items: center; gap: 14px;
  max-width: 620px; margin: 0 auto 28px;
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 14px;
}
.filter-bar input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: inherit; font-size: 15px; color: var(--ink);
}
.filter-bar input::placeholder { color: var(--ink-3); }
.filter-bar input::-webkit-search-cancel-button { -webkit-appearance: none; }
.filter-count { font-size: 13px; font-weight: 700; color: var(--brand); white-space: nowrap; }
@media (max-width: 620px) { .filter-bar { margin-bottom: 20px; } }

@media (max-width: 980px) { .roster { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .roster { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 18. 通用补丁：bio / labs 画布上限 / 时间轴配图 ---------- */
/* 说明：这三条是历史上反复返工过的关键尺寸上限（肖像撑开、画布过高、
   时间轴图片盖住年代），原先只存在于各子站的 style.css 副本里。
   现补齐到根样式表，使根成为完整的一份「参考样式」。
   注意：各子站目前仍引用自己那份 style.css（保持自包含、可单独预览），
   因此这里的新增不会影响任何子站的现有表现。 */
.bio { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; margin-top: 8px; }
.bio-photo { width: 240px; max-width: 100%; border-radius: 14px; border: 1px solid var(--line); }
@media (max-width: 720px) { .bio { grid-template-columns: 1fr; } .bio-photo { width: 100%; } }
.lab canvas {
  width: 100%; height: auto; display: block; border-radius: 12px;
  background: var(--bg-elev); border: 1px solid var(--line); touch-action: none;  /* P0修复(2026-09-14)：删除 max-height —— 它会覆盖 setupCanvas 写入的等比行内高度、导致画布纵向压扁；详见 tools/labs-anim-review.html */
}
.tl-body figure { margin: 0 0 14px; }
.tl-body figure img {
  border-radius: 12px; border: 1px solid var(--line);
  display: block; width: auto; max-width: 100%; height: auto; max-height: 280px;
  object-fit: contain; background: var(--img-bg); margin: 0 auto;
}
.tl-body figure img[src$=".svg"] { width: 100%; max-width: 100%; }  /* 矢量图放大无损，保持满宽 */
.tl-body figcaption { font-size: 13px; color: var(--ink-3); margin-top: 7px; line-height: 1.6; text-align: center; }  /* 图片按比例居中后，图注随之居中，保持同一条中轴 */

/* ===== 动画闸门：暂停 / 单步（把动画的控制权交还使用者） ===== */
.lab-anim-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 12px 0 2px; font-size: 13px; color: var(--ink-2);
}
.lab-anim-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--bg-alt); border: 1px solid var(--line); color: var(--ink-2);
  font-family: inherit; line-height: 1.4;
  transition: background .16s, color .16s, border-color .16s;
}
.lab-anim-btn:hover { background: var(--white); color: var(--brand); border-color: var(--brand-line); }
.lab-anim-btn.on { background: var(--brand); border-color: var(--brand); color: var(--white); }
.lab-anim-tip { opacity: .75; }
.lab-anim-tools.paused .lab-anim-tip { opacity: 1; color: var(--brand); font-weight: 700; }

/* ===== P2-1：先猜一猜（POE 教学法的 Predict 环节，2026-09-14） =====
   45 个实验原本只有指令式引导语，学生不知道自己要验证什么假设。
   在每个实验的一句话说明后补一句可验证的猜想：先猜 -> 再拖 -> 后解释。 */
.lab-guess {
  font-size: 14px; line-height: 1.62; color: var(--accent-ink-deep);
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 10px 13px; margin: 0 0 14px;
}
.lab-guess b { color: var(--accent-deep); font-weight: 700; margin-right: 2px; }

/* ===== P2-2：画布就地图例（颜色语义，2026-09-14） =====
   报告指出：45 个实验内部配色各自自洽，但没有跨实验的"视觉词汇表"——
   同一个暖橙在整套里至少表示光子/光线/磁极/被淘汰个体/物体B/火星/导线 7 种东西。
   做法不改各实验配好的颜色（改色要重调 45 张图、风险高），而是在每张画布下方
   就地标出颜色含义；实验自己在画面上写明过的，就照它的说法标注。 */
.lab-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5;
}
.lab-legend .lg-head {
  font-weight: 700; color: var(--ink); letter-spacing: .02em;
  padding-right: 2px; border-right: 1px solid var(--line); margin-right: 4px;
}
.lab-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lab-legend .lg-item i {
  width: 15px; height: 11px; border-radius: 3px; flex: 0 0 auto;
  border: 1px solid var(--ink-a18);
  background: var(--swatch-gray);
}
.lab-legend .lg-item.series i { border-style: dashed; }
.lab-legend .lg-note { color: var(--ink-3); font-size: 12px; }

/* ═══ 历史肖像 · 影调统一（B 方案：去色 + 暖灰） ═════════════════════════════
   只做展示层：原件不动，把 --hist-tone 改成 none 即整体关闭；
   单张跳过可加 class="portrait-raw"。
   目标曲线 = 灰度 → #161310 → #F2EEE8 单色斜坡（对应 shots/tone 的 B 档），
   纯 CSS 链拟合误差 < 1/255，实测见 tools/check_hist_tone.js。 */
:root { --hist-tone: grayscale(1) sepia(.07) saturate(1.87) brightness(.99) contrast(.85); }
img[src*="-portrait"] { filter: var(--hist-tone); }
img[src*="-portrait"].portrait-raw { filter: none; }

/* ═══ 门户首页 · 图标桌面（v1.4） ═══════════════════════════════════════════
   深色首屏把 15 位科学家铺成一张桌面：一眼看全、一眼认人。
   ① 本节只写在根样式表 —— 子站没有这套结构（令牌仍在 16 份 :root 里保持一致）。
   ② 学科色是**数据色板**（与 labs.html 的实验图例同一性质）：按语义就地定义，
      不进全局颜色令牌，也不要当"逃逸颜色"清掉。
   ③ 光晕（图标底下的学科色发光）只用于悬停/聚焦，且**只在深底成立** ——
      这是实测结论（浅底上彩色晕会读成"淡彩污渍"）。
      --disc-a 按 WCAG 相对明度逐色归一化（alpha × L 恒定）：未归一化时
      黄/蓝强度差 3.3 倍，归一化后 1.03 倍。 */
.nav--over {
  background: transparent; border-bottom-color: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.nav--over .brand { color: var(--white); }
.nav--over .nav-links a { color: var(--foot-link); }
.nav--over .nav-links a:hover { color: var(--white); background: var(--foot-line); }
.nav--over .nav-toggle i { background: var(--foot-link); }
.nav--over.scrolled {
  background: var(--nav-bg); border-bottom-color: var(--line);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.nav--over.scrolled .brand { color: var(--ink); }
.nav--over.scrolled .nav-links a { color: var(--ink-2); }
.nav--over.scrolled .nav-links a:hover { color: var(--brand); background: var(--brand-soft); }
.nav--over.scrolled .nav-toggle i { background: var(--ink); }

.hp-hero {
  position: relative; overflow: hidden;
  margin-top: calc(-1 * var(--nav-h)); padding-top: var(--nav-h);
  background: var(--hero-bg);
  background-image: radial-gradient(130% 82% at 50% -12%, var(--hero-bg-2) 0%, var(--hero-bg) 64%);
  border-bottom: 1px solid var(--foot-line);
  scroll-margin-top: 0;   /* 深色底面自己顶到导航底下，不需要锚点补偿 */
}
.hp-hero::before {
  content: ""; position: absolute; left: 50%; top: -300px;
  width: 1000px; height: 640px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, var(--brand-a13), transparent 72%);
}
.hp-inner {
  position: relative; z-index: 1; max-width: var(--max-w); margin: 0 auto;
  padding: 52px 24px 44px; text-align: center;
}
.hp-kicker {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: 1.4px;
  color: var(--brand-light); background: var(--hero-bg-2);
  border: 1px solid var(--foot-line); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hp-hero h1 { font-size: 58px; letter-spacing: -.035em; color: var(--white); }
.hp-hero .hp-sub { font-size: 19px; font-weight: 600; color: var(--foot-link); margin: 10px 0 0; }
.hp-hero .hp-lead { font-size: 15.5px; color: var(--foot-fg); max-width: 62ch; margin: 14px auto 0; line-height: 1.9; }

.hp-search { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 26px auto 0; }
.hp-search input {
  flex: 1; min-width: 0; font-family: inherit; font-size: 14.5px;
  background: var(--hero-bg-2); border: 1px solid var(--foot-line);
  color: var(--white); padding: 11px 14px; border-radius: 11px;
}
.hp-search input::placeholder { color: var(--foot-dim); }
.hp-search input:focus { outline: none; border-color: var(--brand-light); box-shadow: 0 0 0 3px var(--brand-a26); }
.hp-search .hp-count { font-family: var(--mono); font-size: 13px; color: var(--foot-dim); white-space: nowrap; }

.hp-grid {
  display: grid; grid-template-columns: repeat(5, 132px);
  gap: 36px 44px; justify-content: center; margin: 38px auto 0;
}
.hp-item {
  position: relative; display: flex; flex-direction: column; align-items: center;
  color: inherit; text-decoration: none; transition: opacity .2s;
}
.hp-item:hover, .hp-item:focus-visible { text-decoration: none; }
.hp-item::before {
  content: ""; position: absolute; left: 50%; top: 66px; width: 196px; height: 196px; z-index: 0;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, var(--disc, var(--brand)), transparent 100%);
  filter: blur(8px); opacity: 0; transition: opacity .22s; pointer-events: none;
}
.hp-item:hover::before, .hp-item:focus-visible::before { opacity: var(--disc-a, .3); }
.hp-tile {
  position: relative; z-index: 1; display: block;
  width: 132px; height: 132px; border-radius: 30px; overflow: hidden;
  background: var(--hero-bg-2); box-shadow: var(--shadow-hero);
}
/* 用 contain 不用 cover：源图与瓦片同为正方形时二者视觉等价；
   将来若换非正方形源图，contain 会留白（安全失败），cover 会静默裁脸。
   全站校验也把 cover 型裁切当错误拦（tools/validate_site.py），别改回去。 */
.hp-tile img { width: 100%; height: 100%; object-fit: contain; }
.hp-item .hp-name { position: relative; z-index: 1; margin-top: 13px; font-size: 15px; font-weight: 700; color: var(--white); }
.hp-item .hp-strip { position: relative; z-index: 1; width: 24px; height: 4px; border-radius: 2px; background: var(--disc, var(--brand)); margin: 6px 0 5px; }
.hp-item .hp-years { position: relative; z-index: 1; font-family: var(--mono); font-size: 12px; color: var(--foot-dim); }
.hp-item.dim { opacity: .16; pointer-events: none; }
/* 一句话简介：视觉隐藏但留在 DOM 里 —— ① 进链接的无障碍名 ② 供首屏读数读取 ③ 保留可被索引的文本 */
.hp-desc {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* 学科色 · 数据色板（深色首屏专用；与 --brand / --accent 同值的两色已标注） */
.d-astro  { --disc: #3B5BDB; --disc-a: .65; }   /* 天文学   L=.135 ＝ --brand */
.d-phys   { --disc: #12B886; --disc-a: .24; }   /* 经典物理 L=.361 */
.d-life   { --disc: #37B24D; --disc-a: .27; }   /* 生命科学 L=.332 */
.d-chem   { --disc: #F59F00; --disc-a: .20; }   /* 化学     L=.442 ＝ --accent */
.d-modern { --disc: #7950F2; --disc-a: .54; }   /* 现代物理 L=.162 */
.d-comp   { --disc: #1098AD; --disc-a: .34; }   /* 计算     L=.256 */

.hp-readout { min-height: 26px; margin-top: 30px; font-size: 14px; color: var(--foot-fg); }
.hp-readout b { color: var(--white); font-weight: 700; }
.hp-readout .hi { color: var(--foot-dim); }

.hp-dock {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 14px 22px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--foot-line);
}
.hp-dock .k { font-size: 13px; color: var(--foot-dim); }
.hp-dock .k b { font-family: var(--mono); font-size: 15px; color: var(--white); }
.hp-dock .acts { display: flex; gap: 12px; flex-wrap: wrap; }
.hp-dock .btn.ghost { background: transparent; color: var(--white); border-color: var(--foot-line); }
.hp-dock .btn.ghost:hover { background: var(--hero-bg-2); color: var(--white); }
.hp-note { color: var(--ink-3); font-size: 14px; margin-top: 18px; }

@media (max-width: 1000px) {
  .hp-hero h1 { font-size: 46px; }
  .hp-grid { grid-template-columns: repeat(5, 112px); gap: 30px 28px; }
  .hp-tile { width: 112px; height: 112px; border-radius: 26px; }
  .hp-item::before { top: 56px; width: 168px; height: 168px; }
}
@media (max-width: 760px) {
  .hp-inner { padding: 38px 16px 34px; }
  .hp-hero h1 { font-size: 34px; }
  .hp-hero .hp-sub { font-size: 16px; }
  .hp-hero .hp-lead { font-size: 14.5px; }
  .hp-grid { grid-template-columns: repeat(3, 92px); gap: 26px 20px; margin-top: 30px; }
  .hp-tile { width: 92px; height: 92px; border-radius: 22px; }
  .hp-item .hp-name { font-size: 13px; margin-top: 10px; }
  .hp-item .hp-years { font-size: 11px; }
  .hp-item::before { top: 46px; width: 140px; height: 140px; }
  .hp-search { margin-top: 22px; }
  .hp-readout { font-size: 13px; }
}
@media (max-width: 400px) {
  .hp-grid { grid-template-columns: repeat(3, 84px); gap: 24px 14px; }
  .hp-tile { width: 84px; height: 84px; border-radius: 20px; }
}
@media print {
  .hp-hero { background: var(--white) !important; background-image: none !important; }
  .hp-hero h1, .hp-item .hp-name { color: var(--ink); }
  .hp-hero .hp-sub, .hp-hero .hp-lead { color: var(--ink-2); }
  .hp-item .hp-years { color: var(--ink-3); }
  .hp-tile { box-shadow: none; border: 1px solid var(--line); }
  .hp-search, .hp-readout, .hp-dock .acts { display: none; }
}
