/* Main project page: tokens, page shell, content components, media players, and responsive rules. */

/* Design tokens */

:root {
  --text: #26282b;
  --muted: #697079;
  --border: #d9dde2;
  --surface: #fff;
  --surface-subtle: #fafafa;
  --on-accent: #fff;
  --soft: #f6f7f8;
  --baseline: #58728a;
  --baseline-soft: #f4f7fa;
  --our: #237a50;
  --our-soft: #f2f9f5;
  --phase-separation: #55789b;
  --phase-separation-soft: #eef4fa;
  --phase-separation-border: #b9cce0;
  --phase-reconstruction: #2f7b55;
  --phase-reconstruction-soft: #edf6f1;
  --phase-reconstruction-border: #b6cdbf;
  --phase-expansion: #8a702f;
  --phase-expansion-soft: #fbf7e8;
  --phase-expansion-border: #dfd09e;
  --active: #f5d76e;
  --content-max-width: 1120px;
  --navigation-width: 184px;
  --page-shell-gap: 32px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-size-xs: .625rem;
  --font-size-sm: .6875rem;
  --font-size-caption: .75rem;
  --font-size-ui: .8125rem;
  --font-size-label: .875rem;
  --font-size-body: 1rem;
  --font-size-lead: 1.125rem;
  --font-size-card-title: 1.25rem;
  --font-size-tagline: clamp(1.3125rem, 2.4vw, 1.75rem);
  --font-size-step-title: 1.5rem;
  --font-size-section-title: 1.75rem;
  --font-size-display: clamp(2.1875rem, 4vw, 3.125rem);
  --font-size-display-mobile: 2.125rem;
}

/* Base and language visibility */

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: 1.65;
}
button {
  font: inherit;
}
.container {
  width: min(calc(100% - 32px), var(--content-max-width));
  margin: 0 auto;
}
.zh {
  display: none;
}
html[lang="zh-CN"] .en {
  display: none;
}
html[lang="zh-CN"] .zh {
  display: inline;
}
html[lang="zh-CN"] p.zh {
  display: block;
}

/* Site header and navigation */

.utility {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #eceef0;
}
.brand-mark {
  display: flex;
  align-items: center;
}
.brand-mark img {
  display: block;
  height: 24px;
  width: auto;
}
.language-toggle {
  min-width: 76px;
  min-height: 36px;
  padding: 6px 10px;
  color: #444;
  background: var(--surface);
  border: 1px solid #b8bdc3;
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--font-size-ui);
}
.language-toggle:hover {
  color: var(--our);
  border-color: var(--our);
  background: var(--our-soft);
}
.language-toggle:focus-visible {
  outline: 2px solid var(--our);
  outline-offset: 3px;
}

.project-header {
  padding: 58px 0 46px;
  text-align: center;
}
.project-header h1 {
  max-width: 860px;
  margin: 0 auto 12px;
  font-size: var(--font-size-display);
  line-height: 1.14;
  letter-spacing: -.035em;
  font-weight: 650;
}
.title-line {
  display: block;
}
.project-header .tagline {
  max-width: 720px;
  margin: 0 auto 12px;
  font-size: var(--font-size-tagline);
  line-height: 1.32;
  color: #3c4147;
}
.project-header .meta {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-label);
}
.project-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 23px;
}
.project-nav a,
.project-nav-placeholder {
  padding: 7px 15px;
  color: var(--on-accent);
  background: #3d4145;
  border-radius: 20px;
  text-decoration: none;
  font-size: var(--font-size-ui);
}

/* Sticky page navigation */

