/* Modern CSS Variables for consistent theming */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --accent-color: #0ea5e9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --background-primary: #ffffff;
  --background-secondary: #f8fafc;
  --background-accent: #f1f5f9;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-subtle: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  background-color: var(--background-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* Modern Button Styles */
.button {
  border-radius: var(--border-radius) !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
  border: 2px solid transparent !important;
  position: relative;
  overflow: hidden;
}

.button.is-dark {
  background: var(--text-primary) !important;
  border: none !important;
  color: white !important;
  box-shadow: var(--shadow-md);
}

.button.is-dark:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--primary-color) !important;
}

.button.is-dark:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.footer .icon-link {
    font-size: 25px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer .icon-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.link-block a {
    margin: 8px 4px;
}

.dnerf {
  font-variant: small-caps;
}


/* Hero Section Modernization */
.hero {
  position: relative;
  overflow: hidden;
}

.hero.is-light {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.hero-body {
  padding: 4rem 1.5rem;
}

.teaser .hero-body {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.teaser {
  font-family: 'Inter', sans-serif;
}


/* Publication Content Styling */
.publication-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    margin-bottom: 2rem !important;
    line-height: 1.1 !important;
}

.publication-banner {
  max-height: 70vh;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin: 2rem 0;
}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-lg);
}

.publication-header .hero-body {
  padding: 6rem 1.5rem 4rem;
}

.publication-authors {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.publication-venue {
    color: var(--text-secondary);
    width: fit-content;
    font-weight: 600;
    background: var(--background-accent);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    display: inline-block;
}

.publication-awards {
    color: #ef4444;
    width: fit-content;
    font-weight: 700;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid #ef4444;
    margin-top: 1rem;
}

.publication-authors a {
   color: var(--primary-color) !important;
   text-decoration: none;
   font-weight: 600;
   transition: var(--transition);
   position: relative;
}

.publication-authors a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--gradient-accent);
    transition: var(--transition);
}

.publication-authors a:hover::after {
    width: 100%;
}

.publication-authors a:hover {
    color: var(--primary-hover) !important;
}

.author-block {
  display: inline-block;
  margin-right: 0.5rem;
}

.publication-banner img {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.publication-banner img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* Modern Video and Carousel Styling */
.publication-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.publication-video:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.publication-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-lg);
}

.publication-body img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.publication-body img:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.results-carousel {
  overflow: hidden;
  padding: 1rem 0;
}

.results-carousel .item {
  margin: 1rem;
  overflow: hidden;
  padding: 1.5rem;
  font-size: 0;
  background: var(--background-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.results-carousel .item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.results-carousel .item img,
.results-carousel video {
  margin: 0;
  border-radius: var(--border-radius);
  width: 100%;
  height: auto;
}

.results-carousel .subtitle {
  font-size: 1rem !important;
  color: var(--text-secondary);
  margin-top: 1rem;
  font-weight: 500;
}

/* Pagination and Misc Improvements */
.slider-pagination .slider-page {
  background: var(--primary-color);
  border-radius: 50%;
  transition: var(--transition);
}

.slider-pagination .slider-page.is-active {
  background: var(--primary-hover);
  transform: scale(1.2);
}

.eql-cntrb { 
  font-size: 0.875rem;
  color: var(--text-light);
  font-style: italic;
}

/* Section Titles */
.title.is-3 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  color: var(--text-primary);
  margin-bottom: 2rem !important;
  position: relative;
  padding-bottom: 1rem;
}

.title.is-3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

/* Content Improvements */
.content.has-text-justified {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.content.has-text-justified p {
  margin-bottom: 1.5rem;
}

/* Footer Improvements */
.footer {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem;
}

.footer .content {
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* BibTeX Styling */
pre {
  background: var(--background-accent) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  padding: 1.5rem !important;
  font-size: 0.9rem !important;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

code {
  background: var(--background-accent) !important;
  color: var(--text-primary) !important;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace !important;
}

/* BibTeX Section Improvements */
.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.copy-bibtex-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-bibtex-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.copy-bibtex-btn.copied {
  background: #10b981;
}

.copy-bibtex-btn.copied .copy-text::after {
  content: "ied!";
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
}

.scroll-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}


/* More Works Dropdown */
.more-works-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
}

.more-works-btn {
  background: var(--background-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.more-works-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--background-secondary);
  border-color: var(--primary-color);
}

.more-works-btn .dropdown-arrow {
  transition: var(--transition);
  font-size: 0.8rem;
}

.more-works-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  max-height: 70vh;
  overflow-y: auto;
}

.more-works-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--background-accent);
  color: var(--text-primary);
}

