:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #343b37;
  --muted: #5e6661;
  --green: #528f6d;
  --line: #e4e9e6;
  --soft-green: #f3f8f4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", "Avenir Next", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.top-rule {
  height: 64px;
  background: linear-gradient(110deg, #58c7d0 0%, #51b2a5 54%, #48a66f 100%);
}

.hero {
  padding: clamp(76px, 10vw, 124px) 26px 48px;
}

.hero-inner {
  width: min(100%, 1040px);
  margin: 0 auto;
  text-align: center;
  animation: rise-in 650ms cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

h1 {
  max-width: 1280px;
  margin: 0 auto;
  color: var(--green);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.7rem, 3.1vw, 2.15rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.13;
  text-wrap: balance;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  max-width: 970px;
  margin: 32px auto 0;
  padding: 0;
  list-style: none;
  color: #555e59;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.75;
}

.authors li {
  white-space: nowrap;
}

.authors li:not(:last-child)::after {
  content: ",";
  margin-right: 0.4em;
}

sup {
  position: relative;
  top: -0.2em;
  margin-left: 2px;
  color: var(--green);
  font-size: 0.7em;
  font-weight: 600;
  line-height: 0;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 16px;
  row-gap: 7px;
  max-width: 1000px;
  margin: 24px auto 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.75;
}

.affiliations li {
  max-width: 100%;
  text-align: center;
}

.affiliations li:nth-child(1),
.affiliations li:nth-child(2),
.affiliations li:nth-child(7),
.affiliations li:nth-child(8) {
  flex-basis: 100%;
}

.affiliations sup {
  margin-right: 4px;
  margin-left: 0;
}

.author-notes {
  margin: 19px 0 0;
  color: #778079;
  font-size: 0.76rem;
}

.author-notes span {
  color: var(--green);
  font-weight: 600;
}

.author-notes i {
  margin: 0 7px;
  color: #a6b4ab;
  font-style: normal;
}

.resource-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 27px;
  margin-top: 26px;
}

.resource-links a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 4px;
}

.resource-links a:hover,
.resource-links a:focus-visible {
  color: var(--green);
  text-decoration: underline;
}

.section-nav {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 30px;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.section-nav a {
  padding: 4px 0;
  color: #65716a;
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 140ms ease;
}

.section-nav a:hover,
.section-nav a:focus-visible {
  color: var(--green);
}

.paper-content {
  width: min(calc(100% - 48px), 920px);
  margin: 0 auto;
  padding: 50px 0 96px;
}

.paper-content section {
  scroll-margin-top: 76px;
  margin: 0 0 48px;
}

.paper-content h2 {
  margin: 0 0 18px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  color: #343c37;
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.35;
}

.paper-content h3 {
  margin: 25px 0 10px;
  color: #3f5046;
  font-size: 1.08rem;
  font-weight: 600;
}

.paper-content p,
.paper-content li {
  color: #454d48;
  font-size: 0.97rem;
  line-height: 1.8;
}

.paper-content p {
  margin: 0;
  text-align: justify;
}

.paper-content ul {
  margin: 11px 0 0;
  padding-left: 1.35rem;
}

.dataset-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 22px;
  margin-top: 28px;
}

.dataset-figures figure {
  min-width: 0;
  margin: 0;
}

.dataset-figures img {
  display: block;
  width: 100%;
  height: auto;
}

.dataset-figures figcaption {
  margin-top: 7px;
  color: #737d76;
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
}

.pipeline-figure {
  margin: 27px 0 0;
}

.pipeline-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.pipeline-figure figcaption {
  margin-top: 8px;
  color: #737d76;
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
}

.table-intro {
  margin-bottom: 14px !important;
  color: #68736d !important;
  font-size: 0.88rem !important;
  text-align: left !important;
}

.table-scroll {
  max-width: 100%;
  margin: 14px 0 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  scrollbar-color: #b9c9be #f4f7f5;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.leaderboard {
  width: 100%;
  border-collapse: collapse;
  color: #3e4842;
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: center;
}

.dataset-sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.dataset-sample-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe7e1;
  border-radius: 5px;
  background: #fff;
}

.dataset-sample-card audio {
  display: block;
  width: 100%;
  height: 40px;
  margin-bottom: 14px;
}

.dataset-sample-transcript + .dataset-sample-transcript {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf1ee;
}

.dataset-sample-label {
  display: block;
  margin-bottom: 4px;
  color: #718078;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dataset-sample-transcript p {
  margin: 0 !important;
  color: #424c46;
  font-size: 0.82rem !important;
  line-height: 1.55;
  text-align: left !important;
}

.dataset-sample-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #e7ede9;
}

.dataset-sample-stats div {
  min-width: 0;
}

.dataset-sample-stats dt {
  color: #78837c;
  font-size: 0.67rem;
  line-height: 1.3;
}

.dataset-sample-stats dd {
  margin: 3px 0 0;
  color: #3e4942;
  font-size: 0.78rem;
  font-weight: 600;
}

.leaderboard th,
.leaderboard td {
  padding: 9px 10px;
  border-bottom: 1px solid #e8eeea;
  white-space: nowrap;
}