.page-shell {
  display: grid;
  grid-template-columns: var(--navigation-width) minmax(0, var(--content-max-width));
  gap: var(--page-shell-gap);
  align-items: start;
  width: min(
    calc(100% - 32px),
    calc(var(--navigation-width) + var(--page-shell-gap) + var(--content-max-width))
  );
  margin: 0 auto;
}
.page-shell > .container {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.section-navigation {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  margin-top: 34px;
  padding: 4px 0 4px 12px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
}
.section-navigation-title {
  margin: 0 0 8px;
  color: var(--text);
  font-size: var(--font-size-caption);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.section-navigation-links {
  display: grid;
  gap: 2px;
}
.section-navigation-links a {
  padding: 6px 10px;
  color: var(--muted);
  border-radius: 3px;
  font-size: var(--font-size-ui);
  line-height: 1.35;
  text-decoration: none;
}
.section-navigation-links a:hover {
  color: var(--text);
  background: var(--soft);
}
.section-navigation-links a:focus-visible {
  outline: 2px solid var(--our);
  outline-offset: 1px;
}
.section-navigation-links a[aria-current="location"] {
  color: var(--our);
  background: var(--our-soft);
  font-weight: 650;
}
.section-navigation-group {
  margin-top: 7px;
  padding: 5px 10px 2px;
  color: #8a9097;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.section-navigation-links .section-navigation-subitem {
  padding-left: 18px;
}
/* Content shell and typography */

main {
  padding-bottom: 70px;
}
section {
  margin-top: 70px;
  scroll-margin-top: 18px;
}
main > section:first-child {
  margin-top: 34px;
}
section > h2 {
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: var(--font-size-section-title);
  line-height: 1.3;
  font-weight: 600;
}
p {
  margin: 0 0 14px;
}
.lead {
  font-size: var(--font-size-lead);
  line-height: 1.75;
}
.step-intro {
  font-size: var(--font-size-body);
}
.note {
  color: var(--muted);
  font-size: var(--font-size-ui);
}

/* Pipeline overview */

.pipeline-figure {
  --pipeline-node-size: calc((100% - 104px) / 5);
  --pipeline-node-height: 162px;
  margin: 0;
  padding: 24px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.pipeline-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 18px;
}
.pipeline-output-intro {
  margin: 0 0 18px;
}
.pipeline-result {
  padding: 13px 15px;
  border: 1px solid var(--border);
}
.pipeline-result:first-child {
  background: var(--phase-separation-soft);
  border-color: var(--phase-separation-border);
}
.pipeline-result.reconstruction-result {
  background: var(--phase-reconstruction-soft);
  border-color: var(--phase-reconstruction-border);
}
.pipeline-result:last-child {
  background: var(--phase-expansion-soft);
  border-color: var(--phase-expansion-border);
}
.pipeline-result strong {
  display: block;
  margin-bottom: 3px;
  font-size: var(--font-size-label);
}
.pipeline-result span span, .pipeline-result > span {
  color: var(--muted);
  font-size: var(--font-size-ui);
}
.pipeline-lane {
  display: grid;
  grid-template-columns: repeat(5, var(--pipeline-node-size));
  gap: 26px;
  align-items: stretch;
}
.pipeline-node {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: var(--pipeline-node-height);
  padding: 13px 12px;
  background: var(--surface);
  border: 1px solid #bfc5cc;
  border-radius: 3px;
}
.pipeline-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -21px;
  color: #8a8f95;
  transform: translateY(-50%);
}
.pipeline-node strong {
  display: block;
  margin-bottom: 5px;
  font-size: var(--font-size-label);
}
.pipeline-node span span, .pipeline-node > span {
  color: var(--muted);
  font-size: var(--font-size-caption);
  line-height: 1.45;
}
.pipeline-node > strong {
  order: 0;
}
.pipeline-node > span {
  order: 2;
  margin-top: 6px;
}
.model-name {
  order: 1;
  display: block;
  margin-top: 4px;
  padding: 6px 7px;
  color: #374151;
  background: #eef1f4;
  border: 1px solid #d7dce1;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.model-name + .model-name {
  margin-top: 4px;
}
.model-link {
  color: inherit;
  text-decoration-color: #a1a8b0;
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}
.model-link:hover {
  color: var(--our);
  text-decoration-color: currentColor;
}
.model-link:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--our);
  outline-offset: 2px;
}
.model-name .model-link {
  display: block;
  margin: -6px -7px;
  padding: 6px 7px;
}
.separation-stage .pipeline-node {
  background: var(--phase-separation-soft);
  border-color: var(--phase-separation-border);
}
.reconstruction-stage .pipeline-node {
  background: var(--phase-reconstruction-soft);
  border-color: var(--phase-reconstruction-border);
}
.expansion-stage .pipeline-node {
  background: var(--phase-expansion-soft);
  border-color: var(--phase-expansion-border);
}
.separation-stage .pipeline-node:not(:last-child)::after {
  color: var(--phase-separation);
}
.reconstruction-stage .pipeline-node:not(:last-child)::after {
  color: var(--phase-reconstruction);
}
.expansion-stage .pipeline-node:not(:last-child)::after {
  color: var(--phase-expansion);
}
.separation-stage .model-name {
  background: #e8edf2;
  border-color: var(--phase-separation-border);
}
.pipeline-stages {
  display: grid;
  gap: 34px;
}
.pipeline-stage {
  margin: 0;
  padding: 0;
  border: 0;
  scroll-margin-top: 0;
}
.pipeline-stage-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.separation-stage .pipeline-stage-label {
  color: var(--phase-separation);
}
.reconstruction-stage .pipeline-stage-label {
  color: var(--phase-reconstruction);
}
.expansion-stage .pipeline-stage-label {
  color: var(--phase-expansion);
}
/* Process steps and comparison panels */

