@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #22262e; --text: #3a404c; --muted: #737a88; --line: #e3e7ee;
  --blue: #1048d2; --bg: #ffffff; --panel: #f6f8fb;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Inter Display", "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
       font-size: 17px; line-height: 1.85; -webkit-font-smoothing: antialiased; }
.post { max-width: 740px; margin: 0 auto; padding: 72px 24px 120px; }

.post-header { text-align: center; padding-bottom: 36px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.post-header h1 { font-family: var(--display); font-weight: 700; color: var(--ink);
                  font-size: 38px; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 22px; }
.authors { margin: 0 0 6px; font-size: 17px; font-weight: 500; color: var(--ink); }
.affils { margin: 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
sup { font-size: 0.7em; line-height: 0; position: relative; top: -0.15em; margin-left: 1px; }

h2 { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 26px; line-height: 1.4;
     margin: 64px 0 16px; letter-spacing: -0.005em; }
h3 { font-weight: 600; color: var(--ink); font-size: 19px; margin: 40px 0 10px; }
p { margin: 0 0 18px; }
strong { color: var(--ink); font-weight: 600; }
ul { padding-left: 1.3em; margin: 0 0 18px; }
li { margin: 6px 0; }
a { color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(16, 72, 210, .3); }

.fig { margin: 36px 0 40px; }
.fig picture { display: block; }
.fig video { display: block; width: 100%; height: auto; border-radius: 10px; background: #e9ebee; }
.fig img { display: block; width: 100%; height: auto; border-radius: 10px; }
.fig.wide { margin-left: calc(50% - min(46vw, 440px)); margin-right: calc(50% - min(46vw, 440px)); }
figcaption { margin-top: 12px; font-size: 14px; line-height: 1.7; color: var(--muted); }
figcaption b { color: var(--ink); font-weight: 600; }

.table-caption { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 28px 0 8px; }
.table-caption strong { color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 0 0 28px; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; font-variant-numeric: tabular-nums; }
thead th { font-weight: 600; color: var(--ink); border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line); }
th, td { padding: 9px 12px; }
tbody tr:last-child td { border-bottom: 1.5px solid var(--ink); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .post { padding: 44px 18px 80px; }
  .post-header h1 { font-size: 28px; }
  h2 { font-size: 22px; margin-top: 48px; }
  .fig.wide { margin-left: 0; margin-right: 0; }
}

/* English page: Latin text reads better a little tighter than CJK. */
html[lang="en"] body { line-height: 1.7; }
html[lang="en"] figcaption, html[lang="en"] .table-caption { line-height: 1.6; }

/* Language switch, citation and footer. */
.post { position: relative; }
.lang-switch { position: absolute; top: 28px; right: 24px; font-size: 14px; font-weight: 500; }
.lang-switch a { color: var(--muted); border-bottom: 1px solid var(--line); }
.lang-switch a:hover { color: var(--ink); }
.cite { margin-top: 72px; padding-top: 8px; border-top: 1px solid var(--line); }
.cite h2 { margin-top: 32px; font-size: 22px; }
.cite pre { background: var(--panel); border-radius: 8px; padding: 16px 18px; overflow-x: auto; margin: 0; }
.cite code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; color: var(--ink); }
.post-footer { margin-top: 40px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .lang-switch { top: 16px; right: 18px; } }
