/* 由 packages/design-tokens/build.mjs 根据 tokens.json 生成，请勿手改。 */
:root {
  --bg: #eef3fa;
  --bg-2: #f5f8fd;
  --panel: #ffffff;
  --panel-2: #f6f9fe;
  --panel-3: #e6edf7;
  --line: #d3dfee;
  --line-strong: #b3c4da;
  --ink: #0b1626;
  --ink-2: #26374d;
  --muted: #546a87;
  --dim: #5c6c82;
  --blue: #1f5fe0;
  --blue-strong: #1748b0;
  --cyan: #0b8fb8;
  --green: #0a7f57;
  --green-strong: #086b49;
  --amber: #8f5c0e;
  --orange: #a84718;
  --red: #b93636;
  --violet: #5b4bd1;
  --on-accent: #ffffff;
  
  --font-sans: "IBM Plex Sans", "IBM Plex Sans SC", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

:root[data-theme="dark"],
:root.dark {
  --bg: #060b14;
  --bg-2: #08101c;
  --panel: #0b1422;
  --panel-2: #0f1c2e;
  --panel-3: #14243b;
  --line: #1d3350;
  --line-strong: #2d4a70;
  --ink: #eaf2ff;
  --ink-2: #c2d3ea;
  --muted: #8aa2c2;
  --dim: #7f95b3;
  --blue: #6ea8ff;
  --blue-strong: #3f7cff;
  --cyan: #35d0ff;
  --green: #4ade80;
  --green-strong: #22c55e;
  --amber: #f2b544;
  --orange: #ff8a4c;
  --red: #ff6b6b;
  --violet: #8b7bff;
  --on-accent: #060b14;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
  --bg: #060b14;
  --bg-2: #08101c;
  --panel: #0b1422;
  --panel-2: #0f1c2e;
  --panel-3: #14243b;
  --line: #1d3350;
  --line-strong: #2d4a70;
  --ink: #eaf2ff;
  --ink-2: #c2d3ea;
  --muted: #8aa2c2;
  --dim: #7f95b3;
  --blue: #6ea8ff;
  --blue-strong: #3f7cff;
  --cyan: #35d0ff;
  --green: #4ade80;
  --green-strong: #22c55e;
  --amber: #f2b544;
  --orange: #ff8a4c;
  --red: #ff6b6b;
  --violet: #8b7bff;
  --on-accent: #060b14;
  color-scheme: dark;
  }
}
/* web 端字号、间距、圆角、阴影、动效刻度（主站与 AI 资讯站共用；小程序用 rpx，不适用）。 */
:root {
  color-scheme: light;

  --scrim: rgb(6 11 20 / 0.6);

  --font-serif: "IBM Plex Serif", Georgia, serif;

  --fs-display: 44px;
  --fs-h1: 30px;
  --fs-h2: 22px;
  --fs-h3: 18px;
  --fs-body-lg: 15px;
  --fs-body: 14px;
  --fs-body-sm: 13px;
  --fs-caption: 12px;
  --fs-micro: 10px;
  --fs-micro-xs: 9px;
  --lh-heading: 1.15;
  --lh-body: 1.5;
  --lh-longform: 1.65;
  --lh-mono: 1.4;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --sp-0-5: 2px;
  --sp-1: 4px;
  --sp-1-5: 6px;
  --sp-2: 8px;
  --sp-2-5: 10px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  --r-badge: 3px;
  --r-control: 5px;
  --r-panel: 8px;

  --shadow-raw-panel: 0 1px 2px rgb(11 22 38 / 0.08);
  --shadow-raw-overlay: 0 8px 24px rgb(11 22 38 / 0.16);

  --motion-hover: 120ms;
  --motion-panel: 160ms;
  --motion-inspector: 180ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
}

:root[data-theme="dark"],
:root.dark {
  color-scheme: dark;

  --scrim: rgb(0 0 0 / 0.65);

  --shadow-raw-panel: 0 1px 2px rgb(0 0 0 / 0.32);
  --shadow-raw-overlay: 0 8px 24px rgb(0 0 0 / 0.48);
}