.step {
  margin-top: 82px;
  scroll-margin-top: 18px;
}
.step + .step {
  padding-top: 58px;
  border-top: 1px solid var(--border);
}
.step h3 {
  margin: 0 0 14px;
  font-size: var(--font-size-step-title);
  line-height: 1.3;
}
.strategy-note {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 24px 0;
}
.strategy-note > div {
  padding: 15px 16px;
  border-left: 3px solid #aeb5bc;
  background: var(--surface-subtle);
}
.strategy-note > div:last-child {
  border-left-color: var(--our);
  background: var(--our-soft);
}
.strategy-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: var(--font-size-label);
}
.strategy-note p {
  margin: 0;
  font-size: var(--font-size-label);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}
#regeneration .step-intro + .comparison-grid {
  margin-top: 30px;
}
#transcription-with-audio-tags .step-intro + .comparison-grid {
  margin-top: 30px;
}
#regeneration .comparison-grid + .comparison-grid {
  margin-top: 20px;
}
#multilingual .comparison-grid + .comparison-grid {
  margin-top: 20px;
}
.method-panel {
  min-width: 0;
  border: 1px solid var(--border);
}
.method-panel.our {
  border-color: #86ad96;
}
.method-header {
  padding: 17px 18px;
  background: var(--baseline-soft);
  border-bottom: 1px solid var(--border);
}
.method-panel.our .method-header {
  background: var(--our-soft);
}
.method-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.our-badge {
  padding: 2px 7px;
  color: var(--on-accent);
  background: var(--our);
  border-radius: 2px;
  font-size: var(--font-size-xs);
  font-weight: 800;
}
.method-header h4 {
  margin: 0 0 5px;
  font-size: var(--font-size-card-title);
}
.source-path {
  color: #596169;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  overflow-wrap: anywhere;
}
#separation .source-path, #regeneration .source-path {
  display: none;
}
.audio-list {
  padding: 4px 18px 18px;
}
.audio-case {
  padding: 17px 0;
  border-bottom: 1px solid #e5e7e9;
}
.audio-case:last-child {
  border-bottom: 0;
}
.audio-case-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.audio-case h5 {
  margin: 0;
  font-size: var(--font-size-label);
}
.audio-format {
  color: var(--muted);
  font-size: var(--font-size-xs);
}

.sample-context {
  min-height: 48px;
  margin: 0;
  padding: 12px 18px 0;
  color: var(--muted);
  font-size: var(--font-size-ui);
  line-height: 1.45;
}
.method-panel.video-panel {
  display: flex;
  flex-direction: column;
}
.video-case {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 18px;
}
.video-case video {
  display: block;
  width: min(100%, 372px);
  margin: 0;
  aspect-ratio: 4 / 3;
  background: #111;
  border: 1px solid var(--border);
  object-fit: contain;
}

/* Single-track audio player */