.works-list {
  padding: 1rem;
}

.work-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  margin-bottom: 0.5rem;
}

.work-item:hover {
  background: var(--background-accent);
  transform: translateX(4px);
}

.work-info h5 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.work-info p {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.work-venue {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
}

.work-item .fas {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}


/* Mobile Responsive Improvements */
@media screen and (max-width: 768px) {
  .hero-body {
    padding: 2rem 1rem;
  }
  
  .publication-header .hero-body {
    padding: 3rem 1rem 2rem;
  }
  
  .publication-title {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
  }
  
  .publication-authors {
    font-size: 1rem !important;
  }
  
  .button {
    margin: 0.25rem !important;
    font-size: 0.875rem !important;
    padding: 0.75rem 1rem !important;
  }
  
  .more-works-container {
    bottom: 2rem;
    right: 1rem;
    top: auto;
  }
  
  .more-works-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  
  .more-works-dropdown {
    width: calc(100vw - 2rem);
    right: -1rem;
    bottom: calc(100% + 0.5rem);
    top: auto;
  }
  
  .results-carousel .item {
    margin: 0.5rem;
    padding: 1rem;
  }
  
  .teaser .hero-body {
    padding: 1rem;
  }
  
  .content.has-text-justified {
    font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .publication-title {
    font-size: 2rem !important;
  }
  
  .hero-body {
    padding: 1.5rem 0.75rem;
  }
  
  .more-works-container {
    position: fixed;
    bottom: 2rem;
    right: 1rem;
    z-index: 1000;
  }
  
  .more-works-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .more-works-dropdown {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    width: calc(100vw - 2rem);
    max-width: 90vw;
  }
  
  .link-block {
    display: block;
    margin-bottom: 0.5rem;
  }
  
  .button {
    width: 100%;
    justify-content: center;
  }
}

/* Tablet Responsive */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .hero-body {
    padding: 3rem 2rem;
  }
  
  .publication-header .hero-body {
    padding: 4rem 2rem 3rem;
  }
}

/* Animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero, .section {
  animation: fadeInUp 0.6s ease-out;
}

/* Improved focus states for accessibility */
.button:focus,
.related-works-btn:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}


/* ==========================================================================
   MQAScore demo styles
   ========================================================================== */

.mono {
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 0.9em;
  background: var(--background-accent);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  color: var(--text-primary);
}

.publication-venue-wrap {
  margin-bottom: 1.5rem;
}

.formula {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--background-accent);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem auto !important;
  overflow-x: auto;
}

/* Stacked fraction (numerator over a bar over denominator) */
.frac-eq {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  vertical-align: middle;
}
.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  text-align: center;
}
.frac-num { padding: 0 0.5rem 0.15rem; }
.frac-den {
  padding: 0.15rem 0.5rem 0;
  border-top: 2px solid currentColor;
}

/* Dimension chips */
.dim-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.dim-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.dim-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.dim-chip i {
  color: var(--primary-color);
}

/* Demo grid */
.demo-grid {
  /* Block (not flex): a block child is always clamped to this width, so the wide
     score tables scroll inside their own box instead of stretching the whole card
     past the viewport on mobile. (A flex-column item would not clamp here.) */
  display: block;
  max-width: 1000px;
  margin: 0 auto;
}