@media (max-width: 899px) {
  :root {
    --fs-display: 32px;
    --fs-h1: 25px;
    --fs-h2: 20px;
    --fs-h3: 17px;
  }
}

/* Self-hosted IBM Plex（文件在 public/fonts，使用方须以 /fonts/ 提供）：latin 静态字重，SC 中文子集（不声明 unicode-range，缺失字形按字体栈回退），font-display: swap。 */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/sans-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/sans-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/sans-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/mono-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/serif-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/serif-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/serif-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-sc-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-sc-500.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-sc-600.woff2") format("woff2");
}

/* 与主站公开页同一套外壳；数值对应 apps/web 的 Tailwind 类 */
*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--line); }
html { -webkit-text-size-adjust: 100%; min-height: 100%; }
body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
h1, h2, h3 { line-height: var(--lh-heading); font-size: inherit; font-weight: inherit; }
ol, ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; padding: 0; cursor: pointer; }
svg { display: block; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--blue-strong); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--blue) 26%, transparent); }
.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; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.shell { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); color: var(--ink); }
.shell > main { flex: 1; min-width: 0; }
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: 14px; padding-right: 14px; }
@media (min-width: 768px) { .container { padding-left: 28px; padding-right: 28px; } }

/* 顶栏 = PublicHeader */
.topbar { position: sticky; top: 0; z-index: 20; border-bottom-width: 1px; background: var(--bg-2); }
.topbar .container { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 4px; flex-shrink: 0; }
.brand span { font-size: 14px; line-height: 1.25; font-weight: var(--weight-semibold); }
.topnav { order: 3; display: flex; width: 100%; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 14px; line-height: 20px; }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current] { color: var(--blue); font-weight: var(--weight-medium); }
.actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.actions .desk { display: none; align-items: center; gap: 8px; }
.btn-primary, .btn-outline {
  display: inline-flex; align-items: center; height: 44px; padding: 0 12px; border-radius: var(--r-control);
  font-size: 12px; line-height: 16px; white-space: nowrap;
}
.btn-primary { background: var(--blue-strong); color: var(--on-accent); font-weight: var(--weight-medium); }
.btn-outline { border-width: 1px; border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--blue); }
/* 登录态由首帧脚本给 html 加 authed 切换；两套链接都渲染，避免改写 data-main 交接 */
.only-authed { display: none; }
html.authed .only-guest { display: none; }
html.authed .only-authed { display: inline-flex; }
.avatar {
  align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px;
  border-width: 1px; border-color: var(--line-strong); color: var(--ink);
}
.avatar:hover { border-color: var(--blue); }
.menu { display: block; }
.menu > summary {
  display: grid; place-items: center; width: 44px; height: 44px; border-width: 1px; border-radius: var(--r-control); color: var(--ink);
}
@media (min-width: 700px) {
  .topnav { order: 0; width: auto; }
  .topnav a { min-height: 0; }
  .actions .desk { display: flex; }
  .btn-primary, .btn-outline { height: 32px; }
  .avatar { width: 36px; height: 36px; }
  .menu { display: none; }
}

