/* SEA-SpeechBench — project page */

:root {
  --bg:      #FFFFFF;
  --surface: #FAFAF9;
  --ink:     #16130F;
  --ink-2:   #3D362E;
  --muted:   #6E655B;
  --faint:   #A0968A;
  --line:    #E6E1D9;
  --accent:  #A8442A;

  --speech:   #B04A2A;
  --para:     #2B5AA8;
  --temporal: #2C8D57;

  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #131110;
    --surface: #1B1816;
    --ink:     #F1ECE6;
    --ink-2:   #D5CCC2;
    --muted:   #A0958A;
    --faint:   #776D62;
    --line:    #2E2823;
    --accent:  #E08A63;

    --speech:   #E08A63;
    --para:     #86AAE8;
    --temporal: #6FC494;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 1.5rem 5rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 980px; margin: 0 auto; }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-underline-offset: 2px; }

/* --- Header --------------------------------------------------------------- */

header { text-align: center; padding: 4.5rem 0 0; }

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.05rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
h1 .name { display: block; font-weight: 600; }
h1 .sub {
  display: block;
  margin-top: .5rem;
  font-size: .48em;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  line-height: 1.3;
}

.authors {
  margin: 2rem auto 0;
  max-width: 700px;
  font-size: .95rem;
  line-height: 1.9;
  color: var(--ink);
}
.authors sup { font-size: .7em; color: var(--accent); }
.affil {
  margin-top: .75rem;
  font-size: .85rem;
  line-height: 1.75;
  color: var(--muted);
}
.affil sup { color: var(--accent); }
.affil .fn { display: block; margin-top: .5rem; font-size: .95em; }

/* --- Links ---------------------------------------------------------------- */

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 2.25rem;
}
.link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: .87rem;
  text-decoration: none;
}
.link:hover { border-color: var(--faint); }
.link svg { width: 14px; height: 14px; opacity: .7; }
/* --- Sections ------------------------------------------------------------- */

section { padding-top: 3.75rem; }

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  padding-bottom: .6rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.abstract { font-size: 1.02rem; color: var(--ink-2); }

/* --- Fact list ------------------------------------------------------------ */

.facts {
  list-style: none;
  margin: 1.9rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 2.5rem;
}
.facts li {
  position: relative;
  padding-left: 1.4rem;
  margin: 0;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--muted);
}
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.facts b { color: var(--ink); font-weight: 600; }

.facts.stack { grid-template-columns: 1fr; gap: 1rem; }
.facts.stack li { font-size: .97rem; }

@media (max-width: 700px) { .facts { grid-template-columns: 1fr; gap: .9rem; } }

/* --- Tables --------------------------------------------------------------- */

.scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
thead th {
  background: var(--surface);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  padding: .6rem .55rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
thead th.grp {
  text-align: center;
  text-transform: none;
  letter-spacing: .01em;
  font-size: .68rem;
  color: var(--ink-2);
  border-left: 1px solid var(--line);
}
th.l, td.l { text-align: left; }
tbody td {
  padding: .45rem .55rem;
  text-align: right;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}
tbody td.l { color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.sep td { border-top: 2px solid var(--line); }
td.na { color: var(--faint); }
td.best { font-weight: 700; color: var(--ink); }
td.gbest { font-weight: 700; color: var(--accent); }

.cat-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 2px;
  margin-right: .5rem;
  vertical-align: middle;
}
.cat-dot.speech   { background: var(--speech); }
.cat-dot.para     { background: var(--para); }
.cat-dot.temporal { background: var(--temporal); }

/* --- Sortable headers ----------------------------------------------------- */

th.sortable { cursor: pointer; user-select: none; -webkit-user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sortable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
th.sortable::after {
  content: "\2195";               /* idle: reserve the space so nothing shifts */
  display: inline-block;
  width: .85em;
  margin-left: .25em;
  text-align: center;
  opacity: .3;
  font-weight: 400;
}
th.sortable:hover::after { opacity: .6; }
th[aria-sort="ascending"]::after  { content: "\2191"; opacity: 1; color: var(--accent); }
th[aria-sort="descending"]::after { content: "\2193"; opacity: 1; color: var(--accent); }

/* The open/commercial rule is only meaningful in source order. */
tbody.is-sorted tr.sep td { border-top: 1px solid var(--line); }

.legend {
  margin-top: .7rem;
  font-size: .8rem;
  color: var(--muted);
}
.legend b { color: var(--ink); }
.legend .g { color: var(--accent); font-weight: 700; }

/* --- Tabs ----------------------------------------------------------------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
  font-size: .88rem;
}
.tab {
  appearance: none;
  border: 0;
  padding: 0 0 .3rem;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.panel[hidden] { display: none; }

.scope {
  font-size: .92rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* --- Table blocks --------------------------------------------------------- */

.tbl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem 1rem;
  margin-bottom: .4rem;
}
.tbl-head h3 { font-size: 1rem; font-weight: 600; }
.cond {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .18rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.tbl-note { font-size: .89rem; color: var(--muted); margin-bottom: .9rem; }

/* --- Citation ------------------------------------------------------------- */

.cite { position: relative; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.cite pre {
  margin: 0;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .76rem;
  line-height: 1.65;
  color: var(--ink-2);
}
.copy {
  position: absolute;
  top: .6rem; right: .6rem;
  padding: .3rem .6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
}
.copy:hover { color: var(--ink); }

/* --- Footer --------------------------------------------------------------- */

footer {
  margin-top: 4rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  line-height: 1.65;
  color: var(--muted);
}

@media (max-width: 620px) {
  body { padding: 0 1.15rem 3.5rem; }
  header { padding-top: 3rem; }
  section { padding-top: 3rem; }
  table { font-size: .77rem; }
  tbody td, thead th { padding: .42rem .45rem; }
  .cite pre { padding: 2.5rem 1rem 1rem; font-size: .7rem; }
}

/* --- Figures -------------------------------------------------------------- */

figure { margin: 0 0 1.5rem; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .75rem;
}
figcaption {
  margin-top: .7rem;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--muted);
}
figcaption b { color: var(--ink-2); font-weight: 600; }

/* Multi-panel figure row */
.fig-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  align-items: center;
}
.fig-row figure { margin: 0; }
.fig-row figcaption { text-align: center; margin-top: .5rem; font-size: .78rem; }
@media (max-width: 780px) {
  .fig-row { grid-template-columns: 1fr 1fr; }
  .fig-row figure:last-child { grid-column: 1 / -1; max-width: 380px; margin-inline: auto; }
}
@media (max-width: 480px) {
  .fig-row { grid-template-columns: 1fr; }
  .fig-row figure:last-child { grid-column: auto; }
}

.fig-note { margin-top: 1.25rem; font-size: .84rem; line-height: 1.6; color: var(--muted); }