.leaderboard thead th {
  background: var(--soft-green);
  color: #34483b;
  font-weight: 600;
}

.leaderboard tbody tr:last-child td,
.leaderboard tbody tr:last-child th {
  border-bottom: 0;
}

.leaderboard td:first-child,
.leaderboard tbody th:first-child {
  text-align: left;
}

.minnan-table {
  min-width: 440px;
}

.mandarin-table {
  min-width: 1030px;
  font-size: 0.8rem;
}

.tts-table {
  min-width: 1320px;
  font-size: 0.8rem;
}

.mandarin-table th:first-child,
.mandarin-table td:first-child,
.tts-table th:first-child,
.tts-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}

.mandarin-table thead th:first-child {
  z-index: 2;
  background: var(--soft-green);
}

.tts-table thead th:first-child {
  z-index: 2;
  background: var(--soft-green);
}

.leaderboard .trained td {
  background: #e2f2e2;
}

.leaderboard .group-separator th {
  background: #f1f3f2;
  color: #404a44;
  font-weight: 600;
  text-align: left;
}

.leaderboard u {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.table-note {
  margin-top: 8px !important;
  color: #6f7973 !important;
  font-size: 0.78rem !important;
  text-align: left !important;
}

.tts-samples {
  margin-top: 22px;
}

.tts-sample-table {
  min-width: 2360px;
  table-layout: fixed;
  font-size: 0.8rem;
  text-align: left;
}

.tts-sample-table th,
.tts-sample-table td {
  padding: 18px 12px;
  border-right: 1px solid #e1e7e3;
  border-bottom: 1px solid #d7dfda;
}

.tts-sample-table thead th {
  padding-top: 14px;
  padding-bottom: 14px;
}

.tts-sample-table th:first-child,
.tts-sample-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 360px;
  white-space: normal;
  background: #fff;
}

.tts-sample-table thead th:first-child {
  z-index: 2;
  background: var(--soft-green);
}

.tts-sample-table th:nth-child(2),
.tts-sample-table td:nth-child(2) {
  width: 250px;
  text-align: left;
  white-space: normal;
}

.tts-sample-table th:nth-child(n+3),
.tts-sample-table td:nth-child(n+3) {
  width: 250px;
  text-align: center;
}

.tts-sample-table tbody td {
  background: #fff;
}

.tts-sample-table tbody tr:last-child td {
  border-bottom: 0;
}

.tts-sample-table thead th.wsm-column {
  background: #d9ebdc;
  color: #244b32;
  font-weight: 700;
  box-shadow: inset 0 4px 0 #6f9c79;
}

.tts-sample-table tbody td.wsm-column {
  border-right: 1px solid #c4dcc9;
  border-left: 1px solid #c4dcc9;
  background: #eaf3ec;
}

.sample-cell-text {
  margin: 0 0 8px !important;
  color: #424c46;
  font-size: 0.84rem !important;
  line-height: 1.5;
  text-align: left !important;
}

.sample-translation {
  margin: 0 !important;
  padding-top: 7px;
  border-top: 1px solid #e8eeea;
  color: #7b847e !important;
  font-size: 0.78rem !important;
  line-height: 1.55;
  text-align: left !important;
}

.tts-sample-table .sample-reference-cell audio {
  min-width: 0;
  max-width: 220px;
  margin: 0;
}

.tts-sample-table audio {
  display: block;
  width: 100%;
  min-width: 210px;
  max-width: 220px;
  height: 42px;
  margin: 0 auto;
}

.paper-content li + li {
  margin-top: 5px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(13px);
  }
}

@media (max-width: 640px) {
  .top-rule {
    height: 54px;
  }

  .hero {
    padding: 64px 21px 38px;
  }

  h1 {
    font-size: clamp(1.35rem, 5vw, 1.8rem);
    line-height: 1.12;
  }

  .authors {
    gap: 4px 0;
    margin-top: 26px;
    font-size: 0.875rem;
  }

  .affiliations {
    flex-direction: column;
    gap: 7px;
    margin-top: 22px;
    font-size: 0.875rem;
  }

  .resource-links {
    margin-top: 22px;
  }

  .section-nav {
    gap: 2px 17px;
    padding: 11px 14px;
  }

  .section-nav a {
    font-size: 0.76rem;
  }

  .paper-content {
    width: min(calc(100% - 40px), 920px);
    padding-top: 39px;
  }

  .dataset-figures {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .dataset-sample-grid {
    grid-template-columns: 1fr;
  }

  .paper-content p,
  .paper-content li {
    font-size: 0.92rem;
  }

  .tts-sample-table {
    min-width: 2270px;
  }

  .tts-sample-table th:first-child,
  .tts-sample-table td:first-child {
    width: 290px;
  }

  .tts-sample-table th:nth-child(2),
  .tts-sample-table td:nth-child(2) {
    width: 250px;
  }

  .tts-sample-table th:nth-child(n+3),
  .tts-sample-table td:nth-child(n+3) {
    width: 250px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