/* details 弹层 = Radix Select / Popover；顶栏在右侧，统一与触发器右缘对齐，避免溢出窗口 */
.pop { position: relative; }
.pop > summary { list-style: none; cursor: pointer; user-select: none; }
.pop > summary::-webkit-details-marker { display: none; }
.select > summary {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 44px; padding: 0 10px; border-width: 1px; border-radius: var(--r-control);
  background: var(--panel-3); color: var(--ink); font-size: var(--fs-caption); line-height: var(--lh-body); white-space: nowrap;
}
.select > summary:hover { border-color: var(--line-strong); }
.select > summary:focus-visible { border-color: var(--blue-strong); }
.select > summary svg { width: 16px; height: 16px; color: var(--muted); }
@media (min-width: 700px) { .select > summary { height: 32px; } }
/* 弹层宽度跟随触发器，与点击打开它的项等宽 */
.pop-body {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 50;
  width: max-content; min-width: 100%;
  border-width: 1px; border-radius: var(--r-control); background: var(--panel); color: var(--ink);
  box-shadow: var(--shadow-raw-overlay); padding: 4px;
}
.menu > .pop-body {
  top: calc(100% + 8px); width: 224px; border-radius: var(--r-panel); padding: 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.opt {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px;
  width: 100%; min-height: 44px; padding: 6px 10px;
  border-radius: var(--r-badge); font-size: 14px; line-height: 20px;
  color: var(--ink); white-space: nowrap; text-align: left; outline: none;
}
.opt:hover, .opt:focus-visible { background: var(--panel-2); }
.opt .check { display: inline-flex; flex-shrink: 0; width: 12px; height: 12px; visibility: hidden; }
.opt .check svg { width: 12px; height: 12px; display: block; }
.opt[aria-current], .opt.on { color: var(--blue); }
.opt[aria-current] .check, .opt.on .check { visibility: visible; }
@media (min-width: 700px) { .opt { min-height: 0; } }
html[data-theme-mode="auto"] .opt[data-theme-mode="auto"],
html[data-theme-mode="light"] .opt[data-theme-mode="light"],
html[data-theme-mode="dark"] .opt[data-theme-mode="dark"] { color: var(--blue); }
html[data-theme-mode="auto"] .opt[data-theme-mode="auto"] .check,
html[data-theme-mode="light"] .opt[data-theme-mode="light"] .check,
html[data-theme-mode="dark"] .opt[data-theme-mode="dark"] .check { visibility: visible; }
.tm { display: none; }
html[data-theme-mode="auto"] .tm-auto, html[data-theme-mode="light"] .tm-light, html[data-theme-mode="dark"] .tm-dark { display: inline; }
html:not([data-theme-mode]) .theme { display: none; }

/* 页脚 = Footer */
.footer { border-top-width: 1px; background: var(--bg-2); }
.footer .container {
  display: flex; flex-direction: column; gap: 8px; padding-top: 24px; padding-bottom: 24px;
  font-size: 12px; line-height: 16px; color: var(--muted);
}
.footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.footer nav a:hover { color: var(--ink); }
@media (min-width: 768px) { .footer .container { flex-direction: row; align-items: center; justify-content: space-between; } }

/* 页面主体 = LeaderboardView / PageHeader */
.page { padding-top: 24px; padding-bottom: 24px; }
@media (min-width: 768px) { .page { padding-top: 32px; padding-bottom: 32px; } }
.page-head { border-bottom-width: 1px; padding-bottom: 16px; }
.page-head h1 { font-size: var(--fs-h1); line-height: var(--lh-heading); font-weight: var(--weight-semibold); letter-spacing: -.025em; color: var(--ink); overflow-wrap: anywhere; }
.page-head .sub { margin-top: 6px; max-width: 42rem; font-size: var(--fs-body-sm); color: var(--muted); }
.page-head .meta { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.page-head .meta .dates { margin-top: 0; }
.note {
  margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  border-width: 1px; border-radius: var(--r-panel); background: var(--panel); padding: 8px 12px;
  font-size: var(--fs-caption); color: var(--muted);
}
.layout { margin-top: 16px; display: grid; gap: 16px; align-items: start; }
@media (min-width: 1180px) { .layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.panel { border-width: 1px; border-radius: var(--r-panel); background: var(--panel); }
.aside { display: grid; gap: 16px; }
@media (min-width: 1180px) { .aside { position: sticky; top: 74px; } }
.card { padding: 16px; }
.card h2 { font-size: var(--fs-body); font-weight: var(--weight-semibold); color: var(--ink); }
.card p { margin-top: 8px; font-size: var(--fs-body-sm); color: var(--muted); }
.card .link { margin-top: 12px; }
.link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--fs-body-sm); font-weight: var(--weight-medium); color: var(--blue); }
.link:hover { color: var(--blue-strong); text-decoration: underline; text-underline-offset: 3px; }
.link svg { width: 16px; height: 16px; }
@media (min-width: 700px) { .link { min-height: 0; } }
.badge {
  display: inline-flex; align-items: center; gap: 4px; border-width: 1px; border-radius: var(--r-badge);
  padding: 2px 6px; font-size: var(--fs-micro); line-height: 16px; font-weight: var(--weight-medium); white-space: nowrap;
  border-color: color-mix(in srgb, var(--blue) 30%, transparent); background: color-mix(in srgb, var(--blue) 10%, transparent); color: var(--blue);
}
.dates { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--fs-caption); color: var(--dim); }
.topics { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.topic-tag {
  display: inline-flex; align-items: center; border-width: 1px; border-radius: var(--r-badge);
  padding: 1px 8px; font-size: var(--fs-micro); line-height: 18px; font-weight: var(--weight-medium); white-space: nowrap;
  color: var(--blue); border-color: color-mix(in srgb, var(--blue) 30%, transparent);
  background: color-mix(in srgb, var(--blue) 8%, transparent);
}
.stories .topics { margin-top: 4px; margin-bottom: 2px; }
dl.facts { margin-top: 12px; display: grid; gap: 8px; font-size: var(--fs-caption); }
dl.facts div { display: flex; justify-content: space-between; gap: 12px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { color: var(--ink-2); }

/* 资讯列表 */
.day-group + .day-group { margin-top: 24px; }
.day-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
  font-size: var(--fs-caption); font-weight: var(--weight-medium); color: var(--muted);
}
.day-head::after { content: ""; flex: 1; border-top-width: 1px; border-color: var(--line); }
.stories > li { border-top-width: 1px; }
.stories > li:first-child { border-top-width: 0; }
.stories article { display: grid; gap: 4px; padding: 16px; }
.stories h2, .stories h3 { font-size: var(--fs-body-lg); line-height: 1.45; font-weight: var(--weight-semibold); color: var(--ink); overflow-wrap: anywhere; }
.stories h2 a, .stories h3 a { transition: color var(--motion-hover) var(--ease-standard); }
.stories h2 a:hover, .stories h3 a:hover { color: var(--blue); }
.stories .summary {
  margin-top: 6px; font-size: var(--fs-body-sm); color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.stories .dates { margin-top: 8px; }
.empty { padding: 32px 16px; text-align: center; font-size: var(--fs-body-sm); color: var(--muted); }

/* 分页 = Pagination */
.pager { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; border-top-width: 1px; padding-top: 12px; }
@media (min-width: 640px) { .pager { flex-direction: row; align-items: center; justify-content: space-between; } }
.pager .range { font-size: var(--fs-caption); color: var(--muted); }
.pager .pages { display: flex; align-items: center; gap: 4px; }
.pg {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; min-width: 44px; padding: 0 8px;
  border-width: 1px; border-color: transparent; border-radius: var(--r-control);
  font-family: var(--font-mono); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; color: var(--ink-2);
}
a.pg:hover { background: var(--panel-2); }
.pg[aria-current] { border-color: var(--blue-strong); background: var(--blue-strong); color: var(--on-accent); }
.pg.nav { width: 44px; padding: 0; border-color: var(--line-strong); background: var(--panel); color: var(--ink); }
a.pg.nav:hover { background: var(--panel-2); }
.pg.nav.off { border-color: var(--line); background: var(--panel-2); color: var(--dim); cursor: not-allowed; }
.pg svg { width: 16px; height: 16px; }
.pg.gap { min-width: 0; padding: 0 4px; color: var(--dim); }
@media (min-width: 700px) { .pg { height: 32px; min-width: 32px; } .pg.nav { width: 32px; } }

/* 详情 */
.crumbs { display: flex; min-width: 0; align-items: center; gap: 6px; margin-bottom: 12px; font-size: var(--fs-caption); color: var(--muted); }
.crumbs li { display: flex; min-width: 0; align-items: center; gap: 6px; }
.crumbs li:first-child { flex-shrink: 0; }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { width: 12px; height: 12px; color: var(--dim); }
.crumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.container.narrow { max-width: 900px; }
.article { margin-top: 24px; }
.article-foot { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; border-top-width: 1px; padding-top: 16px; }
.lede {
  max-width: 68ch; margin-bottom: 20px; padding-left: 12px; border-left: 2px solid var(--line-strong);
  font-size: var(--fs-body-lg); line-height: var(--lh-longform); color: var(--ink-2);
}
.body { max-width: 68ch; font-size: var(--fs-body-lg); line-height: 1.75; color: var(--ink-2); overflow-wrap: anywhere; }
.body p + p { margin-top: 1em; }
html[lang="zh-CN"] .body p { text-align: justify; }
html[lang="en"] .body p { hyphens: auto; }

/* Markdown 正文与作者批注 */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 1em 0; }
.md h2 { margin: 1.6em 0 .6em; font-size: 1.25em; font-weight: var(--weight-semibold); line-height: var(--lh-heading); color: var(--ink); }
.md h3 { margin: 1.4em 0 .5em; font-size: 1.1em; font-weight: var(--weight-semibold); line-height: var(--lh-heading); color: var(--ink); }
.md ul, .md ol { margin: 1em 0; padding-left: 1.4em; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li { margin: .35em 0; }
.md strong { font-weight: var(--weight-semibold); color: var(--ink); }
.md a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.md blockquote { margin: 1em 0; padding: .2em 0 .2em 1em; border-left: 3px solid var(--line-strong); color: var(--muted); }
.md code { padding: .1em .35em; border-radius: 4px; background: var(--panel-2); font-family: var(--font-mono); font-size: .9em; }
.md pre { margin: 1em 0; padding: 12px; overflow-x: auto; border-radius: var(--r-control); background: var(--panel-2); }
.md pre code { padding: 0; background: none; }
.md table { width: 100%; margin: 1em 0; border-collapse: collapse; font-size: .95em; }
.md th, .md td { padding: 6px 10px; border-width: 1px; border-color: var(--line); text-align: left; }
.md th { background: var(--panel-2); color: var(--ink); }
.md hr { margin: 1.6em 0; border-top-width: 1px; border-color: var(--line); }
.annotations { margin-top: 32px; padding: 16px; border-width: 1px; border-radius: var(--r-panel); background: var(--panel); }
.annotations h2 { font-size: var(--fs-body); font-weight: var(--weight-semibold); color: var(--ink); }
.annotations .md { margin-top: 8px; font-size: var(--fs-body-sm); line-height: 1.7; color: var(--muted); }

/* 公开站检索：搜索与话题合并成右侧栏一张卡，默认展开 */
.search-form { margin-top: 0; padding: 12px; }
.search-main { display: flex; align-items: stretch; gap: 8px; }
.search-input {
  flex: 1; min-width: 0; height: 36px; padding: 0 14px; line-height: 1.2;
  border-width: 1px; border-color: var(--line-strong); border-radius: var(--r-control);
  background: var(--panel-3); color: var(--ink); font: inherit; font-size: var(--fs-body-sm);
  outline: none;
}
.search-input:focus { border-color: var(--blue-strong); }
.search-input::placeholder { color: var(--dim); }
.search-form .btn-primary { flex-shrink: 0; height: 36px; padding: 0 18px; }
.search-form .topic-block { margin-top: 12px; }
.search-form .topic-block h2 { margin: 0 0 8px; font-size: var(--fs-body-sm); font-weight: var(--weight-semibold); color: var(--ink); }
.search-drawer { padding: 0; }
.search-drawer > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px; list-style: none; cursor: pointer; user-select: none;
  font-size: var(--fs-body-sm); font-weight: var(--weight-semibold); color: var(--ink);
}
.search-drawer > summary::-webkit-details-marker { display: none; }
.search-drawer > summary svg { width: 16px; height: 16px; color: var(--muted); transition: transform var(--motion-hover) var(--ease-standard); }
.search-drawer[open] > summary { border-bottom-width: 1px; }
.search-drawer[open] > summary svg { transform: rotate(180deg); }
.aside .search-filters { grid-template-columns: 1fr; }

.search-form .filters { margin-top: 8px; }
.search-form .filters > summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; list-style: none;
  font-size: var(--fs-caption); font-weight: var(--weight-medium); color: var(--ink-2);
  cursor: pointer; user-select: none;
}
.search-form .filters > summary::-webkit-details-marker { display: none; }
.search-form .filters > summary:hover { color: var(--ink); }
.search-form .filters > summary svg {
  width: 16px; height: 16px; color: var(--muted);
  transition: transform var(--motion-hover) var(--ease-standard);
}
.search-form .filters[open] > summary svg { transform: rotate(180deg); }
.search-filters {
  margin-top: 4px; display: grid; gap: 10px 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: var(--fs-caption); color: var(--muted); }
