/* Layout: one centered 960px reading column (academic project-page style), white ground.
   Single light theme by design: the figures are static light-surface images. */
:root {
  --bg: #ffffff;
  --fg: #2e3238;
  --fg-soft: #4a4f57;
  --muted: #737a84;
  --rule: #e6e8ec;
  --box: #f7f8fa;
  --link: #2d6cdf;
  --accent: #1b63c9;
  --accent-soft: #eaf1fc;
  --btn: #2e3238;
  --btn-fg: #ffffff;
  --warn-bg: #fff7e6;
  --warn-border: #e9a823;
  --ok: #1a8f5a;
  --bad: #c23b3b;
  --font-body: 'Noto Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Helvetica, Arial, sans-serif;
  --font-display: 'Manrope', 'Noto Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --maxw: 960px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.container { max-width: var(--maxw); margin: 0 auto; padding-inline: 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- top navigation ---- */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.topnav .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; }
.topnav .brand { font-family: var(--font-display); font-weight: 800; color: var(--fg); white-space: nowrap; }
.topnav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 0; padding: 0; }
.topnav li a { color: var(--fg-soft); font-size: 0.95rem; }
.topnav li a.active { color: var(--accent); font-weight: 600; }

/* ---- hero ---- */
.hero { padding-block: 3rem 2rem; text-align: center; }
.hero .title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800; line-height: 1.15;
  margin: 0 0 0.75rem; text-wrap: balance;
}
.hero .subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 500; color: var(--fg-soft);
  margin: 0 0 1.25rem; text-wrap: balance;
}
.hero .authors { font-size: 1.05rem; margin: 0.2rem 0; }
.hero .affil { color: var(--muted); }
.hero .venue { color: var(--bad); font-weight: 700; }
.hero .note { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; margin-top: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--btn); color: var(--btn-fg);
  border-radius: 9999px; padding: 0.5rem 1.1rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; background: #111; }
.btn svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
.btn.is-light { background: transparent; color: var(--fg); border-color: var(--rule); }
.btn.is-light:hover { background: var(--box); }
.btn.is-disabled { opacity: 0.45; pointer-events: none; }

/* ---- sections ---- */
.section { padding-block: 2.5rem; border-top: 1px solid var(--rule); }
.section h2 {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  text-align: center; margin: 0 0 1.25rem; text-wrap: balance;
}
.section h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.section h4 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.prose { max-width: 760px; margin: 0 auto; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.35rem; }
.prose li::marker { color: var(--muted); }
.lead { font-size: 1.08rem; color: var(--fg-soft); }
.small { font-size: 0.9rem; color: var(--muted); }

/* ---- figure boxes ---- */
.box {
  background: #fff; border-radius: 8px;
  box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.03);
  padding: 1.25rem; margin: 1.5rem auto;
}
figure { margin: 0; }
figure img { display: block; margin: 0 auto; }
figure.narrow img { max-width: 620px; }
figcaption { color: var(--muted); font-size: 0.92rem; line-height: 1.5; margin: 0.8rem auto 0; max-width: 760px; }
figcaption b { color: var(--fg-soft); }
.fig-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.fig-grid > * { min-width: 0; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
caption { caption-side: top; text-align: left; color: var(--muted); font-size: 0.9rem; padding-bottom: 0.4rem; }
th, td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
thead th { font-weight: 600; background: var(--box); white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.hl td { background: var(--accent-soft); }
.pos { color: var(--ok); } .neg { color: var(--bad); }
td b, th b { font-weight: 700; }

/* ---- callouts, cards, badges ---- */
.callout { border-left: 4px solid var(--accent); background: var(--box); padding: 0.9rem 1.1rem; border-radius: 0 6px 6px 0; margin: 1.25rem 0; }
.callout.warn { border-color: var(--warn-border); background: var(--warn-bg); }
.callout.bad { border-color: var(--bad); background: #fdf1f1; }
.callout .label { display: block; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.76rem; color: var(--muted); margin-bottom: 0.3rem; }
.callout p:last-child { margin-bottom: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card { border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.1rem; min-width: 0; background: #fff; }
.card .kpi { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.card .kpi-label { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.card p { margin: 0.5rem 0 0; font-size: 0.92rem; color: var(--fg-soft); }
.status { display: inline-block; padding: 0.1em 0.6em; border-radius: 9999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.status.ok { background: #e6f6ee; color: #146c43; }
.status.weak { background: #fff4d6; color: #8a5a00; }
.status.no { background: #fde8e8; color: #9b1c1c; }
.todo { background: var(--warn-bg); border: 1px dashed var(--warn-border); border-radius: 4px; padding: 0 0.35em; font-size: 0.9em; }

/* ---- code ---- */
pre { background: #f4f5f7; border: 1px solid var(--rule); border-radius: 6px; padding: 1rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.5; }
code { font-family: var(--font-mono); font-size: 0.9em; background: #f4f5f7; padding: 0.1em 0.3em; border-radius: 3px; }
pre code { background: none; padding: 0; }

/* ---- floating table of contents (wide screens only) ---- */
.toc { position: fixed; left: 1.25rem; top: 90px; width: 200px; font-size: 0.85rem; display: none; }
@media (min-width: 1400px) { .toc { display: block; } }
.toc h4 { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0.3rem 0; }
.toc a { color: var(--fg-soft); }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--rule); padding-block: 2rem; color: var(--muted); font-size: 0.9rem; text-align: center; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 600px) {
  .hero { padding-block: 2rem 1.25rem; }
  .section h2 { font-size: 1.6rem; }
  .box { padding: 0.9rem; }
  .topnav ul { gap: 0.8rem; }
}