.wave-player {
  display: flex;
  flex-direction: column;
}
.wave-player audio {
  display: none;
}
.wave-controls {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 72px;
  gap: 9px;
  align-items: center;
}
.wave-play {
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--on-accent);
  background: var(--baseline);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.method-panel.our .wave-play {
  background: var(--our);
}
.wave-play:disabled {
  cursor: not-allowed;
  opacity: .45;
}
.waveform {
  height: 58px;
  position: relative;
  display: flex;
  align-items: center;
  gap: .5px;
  padding: 5px 4px;
  overflow: hidden;
  background: #f3f5f6;
  border: 1px solid var(--border);
  cursor: pointer;
}
.waveform span {
  flex: 1 1 0;
  min-width: .5px;
  max-height: 100%;
  background: #a9b2bb;
  border-radius: .5px;
}
.waveform span.played {
  background: var(--baseline);
}
.method-panel.our .waveform span.played {
  background: var(--our);
}
.waveform::after,
.dual-waveform::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: var(--playhead-position, 0%);
  width: 1px;
  background: #e0a800;
  box-shadow: 0 0 3px rgba(224, 168, 0, .65);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-.5px);
}
.waveform.is-playing::after,
.dual-waveform.is-playing::after {
  opacity: 1;
}
.wave-time {
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Dual-track audio player */

.dual-track-case {
  padding-bottom: 3px;
}
.dual-track-player {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.dual-track-player audio {
  display: none;
}
.dual-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dual-play-both,
.track-mute {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--baseline);
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
}
.dual-play-both {
  min-width: 148px;
  padding: 9px 13px;
  color: var(--on-accent);
  background: var(--baseline);
  font-size: var(--font-size-ui);
}
.method-panel.our .dual-play-both {
  border-color: var(--our);
  background: var(--our);
}
.dual-play-both.is-active {
  box-shadow: 0 0 0 3px rgb(88 114 138 / 16%);
}
.method-panel.our .dual-play-both.is-active {
  box-shadow: 0 0 0 3px rgb(35 122 80 / 16%);
}
.dual-default-hint {
  color: var(--muted);
  font-size: var(--font-size-sm);
  line-height: 1.35;
}
.dual-time {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--font-size-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.phase-legend {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -1px 7px 7px 104px;
  padding: 0 0 9px;
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 650;
  line-height: 1;
}
.phase-legend::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--phase-reconstruction) 0 var(--phase-boundary-ratio, 25%),
    var(--phase-expansion) var(--phase-boundary-ratio, 25%) 100%
  );
  border-radius: 999px;
  opacity: .9;
}
.phase-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  opacity: .72;
  transition: opacity 120ms ease;
}
.phase-legend-item.phase-reconstruction {
  color: var(--phase-reconstruction);
}
.phase-legend-item.phase-expansion {
  color: var(--phase-expansion);
}
.phase-legend-item.is-current {
  font-weight: 800;
  opacity: 1;
}
.phase-swatch {
  width: 12px;
  height: 3px;
  flex: 0 0 12px;
  background: currentColor;
  border-radius: 999px;
}
.phase-transition {
  color: #9aa2ab;
  font-size: var(--font-size-xs);
  font-weight: 500;
}
.dual-tracks {
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}
.dual-track {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: stretch;
  min-height: 68px;
  background: #f8f9fa;
}
.dual-track + .dual-track {
  border-top: 1px solid var(--border);
}
.track-controls {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 7px;
}
.track-speaker-label {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  color: #3f4a57;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  white-space: nowrap;
}
.track-mute {
  width: 82px;
  height: 28px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0 8px;
  color: #56616d;
  background: rgb(255 255 255 / 82%);
  border: 1px solid #cfd5dc;
  border-radius: 6px;
  box-shadow: 0 1px 1px rgb(31 41 55 / 4%);
  font-size: var(--font-size-sm);
  line-height: 1;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.track-mute:hover {
  color: var(--baseline);
  background: #fff;
  border-color: var(--baseline);
  box-shadow: 0 2px 5px rgb(88 114 138 / 14%);
}
.method-panel.our .track-mute:hover {
  color: var(--our);
  background: #fff;
  border-color: var(--our);
  box-shadow: 0 2px 5px rgb(35 122 80 / 14%);
}
.track-mute:focus-visible {
  color: var(--baseline);
  background: rgb(88 114 138 / 14%);
  border-color: var(--baseline);
  outline: 2px solid rgb(88 114 138 / 24%);
  outline-offset: 2px;
}
.method-panel.our .track-mute:focus-visible {
  color: var(--our);
  background: rgb(35 122 80 / 14%);
  border-color: var(--our);
  outline-color: rgb(35 122 80 / 24%);
}
.track-mute.is-active {
  color: #a33f36;
  background: #fff8f7;
  border-color: rgb(163 63 54 / 36%);
  box-shadow: 0 1px 2px rgb(163 63 54 / 9%);
}
.method-panel.our .track-mute.is-active {
  color: #a33f36;
  background: rgb(163 63 54 / 9%);
}
.track-mute-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3zm11 0v6a3.5 3.5 0 0 0 0-6zm0-4v2a5.5 5.5 0 0 1 0 10v2a7.5 7.5 0 0 0 0-14z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3zm11 0v6a3.5 3.5 0 0 0 0-6zm0-4v2a5.5 5.5 0 0 1 0 10v2a7.5 7.5 0 0 0 0-14z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.track-mute.is-active .track-mute-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3zm11.3 1.1 2 1.9-2 1.9 1.4 1.5 2-2 2 2 1.4-1.5-2-1.9 2-1.9-1.4-1.5-2 2-2-2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3zm11.3 1.1 2 1.9-2 1.9 1.4 1.5 2-2 2 2 1.4-1.5-2-1.9 2-1.9-1.4-1.5-2 2-2-2z'/%3E%3C/svg%3E");
}
.track-mute-label {
  display: inline-block;
  white-space: nowrap;
}
.dual-waveform {
  grid-column: 2;
  grid-row: 1;
  height: 100%;
  min-height: 68px;
  position: relative;
  display: flex;
  align-items: center;
  gap: .5px;
  padding: 6px 7px;
  overflow: hidden;
  background: #f3f5f6;
  border-left: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 120ms ease, background-color 120ms ease;
}
.dual-waveform:hover {
  background: #edf1f3;
}
.dual-waveform span {
  flex: 1 1 0;
  min-width: .5px;
  max-height: 100%;
  background: #a9b2bb;
  border-radius: .5px;
  pointer-events: none;
}
.dual-waveform span.played {
  background: var(--baseline);
}
.method-panel.our .dual-waveform span.played {
  background: var(--our);
}
.dual-track-player.has-phases .dual-waveform {
  background: linear-gradient(
    to right,
    var(--phase-reconstruction-soft) 0 var(--phase-boundary-position, 25%),
    var(--phase-expansion-soft) var(--phase-boundary-position, 25%) 100%
  );
}
.dual-track-player.has-phases .dual-waveform:hover {
  background: linear-gradient(
    to right,
    #e7f2eb 0 var(--phase-boundary-position, 25%),
    #e8eff7 var(--phase-boundary-position, 25%) 100%
  );
}
.dual-track-player.has-phases .dual-waveform::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: var(--phase-boundary-position, 25%);
  width: 1px;
  background: rgb(93 105 120 / 24%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 36%);
  pointer-events: none;
}
.dual-track-player.has-phases .dual-waveform span.phase-reconstruction {
  background: #8db6a0;
}
.dual-track-player.has-phases .dual-waveform span.phase-expansion {
  background: #9cb2cc;
}
.dual-track-player.has-phases .dual-waveform span.phase-reconstruction.played {
  background: var(--phase-reconstruction);
}
.dual-track-player.has-phases .dual-waveform span.phase-expansion.played {
  background: var(--phase-expansion);
}
.dual-track.is-muted .dual-waveform {
  opacity: .46;
}
.dual-caption {
  width: 100%;
  height: 54px;
  margin: 9px 0 0;
}

