:root {
  color-scheme: light;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft-line: #f1f5f9;
  --bg: #ffffff;
  --bg-section: #f8fafc;
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --accent: #0ea5e9;
  --accent-light: #f0f7ff;
  --accent-border: #bfdbfe;
  --table-head: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --missing: #dc2626;
  --sticky-col-1-width: 200px;
  --sticky-col-2-width: 200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.page {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 96px 0 64px;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-container {
  width: min(1120px, calc(100% - 48px));
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}

.nav-menu a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.nav-menu a:hover {
  color: var(--link);
  text-decoration: none;
}

.nav-menu a.active {
  color: var(--link);
  font-weight: 700;
}

.nav-menu a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--link);
  border-radius: 1px;
}

/* ── Hero ── */
.paper-header {
  margin: 0 auto 48px;
  text-align: center;
}

.venue-badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 14px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--link);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  max-width: 920px;
  margin: 0 auto 28px;
  font-size: clamp(1.75rem, 4vw, 2.375rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.authors {
  max-width: 920px;
  margin: 0 auto 10px;
  color: #334155;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
}

.affiliations {
  max-width: 920px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}

.affiliations p {
  margin: 2px 0;
}

.paper-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto 28px;
}

.paper-links a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.paper-links a:hover {
  text-decoration: none;
}

.paper-links img {
  display: block;
  height: 22px;
}

/* ── Sections ── */
.section-block {
  margin: 48px 0;
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-section);
}

#abstract {
  max-width: 100%;
}

h2 {
  margin: 0 0 20px;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #0f172a;
}

h4 {
  margin: 0 0 16px;
  padding-top: 40px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1e293b;
}

.section-block > h4:first-of-type,
.section-block > p + h4 {
  padding-top: 32px;
}

p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
}

#abstract p strong,
.section-block p strong {
  color: #0f172a;
  font-weight: 700;
}

ul {
  margin-top: 8px;
  padding-left: 24px;
}

li {
  margin: 8px 0;
  line-height: 1.7;
}

/* ── Figures ── */
figure {
  margin: 32px auto;
  text-align: center;
}

figure img {
  display: block;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  object-fit: contain;
}

.paper-figure--compact {
  max-width: 560px;
  margin: 24px auto;
}

.paper-figure--compact img {
  width: auto;
  max-width: 100%;
}

.paper-figure--table {
  margin: 20px auto 28px;
}

.paper-figure--table.paper-figure--compact {
  max-width: 560px;
  margin: 24px auto;
}

.paper-figure--table img {
  width: 100%;
  max-width: 820px;
  box-shadow: none;
  border: 1px solid var(--line);
}

.paper-figure--table.paper-figure--compact img {
  width: auto;
  max-width: 100%;
}

.paper-figure--table-wide img {
  max-width: 100%;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ── Tables ── */
.table-wrap {
  position: relative;
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.table-wrap::-webkit-scrollbar {
  height: 6px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.comparison-table-wrap::after {
  content: "← scroll →";
  position: absolute;
  bottom: 6px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  pointer-events: none;
  opacity: 0.7;
}

@media (min-width: 1200px) {
  .comparison-table-wrap::after {
    display: none;
  }
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  line-height: 1.5;
}

.comparison-table {
  min-width: 1480px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 12px 10px;
  text-align: center;
  vertical-align: middle;
}

th {
  background: var(--table-head);
  font-weight: 700;
  color: #334155;
}

/* Sticky columns for comparison table */
.sticky-col {
  position: sticky;
  z-index: 2;
  background: var(--bg);
}

.sticky-col-1 {
  left: 0;
  min-width: var(--sticky-col-1-width);
  max-width: var(--sticky-col-1-width);
}

.sticky-col-2 {
  left: var(--sticky-col-1-width);
  min-width: var(--sticky-col-2-width);
  max-width: var(--sticky-col-2-width);
  box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.08);
}

thead .sticky-col {
  z-index: 3;
  background: var(--table-head);
}

/* Comparison table header branding */
.comparison-table .col-zerovc {
  background: var(--accent-light);
  color: var(--link);
  border-bottom: 3px solid var(--link);
}

.comparison-table .col-cosyvoice {
  border-bottom: 3px solid #8b5cf6;
}

.comparison-table .col-lscodec {
  border-bottom: 3px solid #10b981;
}

.comparison-table .col-seedvc {
  border-bottom: 3px solid #f59e0b;
}

/* ── Audio ── */
audio {
  display: block;
  width: 100%;
  min-width: 160px;
  height: 36px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  outline: none;
}

.missing-audio-cell {
  background: rgba(220, 38, 38, 0.06);
}

.note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ── Citation ── */
.citation-block {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--link);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  border-color: var(--accent-border);
  background: var(--accent-light);
}

.copy-btn.copied {
  border-color: #86efac;
  background: #f0fdf4;
  color: #16a34a;
}

pre {
  overflow-x: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 20px;
  padding-top: 44px;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

/* ── Footer ── */
footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .page {
    width: calc(100% - 32px);
    padding-top: 80px;
  }

  .nav-container {
    width: calc(100% - 32px);
    min-height: auto;
    justify-content: center;
    padding: 8px 0;
  }

  .nav-menu {
    justify-content: center;
    gap: 16px;
  }

  .nav-menu a {
    font-size: 14px;
  }

  .section-block {
    padding: 28px 20px;
    margin: 32px 0;
  }

  h4 {
    padding-top: 28px;
    font-size: 1.125rem;
  }

  :root {
    --sticky-col-1-width: 160px;
    --sticky-col-2-width: 160px;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    gap: 10px 16px;
  }

  .paper-links {
    flex-direction: column;
  }
}