.field > span { line-height: 18px; }
.field input[type="date"],
.field input[type="number"] {
  height: 36px; padding: 0 8px; min-width: 0;
  border-width: 1px; border-color: var(--line-strong); border-radius: var(--r-control);
  background: var(--panel-3); color: var(--ink); font: inherit; font-size: var(--fs-caption);
}
/* 字段内改用 details.pop 下拉，保持与顶栏一致；弹层贴着字段左缘铺满宽度 */
.field .select { display: block; }
.field .select > summary { width: 100%; height: 36px; padding: 0 8px; font-size: var(--fs-caption); }
.field input:focus { border-color: var(--blue-strong); outline: none; }
.field.check { flex-direction: row; align-items: center; gap: 8px; align-self: end; min-height: 36px; }
.field.check input { width: 16px; height: 16px; accent-color: var(--blue-strong); }
.field.check span { color: var(--ink-2); }
.search-actions { margin-top: 8px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.search-form .search-actions .link { margin-top: 0; }
.topic-filter { padding: 16px; }
.topic-filter h2 { font-size: var(--fs-body); font-weight: var(--weight-semibold); color: var(--ink); }
.topic-checks { margin-top: 10px; display: grid; gap: 8px; }
.topic-check { display: flex; align-items: center; gap: 8px; font-size: var(--fs-body-sm); color: var(--ink-2); cursor: pointer; }
.topic-check input { width: 16px; height: 16px; accent-color: var(--blue-strong); }
.topic-mode { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-caption); color: var(--muted); }
.topic-mode .select > summary { height: 32px; padding: 0 6px; font-size: var(--fs-caption); }
.topic-filter .search-actions { justify-content: flex-start; gap: 12px; }
.topic-filter .link { margin-top: 0; }
.search-status { margin-top: 16px; font-size: var(--fs-caption); color: var(--muted); }
.note.search-indexing { margin-top: 8px; }
.search-empty .hint { margin-top: 6px; font-size: var(--fs-caption); color: var(--dim); }
.search-results { margin-top: 10px; }
.search-results .result-meta { margin-top: 8px; align-items: center; }
.search-results .tag {
  border-width: 1px; border-radius: var(--r-badge); padding: 1px 6px;
  font-size: var(--fs-micro); line-height: 16px; color: var(--muted); border-color: var(--line);
}
.search-results .tag.warn {
  color: var(--amber, #b45309); border-color: color-mix(in srgb, var(--amber, #b45309) 35%, transparent);
  background: color-mix(in srgb, var(--amber, #b45309) 10%, transparent);
}
.search-results .summary mark, .search-results mark {
  padding: 0 2px; border-radius: 3px; color: inherit;
  background: color-mix(in srgb, var(--blue) 20%, transparent);
}
.search-tip ul { margin-top: 8px; display: grid; gap: 6px; font-size: var(--fs-body-sm); color: var(--muted); }
.search-tip li { position: relative; padding-left: 14px; line-height: 1.5; }
.search-tip li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 4px; height: 4px; border-radius: 999px; background: var(--blue); }
.search-tip .link { margin-top: 12px; }