/* Live captions */

.live-caption {
  order: -1;
  width: calc(100% - 124px);
  height: 50px;
  margin: 0 0 7px 43px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fbfdfb;
  border: 1px solid #dce9e1;
  font-size: var(--font-size-caption);
  line-height: 1.45;
  overflow: hidden;
}
.live-caption.dual-caption {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 64px;
  margin: 9px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.caption-row {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.caption-row + .caption-row {
  margin-top: 3px;
}
.caption-speaker {
  display: inline-block;
  min-width: 74px;
  color: var(--our);
  font-weight: 750;
}
.caption-word {
  margin-right: .28em;
  color: #767c81;
  white-space: normal;
}
.caption-audio-tag {
  display: inline-block;
  margin: 0 .32em .12em 0;
  padding: .06em .38em;
  color: #6b5316;
  background: #fff0b3;
  border: 1px solid #dfc464;
  border-radius: 3px;
  font-size: .92em;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}
.caption-row.has-audio-tags .caption-word {
  display: inline-block;
}
.caption-word.active {
  color: #111;
  background: var(--active);
  border-radius: 2px;
}

/* Findings and footer */

.finding-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.finding {
  padding: 12px 13px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: var(--font-size-ui);
}
.finding strong {
  display: block;
  margin-bottom: 3px;
}

/* Citation */

.citation-card {
  overflow: hidden;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.citation-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 0;
  font-size: var(--font-size-ui);
}
.citation-format {
  margin-right: auto;
  color: var(--muted);
  font-weight: 600;
}
.citation-copy-status {
  color: var(--muted);
}
.citation-copy {
  padding: 4px 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}
.citation-copy:hover {
  background: var(--soft);
}
.citation-copy:focus-visible {
  outline: 2px solid var(--our);
  outline-offset: 2px;
}
.citation-code {
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: var(--font-size-ui);
  line-height: 1.75;
}
.citation-code code {
  font: inherit;
}

/* References */

.reference-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: reference;
}
.reference-item {
  position: relative;
  margin-bottom: 11px;
  padding-left: 2.4em;
  counter-increment: reference;
  font-size: var(--font-size-body);
  line-height: 1.65;
}
.reference-item::before {
  position: absolute;
  left: 0;
  content: "[" counter(reference) "]";
  font-variant-numeric: tabular-nums;
}
.reference-item a {
  color: #315f85;
  text-underline-offset: .16em;
}
.reference-item a:hover {
  color: var(--our);
}
.reference-item a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--our);
  outline-offset: 2px;
}

