:root {
  --text: #30333a;
  --muted: #67707c;
  --border: #dfe3e8;
  --soft: #f5f7f9;
  --soft-blue: #edf5fb;
  --blue: #236b9e;
  --max-wide: 1080px;
  --max-narrow: 820px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.62;
}
a { color: var(--blue); }
.skip-link { position: fixed; top: -4rem; left: 1rem; z-index: 20; padding: .65rem 1rem; background: #fff; border: 1px solid var(--border); }
.skip-link:focus { top: 1rem; }
.section-wide, .section-narrow { width: calc(100% - 2rem); margin-inline: auto; }
.section-wide { max-width: var(--max-wide); }
.section-narrow { max-width: var(--max-narrow); }

.paper-header { padding: 4.25rem 0 2.75rem; text-align: center; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 1.35rem; font-size: clamp(2.2rem, 5vw, 3.55rem); font-weight: 650; line-height: 1.16; letter-spacing: -.035em; }
h2 { margin-bottom: 1.5rem; font-size: 2rem; font-weight: 620; text-align: center; letter-spacing: -.02em; }
h3 { margin-bottom: .55rem; font-size: 1.12rem; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem .75rem; font-size: 1.2rem; }
.authors a { text-decoration: none; }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.5rem; margin-top: .35rem; color: var(--muted); }
.link-row { display: flex; justify-content: center; flex-wrap: wrap; gap: .65rem; margin-top: 1.6rem; }
.paper-link { display: inline-flex; align-items: center; gap: .42rem; padding: .5rem .9rem; border-radius: 999px; background: #30333a; color: #fff; text-decoration: none; font-size: .88rem; }
.paper-link:hover, .paper-link:focus-visible { background: #15171a; }
.link-icon { font-size: .78rem; }

.overview-figure { margin-bottom: 0; padding: 2.6rem; border-radius: .4rem; background: var(--soft); }
.pipeline { display: grid; grid-template-columns: 1fr auto 1.25fr auto 1fr; gap: 1rem; align-items: center; position: relative; }
.pipeline-node { min-height: 8rem; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; border: 1px solid var(--border); border-radius: .35rem; background: #fff; text-align: center; }
.pipeline-node strong { margin: .25rem 0; }
.pipeline-node small { color: var(--muted); }
.node-label { color: var(--blue); font-size: .76rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.accent-node { border-color: #9ec2dc; background: var(--soft-blue); }
.arrow { color: var(--muted); font-size: 1.5rem; }
.conditioning-node { grid-column: 3; padding-top: .25rem; text-align: center; }
.conditioning-node strong { margin-left: .4rem; }
.condition-line { display: block; margin-bottom: -.15rem; color: var(--blue); font-size: 1.5rem; line-height: 1; }
.figure-caption { max-width: 760px; margin: 1.4rem auto 0; color: var(--muted); font-size: .88rem; text-align: center; }

.content-section { padding: 3.25rem 0; }
.content-section + .content-section { border-top: 1px solid var(--border); }
.content-section p { margin-bottom: 1rem; }
.section-intro { max-width: 780px; margin: -.5rem auto 2rem; color: var(--muted); text-align: center; }
.method-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.method-columns article { padding: 1.4rem; border: 1px solid var(--border); border-radius: .35rem; }
.method-columns p { margin-bottom: 0; color: var(--muted); }

.example-tabs, .metric-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.5rem; }
.example-tabs button, .metric-tabs button { min-height: 2.5rem; padding: .45rem 1rem; border: 1px solid var(--border); border-radius: .3rem; background: #fff; color: var(--text); cursor: pointer; font: inherit; }
.example-tabs button:hover, .metric-tabs button:hover { border-color: #9ba5b1; }
.example-tabs button[aria-selected="true"], .metric-tabs button[aria-selected="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.metric-tabs sub { font-size: .72em; }
.example-context { max-width: 820px; margin: 0 auto 1.5rem; padding: 1.2rem 1.4rem; border-radius: .35rem; background: var(--soft); text-align: center; }
.pair-label { margin-bottom: .35rem !important; color: var(--blue); font-size: .82rem; font-weight: 650; }
.transcript { margin-bottom: 0 !important; font-style: italic; }
.reference-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: 2rem; }
.comparison-groups { display: grid; gap: 1.8rem; }
.audio-group { border-top: 1px solid var(--border); padding-top: 1.2rem; }
.audio-group h3 { margin-bottom: .8rem; text-align: left; }
.audio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.audio-card { min-width: 0; padding: .9rem; border: 1px solid var(--border); border-radius: .3rem; background: #fff; }
.audio-card.highlight { background: var(--soft-blue); border-color: #bad4e6; }
.audio-card-head { display: flex; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; }
.audio-card strong { font-size: .9rem; }
.audio-card small { color: var(--muted); font-size: .75rem; }
.audio-card audio { display: block; width: 100%; height: 2.25rem; }

.results-section { width: 100%; max-width: none; background: var(--soft); }
.chart-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.chart-heading h3 { margin-bottom: 0; }
.chart-heading span { color: var(--muted); font-size: .84rem; }
.bar-chart { display: grid; gap: .48rem; }
.bar-row { display: grid; grid-template-columns: 7.5rem minmax(8rem, 1fr) 11.5rem; align-items: center; gap: .75rem; font-size: .82rem; }
.bar-label { color: var(--text); font-weight: 600; text-align: right; }
.bar-track { height: .72rem; overflow: hidden; border-radius: 999px; background: #e4e8eb; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width 220ms ease; }
.bar-discrete .bar-track i { background: #7b8792; }
.bar-learned .bar-track i { background: #c7783c; }
.bar-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; margin-top: 1.4rem; color: var(--muted); font-size: .8rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.chart-legend i { width: .8rem; height: .8rem; border-radius: 2px; background: var(--blue); }
.chart-legend .legend-discrete { background: #7b8792; }
.chart-legend .legend-learned { background: #c7783c; }
.result-caption { margin: .8rem auto 0 !important; color: var(--muted); font-size: .8rem; text-align: center; }
.result-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 1rem; }
.result-panel { padding: 1.35rem; border: 1px solid var(--border); border-radius: .35rem; background: #fff; }
.result-panel-wide { grid-row: span 2; }
.panel-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.panel-heading h3 { margin-bottom: .15rem; }
.panel-heading p { margin-bottom: 0; color: var(--muted); font-size: .85rem; }
.panel-heading a { white-space: nowrap; font-size: .84rem; }
.metric-chart { display: grid; gap: .45rem; }
.metric-row { display: grid; grid-template-columns: 7rem 1fr 3.1rem; align-items: center; gap: .65rem; font-size: .78rem; }
.metric-label { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.metric-track { height: .5rem; background: #edf0f2; border-radius: 999px; overflow: hidden; }
.metric-fill { display: block; height: 100%; background: #8f9aa5; }
.metric-row.proposed .metric-fill { background: var(--blue); }
.metric-value { text-align: right; font-variant-numeric: tabular-nums; }
.results-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.results-table th, .results-table td { padding: .55rem .4rem; border-bottom: 1px solid var(--border); text-align: right; }
.results-table th:first-child, .results-table td:first-child { text-align: left; }
.artifact-note { margin-top: .8rem !important; margin-bottom: 0 !important; color: var(--muted); font-size: .8rem; }
.artifact-list { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.artifact-list li + li { margin-top: .25rem; }

.resource-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.resource-row a { display: flex; flex-direction: column; padding: 1.2rem; border: 1px solid var(--border); border-radius: .35rem; text-decoration: none; }
.resource-row a:hover { border-color: #9ba5b1; }
.resource-row span { color: var(--muted); font-size: .86rem; }
@media (max-width: 800px) {
  .pipeline { grid-template-columns: 1fr; }
  .arrow { transform: rotate(90deg); justify-self: center; }
  .conditioning-node { grid-column: 1; grid-row: 4; }
  .method-columns, .result-grid { grid-template-columns: 1fr; }
  .result-panel-wide { grid-row: auto; }
  .audio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .paper-header { padding: 3rem 0 2.25rem; }
  .overview-figure { width: 100%; padding: 1.5rem 1rem; border-radius: 0; }
  .content-section { padding: 2.6rem 0; }
  .reference-row, .audio-grid, .resource-row { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: 5.7rem 1fr 2.9rem; gap: .4rem; }
  .bar-row { grid-template-columns: 5.6rem 1fr; gap: .35rem .55rem; }
  .bar-label { text-align: left; }
  .bar-value { text-align: right; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .panel-heading { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
