/* ============================================================
   NumberGlossary — 科普 / 百科风(明亮、温暖、易读)
   与 NumberResearch(深色数据终端)刻意区分:
   暖纸背景 · Fraunces 衬线标题 · 清新绿松 accent · 大字距、宽留白
   ============================================================ */

:root {
  --paper:      #fbf9f4;
  --surface:    #ffffff;
  --surface-2:  #f4f0e8;
  --panel:      #ffffff;
  --panel-2:    #f4f0e8;
  --ink:        #201d18;
  --text:       #201d18;
  --ink-2:      #55504a;
  --text-2:     #55504a;
  --ink-3:      #8b857c;
  --text-3:     #8b857c;
  --text-4:     #a8a29a;
  --line:       #e7e1d6;
  --border:     #e7e1d6;
  --accent:     #0e7c68;
  --accent-2:   #0b6959;
  --accent-soft:#e4f1ee;
  --amber:      #b4690e;
  --green:      #0e7c68;
  --orange:     #bd5b1c;
  --red:        #b3341f;
  --max: 1120px;
  --inter: 'Inter', system-ui, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--inter);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.mono { font-family: var(--mono); }

body::before {
  content: ''; position: fixed; inset: 0 0 auto 0; height: 320px; z-index: -1;
  background: linear-gradient(180deg, #f2ecdf 0%, var(--paper) 100%);
  pointer-events: none;
}

/* ---------------- header ---------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,249,244,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(calc(100% - 3rem), var(--max)); margin-inline: auto; min-height: 64px; padding: 8px 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--inter); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { font-size: 15px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.main-nav a:hover { color: var(--accent); text-decoration: none; }
.main-nav a.active { color: var(--accent); font-weight: 600; }
.header-meta { font-size: 13px; color: var(--ink-3); }
.header-meta b { color: var(--ink-2); font-weight: 600; }

/* ---------------- layout ---------------- */
.wrap { width: min(calc(100% - 3rem), var(--max)); margin: 0 auto; padding: 40px 0 72px; }
.crumbs { font-size: 14px; color: var(--ink-3); }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--accent); }

.page-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 4.5vw, 46px); line-height: 1.12; letter-spacing: -0.02em; margin: 6px 0 6px; color: var(--ink); }
.stat-line { color: var(--ink-2); font-size: 16px; margin: 0; }
.prose { font-size: 17.5px; line-height: 1.75; color: var(--ink); }
.prose p { margin: 0 0 14px; }
.prose h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; margin: 30px 0 10px; color: var(--ink); }
.prose a { border-bottom: 1px solid var(--accent-soft); }
.prose a:hover { border-bottom-color: var(--accent); text-decoration: none; }
.prose ul { padding-left: 22px; } .prose li { margin: 6px 0; }
.lede { font-family: var(--serif); font-weight: 400; }
.note { font-size: 15px; color: var(--ink-2); line-height: 1.65; }
.micro { font-size: 12.5px; }
.sub-label { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-3); }

/* ---------------- cards / panels (dictionary-entry feel) ---------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(60,50,30,0.03); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.panel-body { color: var(--ink); }
a.panel { transition: all .15s ease; }
a.panel:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(14,124,104,0.10); text-decoration: none; transform: translateY(-1px); }

.library-grid a.panel h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); }
.library-grid a.panel:hover h3 { color: var(--accent); }
h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
.npa-body h2, .npa-body h1 { font-family: var(--serif); }

.callout { border-radius: 12px; line-height: 1.6; }
.callout .prose { font-size: 15.5px; }

.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 9px; padding: 9px 18px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--accent-2); text-decoration: none; color: #fff; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }

input, select { font-family: var(--inter); }
input::placeholder { color: var(--ink-3); }

.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); }
.footer-grid { width: min(calc(100% - 3rem), var(--max)); margin: 0 auto; padding: 36px 0 8px; }
.footer-brand .brand { font-size: 19px; }
.footer-legal { width: min(calc(100% - 3rem), var(--max)); margin: 0 auto; padding: 12px 0 32px; color: var(--ink-3); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 8px 10px; border-bottom: 2px solid var(--line); }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ev-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--ink-3); }
.ev-row b { color: var(--ink-2); font-weight: 600; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 26px 0 48px; }
  .npa-body { grid-template-columns: 1fr !important; }
  .header-inner { min-height: auto; }
}
