:root {
  --bg: #ffffff;
  --surface: #f7f7f8;
  --border: #e3e3e6;
  --text: #16161a;
  --muted: #63636b;
  --accent: #a6273f;
  --accent-soft: #fdeef1;
  --link: #1f5f9e;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif CJK TC",
           "Source Han Serif TC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK TC",
          "PingFang TC", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121215;
    --surface: #1b1b20;
    --border: #2c2c33;
    --text: #ececf0;
    --muted: #9a9aa5;
    --accent: #e8788d;
    --accent-soft: #2a1b20;
    --link: #7db3e8;
  }
}

* { 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.7;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 0 22px; }

/* ---------- header ---------- */

header {
  border-bottom: 1px solid var(--border);
  padding: 60px 0 38px;
  text-align: center;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  line-height: 1.28;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.subtitle {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0 0 22px;
}

.authors { margin: 0 0 4px; font-size: 1.02rem; }
.authors a { color: var(--link); text-decoration: none; }
.authors a:hover { text-decoration: underline; }
.affil { color: var(--muted); font-size: 0.92rem; margin: 0 0 26px; }

.links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn svg { width: 15px; height: 15px; fill: currentColor; opacity: 0.75; }

.notice {
  margin: 28px auto 0;
  max-width: 640px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.9rem;
  text-align: left;
}

.langswitch {
  display: inline-flex;
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.86rem;
}
.langswitch > * {
  padding: 5px 15px;
  text-decoration: none;
  color: var(--muted);
}
.langswitch > a:hover { background: var(--surface); color: var(--text); }
.langswitch > [aria-current="page"] {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ---------- sections ---------- */

section { padding: 40px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 16px;
}

h3 {
  font-size: 1.02rem;
  font-weight: 650;
  margin: 30px 0 8px;
}

p { margin: 0 0 16px; }
a { color: var(--link); }

figure { margin: 26px 0; }
figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
figcaption {
  margin-top: 9px;
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--muted);
}

.teaser img { border: none; background: transparent; }

/* The abstract is quoted from the paper, so it is set like one: a narrower
   measure, a little smaller, with more air between the lines. */
.abstract {
  max-width: 63ch;
  margin: 0 auto;
}
.abstract p {
  font-size: 0.95rem;
  line-height: 1.85;
  text-align: justify;
  text-justify: inter-character;
  hyphens: auto;
  margin: 0 0 14px;
}
.abstract p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.findings { counter-reset: finding; list-style: none; margin: 0; padding: 0; }
.findings > li {
  counter-increment: finding;
  position: relative;
  padding: 0 0 0 44px;
  margin: 0 0 26px;
}
.findings > li::before {
  content: counter(finding);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.findings b { display: block; margin-bottom: 2px; }

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.55;
}
code { font-family: var(--mono); font-size: 0.88em; }
p code, li code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.5px 4px;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 18px 0; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--muted); font-size: 0.84rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

footer {
  border-top: 1px solid var(--border);
  padding: 30px 0 50px;
  font-size: 0.85rem;
  color: var(--muted);
}
footer p { margin: 0 0 8px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  header { padding: 44px 0 30px; }
  .btn { padding: 7px 13px; font-size: 0.87rem; }
}