.demo-pair {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  text-align: left;
  transition: var(--transition);
}

.demo-pair:hover {
  box-shadow: var(--shadow-lg);
}

.pair-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pair-id {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.pair-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pair-prompt {
  font-size: 0.85rem;
  color: var(--text-light);
  font-family: 'SF Mono', 'Monaco', monospace;
}

.pair-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.key-tag, .opp-tag {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.key-tag {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: var(--primary-hover);
  border: 1px solid #c7d2fe;
}

.opp-tag {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.pair-caption {
  position: relative;
  background: var(--background-secondary);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.caption-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

/* Audio A/B */
.audio-ab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.audio-side {
  background: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
}

.audio-side-key {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color) inset;
}

.audio-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.audio-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--text-primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.audio-side-key .audio-tag {
  background: var(--primary-color);
}

.audio-sys {
  font-weight: 600;
  color: var(--text-secondary);
}

.audio-side audio {
  width: 100%;
  height: 40px;
}

.audio-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.audio-meta b {
  color: var(--text-primary);
}

/* Score panels */
.score-panels {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: 1.25rem;
  align-items: start;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.panel-title .panel-note {
  font-weight: 500;
  color: var(--text-light);
}

.panel-title.tied::before,
.panel-title.reveal::before {
  content: '';
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  margin-right: 0.4rem;
}

.panel-title.tied::before { background: var(--text-light); }
.panel-title.reveal::before { background: var(--primary-color); }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Overall (tied) table */
.overall-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.overall-table th,
.overall-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
  white-space: nowrap;
}

.overall-table thead th {
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.overall-table thead th:first-child,
.overall-table .score-name {
  text-align: left;
}

.overall-table .score-name {
  font-weight: 500;
  color: var(--text-secondary);
}

.overall-table td {
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  font-weight: 600;
}

/* MQAScore per-attribute table */
.mqa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 340px; /* MusicEval 3-col table; .sota-matrix overrides to 620 (scrolls) */
}

.mqa-table thead th {
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.4rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.mqa-table .mqa-model {
  color: var(--text-secondary);
  border-left: 1px solid var(--border-color);
}

.mqa-subhead th {
  font-size: 0.68rem;
  padding-top: 0;
}

.mqa-tag-col {
  text-align: left !important;
  min-width: 130px;
}

.mqa-table tbody th.mqa-tag-col {
  padding: 0.4rem 0.5rem 0.4rem 0;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.mqa-attr {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
  font-weight: 700;
}

.mqa-concept {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
}

.mqa-key-flag {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-hover);
  background: #e0e7ff;
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
}

.mqa-cell {
  text-align: center;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.mqa-num {
  display: block;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.mqa-bar {
  display: block;
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin-top: 3px;
  overflow: hidden;
}

.mqa-bar-fill {
  display: block;
  height: 100%;
  background: var(--text-light);
  border-radius: 2px;
}

.mqa-cell.win .mqa-num { color: #047857; font-weight: 800; }
.mqa-cell.win .mqa-bar-fill { background: #10b981; }
.mqa-cell.win { background: rgba(16, 185, 129, 0.08); }

.mqa-cell.lose .mqa-num { color: var(--text-light); }
.mqa-cell.lose .mqa-bar-fill { background: #cbd5e1; }

.mqa-key-row th.mqa-tag-col,
.mqa-key-row .mqa-cell {
  background: rgba(37, 99, 235, 0.06);
}

.mqa-key-row .mqa-cell.win { background: rgba(16, 185, 129, 0.14); }

.mqa-mean-row th.mqa-tag-col,
.mqa-mean-row .mqa-cell {
  border-top: 2px solid var(--border-color);
  border-bottom: none;
}

.mqa-mean-row .mqa-attr { color: var(--primary-color); }

/* Coming soon placeholder */
.coming-soon {
  background: var(--background-secondary);
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.coming-soon i {
  font-size: 2.5rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.coming-soon p {
  margin: 0.25rem 0;
}

.demo-error {
  color: #b91c1c;
  text-align: center;
  padding: 2rem;
}

/* Demo mobile */
@media screen and (max-width: 768px) {
  .demo-pair { padding: 1.1rem; }
  .audio-ab { grid-template-columns: 1fr; }
  .score-panels { grid-template-columns: 1fr; }
}

/* ==========================================================================
   SOTA generators demo
   ========================================================================== */

/* Per-dimension concept colors (translucent for a soft, layered look) */
.dim-genre      { --dim: 124, 58, 237; }   /* violet */
.dim-instrument { --dim: 13, 148, 136; }   /* teal   */
.dim-mood_theme { --dim: 217, 119, 6;  }   /* amber  */
.dim-vocal      { --dim: 225, 29, 72;  }   /* rose   */
.dim-context    { --dim: 2, 132, 199;  }   /* sky    */

/* Inline highlighted concept inside a caption */
.concept {
  background: rgba(var(--dim), 0.16);
  color: rgb(var(--dim));
  box-shadow: inset 0 -0.35em 0 rgba(var(--dim), 0.10);
  padding: 0.02em 0.28em;
  border-radius: 5px;
  font-weight: 600;
  transition: background 0.2s ease;
}
.concept:hover { background: rgba(var(--dim), 0.28); }

/* Pill chip (legend, unlocated concepts, per-attribute row labels) */
.concept-chip {
  display: inline-block;
  background: rgba(var(--dim), 0.14);
  color: rgb(var(--dim));
  border: 1px solid rgba(var(--dim), 0.28);
  border-radius: 999px;
  padding: 0.12rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.extract-note {
  font-size: 0.9rem !important;
  color: var(--text-light) !important;
  font-style: italic;
  margin-top: 0.5rem !important;
}
.extract-note a { color: var(--primary-color); }

.dim-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 1000px;
  margin: 0 auto 1.75rem;
  padding: 0.9rem 1rem;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}
.dim-legend-label { font-weight: 600; color: var(--text-secondary); margin-right: 0.25rem; }

.sota-dataset-title {
  max-width: 1000px;
  margin: 2.5rem auto 1rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.sota-dataset-note { font-size: 0.85rem; font-weight: 500; color: var(--text-light); }

.sota-prompt {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  text-align: left;
}
.sota-prompt:hover { box-shadow: var(--shadow-lg); }

.tie-tag {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--background-accent);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.sota-caption {
  background: var(--background-secondary);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.sota-caption .caption-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.unlocated {
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.unlocated-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sota-sub {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin: 0 0 0.6rem;
}

/* Audio grid: 5 models */
.sota-audio-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.sota-audio-cell {
  background: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem;
}
.sota-audio-cell.is-gt {
  background: var(--background-accent);
  border-style: dashed;
}
.sota-model-name {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.gt-tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.02rem 0.3rem;
  margin-left: 0.25rem;
}
.sota-audio-cell audio { width: 100%; height: 36px; }

/* Panels */
.sota-panels { display: flex; flex-direction: column; gap: 1.5rem; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.panel-head .panel-title { margin-bottom: 0; }

/* ALM toggle */
.alm-toggle {
  display: inline-flex;
  background: var(--background-accent);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.15rem;
}
.alm-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}
.alm-btn:hover { color: var(--text-primary); }
.alm-btn.active {
  background: var(--primary-color);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* Per-attribute matrix reuses .mqa-table; concept-chip labels in first column */
.sota-matrix { min-width: 620px; }
.sota-matrix .mqa-tag-col { min-width: 150px; }
.sota-matrix .gt-col { color: var(--text-light); }
.mqa-cell.gt-cell { background: var(--background-accent); }
.mqa-cell.gt-cell .mqa-num { color: var(--text-light); font-weight: 600; }
.mqa-cell.gt-cell .mqa-bar-fill { background: #cbd5e1; }
.mqa-mean-label { font-weight: 800; color: var(--primary-color); font-size: 0.8rem; }

/* Model summary table */
.sota-summary {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 640px;
}
.sota-summary th, .sota-summary td {
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sota-summary thead th {
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}
.sota-summary .grp { border-left: 1px solid var(--border-color); }
.sota-summary .sum-subhead th { font-size: 0.68rem; padding-top: 0; }
.sota-summary .sum-model-col { text-align: left; min-width: 130px; }
.sota-summary tbody th.sum-model-col { font-weight: 600; color: var(--text-primary); }
.sota-summary tbody td { color: var(--text-secondary); font-weight: 600; }
.sota-summary tr.gt-row { background: var(--background-accent); }
.sota-summary tr.gt-row th, .sota-summary tr.gt-row td { color: var(--text-light); }

/* SOTA mobile */
@media screen and (max-width: 768px) {
  .sota-prompt { padding: 1.1rem; }
  .sota-audio-grid { grid-template-columns: 1fr 1fr; }
  .sota-caption .caption-body { font-size: 1rem; line-height: 1.8; }
}
@media screen and (max-width: 480px) {
  .sota-audio-grid { grid-template-columns: 1fr; }
}

/* Overflow fix: let the wide score tables scroll inside their own box instead of
   forcing the whole card wider than the screen (flexbox min-width:auto default). */
.demo-grid > *,
.deck, .deck-viewport,
.sota-prompt, .sota-panels, .score-panel, .table-scroll { min-width: 0; }
.deck, .deck-viewport, .sota-prompt { max-width: 100%; }

/* Bulma's .hero is a flex column, so its .container becomes a flex item that (with
   the default min-width:auto) won't shrink below its content and overflows on mobile,
   which .hero{overflow:hidden} then clips. These sections use .hero only for the light
   background (no hero-body), so render them as plain blocks — the container then clamps
   to the viewport and the wide tables scroll inside their own box. */
.section.hero.is-light { display: block; }
.hero .container { min-width: 0; }

/* MusicEval A/B audio grid: two players side by side, stacking on narrow screens */
.sota-audio-grid.ab2 { grid-template-columns: 1fr 1fr; max-width: 640px; }
@media screen and (max-width: 560px) {
  .sota-audio-grid.ab2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Paged deck (one item at a time + selector / arrows / swipe)
   ========================================================================== */
.deck {
  max-width: 1000px;
  margin: 0 auto;
  outline: none;
}
.deck-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}
.deck-arrow {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--background-primary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.deck-arrow:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.deck-select-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.deck-select-wrap::after {
  content: "\f078"; /* chevron-down */
  font-family: "Font Awesome 5 Free", "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-light);
  font-size: 0.75rem;
}
.deck-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.6rem 2.25rem 0.6rem 0.9rem;
  cursor: pointer;
  text-overflow: ellipsis;
  transition: var(--transition);
}
.deck-select:hover { border-color: var(--primary-color); }
.deck-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.deck-counter {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 3.5rem;
  text-align: center;
}
.deck-viewport {
  animation: fadeInUp 0.35s ease-out;
}
/* re-trigger the fade each time a new card is inserted */
.deck-viewport > * { animation: fadeInUp 0.35s ease-out; }

@media screen and (max-width: 768px) {
  .deck-nav { gap: 0.5rem; padding: 0.6rem; }
  .deck-arrow { width: 2.2rem; height: 2.2rem; }
  .deck-select { font-size: 0.82rem; padding: 0.5rem 2rem 0.5rem 0.75rem; }
  .deck-counter { font-size: 0.78rem; min-width: 3rem; }
}

/* Print styles */
@media print {
  .more-works-container {
    display: none;
  }
  
  .hero, .section {
    animation: none;
  }
  
  .button {
    background: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
  }
}