footer {
  padding: 28px 0;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: var(--font-size-caption);
  text-align: center;
}

/* Responsive layout */

@media (min-width: 761px) {
  .title-line {
    white-space: nowrap;
  }
}
@media (max-width: 1020px) {
  .pipeline-lane {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-content: stretch;
  }
  .pipeline-node {
    width: 100%;
    min-height: 156px;
    aspect-ratio: auto;
  }
  .pipeline-node:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: 50%;
    bottom: -22px;
    transform: translateX(50%);
  }
}
@media (max-width: 1180px) {
  .page-shell {
    display: block;
    width: 100%;
  }
  .page-shell > .container {
    width: min(calc(100% - 32px), var(--content-max-width));
    margin: 0 auto;
  }
  .section-navigation {
    position: sticky;
    top: 0;
    z-index: 20;
    max-height: none;
    margin: 0;
    padding: 8px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-left: 0;
    backdrop-filter: blur(8px);
    scrollbar-width: none;
  }
  .section-navigation::-webkit-scrollbar {
    display: none;
  }
  .section-navigation-title,
  .section-navigation-group {
    display: none;
  }
  .section-navigation-links {
    display: flex;
    width: max-content;
    gap: 4px;
  }
  .section-navigation-links a,
  .section-navigation-links .section-navigation-subitem {
    padding: 6px 10px;
    white-space: nowrap;
  }
  section,
  .step {
    scroll-margin-top: 72px;
  }
}
@media (max-width: 760px) {
  .project-header {
    padding-top: 38px;
  }
  .project-header h1 {
    font-size: var(--font-size-display-mobile);
  }
  section {
    margin-top: 52px;
  }
  .comparison-grid, .strategy-note, .finding-list, .pipeline-results {
    grid-template-columns: 1fr;
  }
  .wave-controls {
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .wave-time {
    grid-column: 2;
    text-align: left;
  }
  .live-caption {
    width: calc(100% - 43px);
  }
  .dual-toolbar {
    flex-wrap: wrap;
  }
  .dual-time {
    width: 100%;
    margin-left: 0;
  }
  .phase-legend {
    flex-wrap: wrap;
    gap: 5px;
    margin-right: 0;
    margin-left: 0;
  }
  .phase-transition {
    display: none;
  }
  .dual-track {
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 66px;
  }
  .track-controls {
    gap: 3px;
    padding: 7px 6px;
  }
  .track-speaker-label {
    padding: 7px 4px 2px;
    font-size: var(--font-size-sm);
  }
  .track-mute {
    width: 80px;
    height: 28px;
    padding-inline: 7px;
  }
  .dual-waveform {
    min-height: 66px;
  }
  .dual-caption {
    width: 100%;
  }
}
