:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --accent: #2563eb;
  --border: #e2e2e2;
  --surface: #f7f7f8;
  --maxw: 860px;
  --wide: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

main, .hero, footer { max-width: var(--maxw); margin: 0 auto; }

.hero {
  max-width: var(--wide);
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

/* Scales with the viewport so the title never wraps. */
.hero h1 {
  font-size: clamp(.95rem, 3vw, 2.1rem);
  white-space: nowrap;
  line-height: 1.25;
  margin: 0 0 .4rem;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.authors { margin: 0 0 .3rem; }
.affiliations, .venue { color: var(--muted); font-size: .95rem; margin: 0 0 .3rem; }
.venue { margin-bottom: 1.6rem; }

.note {
  color: var(--muted);
  font-size: .85rem;
  margin: .5rem 0 1.6rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: .5rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  font-size: .95rem;
  transition: background .15s, border-color .15s;
}

.btn:hover { background: #ececee; border-color: #cfcfcf; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: #1d4fd8; border-color: #1d4fd8; }

section { margin: 3rem 0 0; }

h2 {
  font-size: 1.35rem;
  margin: 0 0 .9rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}

#abstract p { text-align: justify; }

figure { margin: 0; text-align: center; }
figure img { max-width: 100%; height: auto; }

figcaption {
  color: var(--muted);
  font-size: .9rem;
  margin-top: .7rem;
  text-align: left;
}

.result-table { margin: 0 0 1.2rem; }
.result-table img { max-width: 100%; }

.method-figure img { max-width: 82%; }
.math { font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.math sub, .math sup { font-style: normal; }

.placeholder, .placeholder-box {
  color: var(--muted);
}

.placeholder-box {
  border: 1px dashed #c8c8c8;
  border-radius: 8px;
  background: var(--surface);
  padding: 1.5rem;
  font-size: .95rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: .55rem .5rem;
  text-align: left;
  vertical-align: middle;
}

th { font-weight: 600; white-space: nowrap; }

audio { width: 190px; height: 34px; display: block; }

/* ---- audio comparison tables ---- */

/* Wide enough for six player columns without squeezing the rest of the page. */
section.wide { max-width: var(--wide); margin-left: auto; margin-right: auto; }
section.wide > h2, section.wide > p { max-width: var(--maxw); margin-inline: auto; }

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.audio-table { font-size: .85rem; table-layout: fixed; }
.audio-table th, .audio-table td { border-bottom: 1px solid var(--border); }
.audio-table tbody tr:last-child td { border-bottom: 0; }
.audio-table thead th {
  background: var(--surface);
  padding: .45rem .4rem;
  text-align: center;
  font-size: .8rem;
  letter-spacing: .01em;
  white-space: normal;
}
.audio-table td { padding: .25rem .4rem; }
.audio-table tbody tr:nth-child(even) { background: var(--surface); }

.audio-table th:first-child, .audio-table .clip-index {
  width: 2.6rem;
  text-align: center;
  border-right: 1px solid var(--border);
}
.audio-table .clip-index {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.audio-table .ours { background: rgba(37, 99, 235, .06); }
.audio-table thead th.ours { color: var(--accent); }

.audio-table audio { width: 100%; max-width: 190px; height: 30px; margin: 0 auto; }

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-size: .85rem;
}

.small { font-size: .88rem; color: var(--muted); }

.citation { font-size: .78rem; color: var(--muted); line-height: 1.55; }
.citation a { color: inherit; }

footer {
  margin-top: 3.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --fg: #e9e9ea;
    --muted: #9a9aa0;
    --border: #2c2c31;
    --surface: #1b1b1f;
  }
  .btn:hover { background: #26262b; border-color: #3a3a41; }
  .placeholder-box { border-color: #3a3a41; }
  figure img { background: #fff; border-radius: 6px; }
  .audio-table .ours { background: rgba(96, 141, 245, .10); }
  audio { color-scheme: dark; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .audio-table { font-size: .75rem; }
  .audio-table thead th { font-size: .68rem; padding: .35rem .2rem; }
  .audio-table td { padding: .2rem .2rem; }
  .audio-table th:first-child, .audio-table .clip-index { width: 1.6rem; }
  .audio-table audio { height: 26px; }
}
