:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #14151a;
  --muted: #5b6173;
  --border: #e1e4ec;
  --accent: #3655ff;
  --accent-muted: rgba(54, 85, 255, 0.08);
  --card-shadow: 0 1.125rem 2.8125rem rgba(20, 30, 60, 0.12);
  --max-width: 60rem;
  font-size: clamp(5.333px, calc(100vw / 60), 16px);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.6;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6ff 40%, #ffffff 100%);
  color: var(--text);
  font-family: var(--font, "Plus Jakarta Sans", system-ui);
}

a {
  color: var(--accent);
  text-decoration: none;
}

main {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto 6rem;
}

.site-header {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 0.0625rem solid var(--border);
}

.logo {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  gap: 1.125rem;
  font-size: 0.95rem;
}

.hero {
  width: min(77rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 3.5rem;
  text-align: left;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
  text-align: center;
}

.eyebrow {
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.625rem;
  word-break: normal;
}

.hero h1 {
  font-size: clamp(1.5rem, 2.4vw, 2.0rem);
  line-height: 1.25;
  margin: 0.625rem 0 0.75rem;
  word-break: normal;
  hyphens: auto;
}

.nowrap {
  white-space: nowrap;
}

.hero-title {
  position: relative;
  display: inline-block;
  padding-left: 0;
}

.hero-title .title-brand {
  display: none;
}

.artistic-brand {
  font-family: "Space Grotesk", "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  background: linear-gradient(135deg, #b8ff03e2 0%, #2da8efb9 50%, #566fec 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
  /* Slight letter spacing for artistic feel */
  letter-spacing: -0.02em;
  font-size: 1.4em;
  line-height: 1;
  margin-right: 0.05em;
}

.hero-title .title-main {
  position: relative;
  z-index: 1;
  display: inline;
}

@media (max-width: 40rem) {
  .hero-title {
    padding-left: 0;
  }

  .hero-title .title-brand {
    position: static;
    transform: none;
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.95em;
    opacity: 0.9;
  }
}

.authors-line {
  margin: 0;
  font-weight: 500;
  font-size: 0.95rem;
}

.affiliations {
  margin: 0.375rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.lead {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 auto 1.75rem;
  max-width: 40rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-tags span {
  padding: 0.5rem 1rem;
  border-radius: 62.4375rem;
  border: 0.0625rem solid var(--border);
  background: rgba(54, 85, 255, 0.05);
  font-size: 0.9rem;
}

.hero-figure {
  margin: 0;
  max-width: 100%;
  width: 100%;
}

.figure-frame {
  background: #fff;
  border-radius: 1.375rem;
  border: 0.0625rem solid var(--border);
  padding: 0.75rem;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.figure-frame img {
  width: 100%;
  border-radius: 1rem;
  display: block;
}

.figure-frame video {
  width: 100%;
  border-radius: 1rem;
  display: block;
  object-fit: contain;
  background: #000;
}

.youtube-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 1rem;
  background: #000;
}

.youtube-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 1rem;
}

.overview-video-container {
  margin: 1.75rem 0 1.5rem;
  max-width: 56.25rem; /* 900px equivalent */
  margin-left: auto;
  margin-right: auto;
  background-color: rgba(248, 249, 250, 1);
  border-radius: 1.5rem;
  border: 0.0625rem solid #e8eaed;
  padding: 1.5rem 1.75rem 1.75rem;
}

.overview-video-container .youtube-container {
  box-shadow: var(--card-shadow);
}

.overview-video-container h2 {
  margin-top: 0;
}

.video-chapters {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0 1rem;
  flex-wrap: wrap;
}

.chapter-btn {
  padding: 0.5rem 0.875rem;
  border: 3px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  color: #fff;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  background-color: #1a73e8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex: 0 1 auto;
  min-width: fit-content;
}

.chapter-btn:hover:not(.selected) {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  filter: brightness(110%);
  transform: translateY(-1px);
}

.chapter-btn.selected {
  background-color: #fff;
  border-color: #1a73e8;
  color: #1a73e8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.chapter-btn:active {
  transform: translateY(0);
}

.overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mute-button {
  background-color: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.12);
  font-size: 0.95rem;
}

.mute-button:hover {
  background-color: #2d4ae6;
}


.hero-figure figcaption {
  margin-top: 0.625rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.cta-group {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-top: 1.125rem;
  justify-content: center;
}

.resource-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.85rem;
  background: #f3f6ff;
  color: #2c3e50;
  border: 0.0625rem solid rgba(54, 85, 255, 0.15);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 0.125rem 0.25rem rgba(54, 85, 255, 0.08);
  flex: 0 1 auto;
}

.resource-btn:hover {
  background: #e8edff;
  color: #1a252f;
  border-color: rgba(54, 85, 255, 0.25);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.25rem 0.75rem rgba(54, 85, 255, 0.15);
}

.resource-btn .btn-icon svg {
  color: #2c3e50;
}

.resource-btn:hover .btn-icon svg {
  color: #1a252f;
}

.resource-btn .btn-icon i {
  font-size: 1.1rem;
  color: #2c3e50;
}

.resource-btn:hover .btn-icon i {
  color: #1a252f;
}

.resource-btn .btn-icon {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.resource-btn .btn-icon svg {
  width: 100%;
  height: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 62.4375rem;
  font-weight: 600;
  border: 0.0625rem solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn.secondary {
  border-color: var(--border);
  color: var(--text);
  background: #fff;
}

.btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
  border-bottom: 0.0625rem solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section h2 {
  margin-top: 0;
  font-size: 1.6rem;
}

.tldr-box {
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(54, 85, 255, 0.06) 0%, rgba(54, 85, 255, 0.01) 100%);
  border: 1px solid rgba(54, 85, 255, 0.12);
  border-left: 4px solid var(--accent);
  border-radius: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: 0 4px 20px rgba(54, 85, 255, 0.06);
}

.tldr-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--accent);
  margin-top: 0.15rem;
}

.tldr-content {
  flex: 1;
}

.tldr-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.tldr-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  text-wrap: pretty;
}

.tldr-text strong {
  color: var(--text);
  font-weight: 650;
}

.tldr-text strong.highlight {
  color: var(--accent);
}

.takeaways-box {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.12);
  background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.1), transparent 60%),
    #fffaf3;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.08);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s cubic-bezier(0.16, 0.84, 0.44, 1), transform 0.45s cubic-bezier(0.16, 0.84, 0.44, 1);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.takeaways-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #c97b00;
  margin-top: 0.15rem;
}

.takeaways-content {
  flex: 1;
}

.takeaways-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c97b00;
  margin-bottom: 0.4rem;
}

.takeaways-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.takeaways-list li {
  opacity: 0;
  transform: translateX(-8px);
}

.takeaways-list li + li {
  margin-top: 0.4rem;
}

.takeaways-box.visible {
  opacity: 1;
  transform: translateY(0);
}

.takeaways-box.visible .takeaways-list li {
  position: relative;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.takeaways-box.visible .takeaways-list li:nth-child(1) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.05s;
}

.takeaways-box.visible .takeaways-list li:nth-child(2) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.18s;
}

.takeaways-box.visible .takeaways-list li:nth-child(3) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.31s;
}

.motivation {
  text-align: center;
}

.motivation-inner {
  margin-top: 1.5rem;
}

.motivation-question {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.motivation-quote {
  font-size: 1.1rem;
  color: var(--muted);
  font-style: italic;
  margin: 0.5rem 0;
}

.motivation-attrib {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.motivation-timeline {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.motivation-timeline-item {
  flex: 1 1 0;
  text-align: center;
  opacity: 0;
  transform: translateX(-18px);
  position: relative;
}

.motivation-timeline-item img {
  width: 100%;
  height: 4.5rem;
  display: block;
  object-fit: contain;
}

.motivation-timeline-label {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.motivation-timeline.visible .motivation-timeline-item {
  transition: opacity 0.45s cubic-bezier(0.16, 0.84, 0.44, 1), transform 0.45s cubic-bezier(0.16, 0.84, 0.44, 1);
  opacity: 1;
  transform: translateX(0);
}

.motivation-timeline.visible .motivation-timeline-item:nth-child(1) {
  transition-delay: 0s;
}

.motivation-timeline.visible .motivation-timeline-item:nth-child(2) {
  transition-delay: 0.25s;
}

.motivation-timeline.visible .motivation-timeline-item:nth-child(3) {
  transition-delay: 0.5s;
}

.motivation-timeline.visible .motivation-timeline-item:nth-child(4) {
  transition-delay: 0.75s;
}

/* simple axis under the timeline */
.motivation-axis {
  margin-top: 0.9rem;
  position: relative;
  height: 2.1rem;
}

.motivation-axis-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  height: 5px;
  background:
    radial-gradient(circle at 0% 50%, rgba(255, 255, 255, 0.9), transparent 55%),
    linear-gradient(90deg, #f9fafb, #d1d5db, #4b5563);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(15, 23, 42, 0.3);
  transition: transform 0.8s ease-out;
}

.motivation-axis-arrow {
  position: absolute;
  right: -0.7rem;
  top: 50%;
  transform: translate(-12px, -50%);
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 16px solid rgba(31, 41, 55, 0.96);
  filter: drop-shadow(0 0 6px rgba(15, 23, 42, 0.65));
  opacity: 0;
  transition: transform 0.8s ease-out, opacity 0.5s ease-out 0.2s;
}

.motivation-axis-label {
  position: absolute;
  top: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.motivation-axis-label-left {
  left: 0;
  transform: translateY(-0.15rem);
}

.motivation-axis-label-right {
  right: 0;
  transform: translateY(-0.15rem);
}

/* anchor dots under each stage */
.motivation-timeline-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1.35rem;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid rgba(31, 41, 55, 0.85);
  box-shadow: 0 0 5px rgba(15, 23, 42, 0.4);
}

.motivation-axis.visible .motivation-axis-line {
  transform: translateY(-50%) scaleX(1);
}

.motivation-axis.visible .motivation-axis-arrow {
  transform: translate(0, -50%);
  opacity: 1;
}

.motivation-phase-cards {
  margin-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.motivation-phase-card {
  flex: 1 1 0;
  padding: 0.7rem 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(249, 250, 251, 0.9);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  text-align: left;
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.45s cubic-bezier(0.16, 0.84, 0.44, 1), transform 0.45s cubic-bezier(0.16, 0.84, 0.44, 1);
}

.motivation-phase-title {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.motivation-phase-title-l1 {
  color: #7c3aed; /* soft purple */
}

.motivation-phase-title-l2 {
  color: #f59e0b; /* amber / yellow */
}

.motivation-phase-title-l3 {
  color: #16a34a; /* green */
}

.motivation-phase-title-l4 {
  color: #2563eb; /* blue */
}

.motivation-phase-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.motivation-phase-cards.visible .motivation-phase-card {
  opacity: 1;
  transform: translateX(0);
}

.motivation-phase-cards.visible .motivation-phase-card:nth-child(1) {
  transition-delay: 0s;
}

.motivation-phase-cards.visible .motivation-phase-card:nth-child(2) {
  transition-delay: 0.25s;
}

.motivation-phase-cards.visible .motivation-phase-card:nth-child(3) {
  transition-delay: 0.5s;
}

.motivation-phase-cards.visible .motivation-phase-card:nth-child(4) {
  transition-delay: 0.75s;
}

.highlight-taxonomy {
  color: #8B5CF6;
}

.highlight-bench {
  color: #F59E0B;
}

.highlight-study {
  color: #3B82F6;
}

.region-a {
  color: #16a34a; /* green */
}

.region-b {
  color: #f59e0b; /* yellow/amber */
}

.region-c {
  color: #2563eb; /* blue */
}

.key-points {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
}

.pillars h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.pillar-card {
  background: #fff;
  border-radius: 1.125rem;
  border: 0.0625rem solid var(--border);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pillar-card .figure-frame {
  width: 100%;
  background: #f8f9fa;
  border-radius: 1rem;
  overflow: hidden;
}

.pillar-card .figure-frame img,
.pillar-card .figure-frame video {
  width: 100%;
  height: auto;
  display: block;
}

.pillar-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pillar-list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.pillar-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.pillar-list li strong {
  color: var(--text);
  font-weight: 600;
}

.interactive-tree p {
  max-width: 40rem;
}

.interaction-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.interaction-hint::before {
  content: "👆";
  font-size: 1rem;
}

.interactive-layout {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.node-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 0 0 16.25rem;
}

.node-btn {
  border: 0.0625rem solid var(--border);
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.node-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(54, 85, 255, 0.08);
}

.node-detail {
  flex: 1 1 20rem;
  border: 0.0625rem solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.node-detail h3 {
  margin-top: 0;
}

.node-detail ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.node-detail li + li {
  margin-top: 0.5rem;
}

.taxonomy table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 0.0625rem solid var(--border);
  border-radius: 0.625rem;
  overflow: hidden;
}

/* Benchmark Table Styles */
.benchmark .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.75rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  background: var(--panel);
}

.benchmark table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 46rem;
  margin: 0;
  border: none;
}

.benchmark .table-legend {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.benchmark .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.benchmark .legend-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.25rem;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

/* Header */
.benchmark thead th {
  position: sticky;
  top: 0;
  background: #f8f9fb;
  z-index: 1;
  padding: 1rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Cells */
.benchmark td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
}

/* Model Name Column */
.benchmark th:first-child,
.benchmark td:first-child {
  width: 22%;
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  text-align: left;
}

/* Avg Column Highlight */
.benchmark th:nth-child(2),
.benchmark td:nth-child(2) {
  background: rgba(54, 85, 255, 0.04);
  color: var(--accent);
  font-weight: 700;
  text-align: center;
}

/* Other Number Columns */
.benchmark th:not(:first-child):not(:nth-child(2)),
.benchmark td:not(:first-child):not(:nth-child(2)) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Row Hover */
.benchmark tbody tr {
  transition: background-color 0.15s ease;
}

.benchmark tbody tr:hover {
  background-color: rgba(54, 85, 255, 0.03) !important;
}

/* Open/Closed Models */
.benchmark tbody tr.model-open {
  background: linear-gradient(90deg, rgba(54, 85, 255, 0.06) 0%, transparent 100%);
}

.benchmark tbody tr.model-closed {
  background: transparent;
}

/* Legend Swatches */
.benchmark .legend-swatch.swatch-open {
  background: rgba(54, 85, 255, 0.15);
}

.benchmark .legend-swatch.swatch-closed {
  background: transparent;
}

table th,
table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 0.0625rem solid var(--border);
  font-size: 0.95rem;
}

table th {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

table tr:last-child td {
  border-bottom: none;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr));
  gap: 1.75rem;
}

.two-column h3 {
  margin-top: 0;
}

.two-column ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.notes {
  margin-top: 1.125rem;
  padding: 1rem;
  border-radius: 0.625rem;
  background: var(--panel);
  border: 0.0625rem solid var(--border);
  color: var(--muted);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
  gap: 1rem;
}

.resource-card {
  padding: 1.125rem;
  background: var(--panel);
  border-radius: 0.75rem;
  border: 0.0625rem solid var(--border);
  color: var(--text);
}

.resource-card pre {
  background: var(--bg);
  border: 0.0625rem solid var(--border);
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.85rem;
  color: var(--muted);
}

.resource-card h3 {
  margin-top: 0;
}

.citation p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.transfer-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-top: 1.5rem;
}

.transfer-image {
  width: 100%;
}

.transfer-image img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  display: block;
  box-shadow: var(--card-shadow);
}

.transfer-content {
  position: relative;
  overflow: hidden;
}

.transfer-text {
  opacity: 0;
  transform: translateX(2rem);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.transfer-text.visible {
  opacity: 1;
  transform: translateX(0);
}

.transfer-placeholder {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.transfer-placeholder:first-child {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.transfer-point {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.transfer-point::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--muted);
  opacity: 0.6;
  font-size: 1.2rem;
  line-height: 1.6;
}

.transfer-vis-image {
  margin-top: 3rem;
  width: 100%;
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.transfer-vis-image.visible {
  opacity: 1;
  transform: translateY(0);
}

.transfer-vis-image img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  display: block;
  box-shadow: var(--card-shadow);
  max-width: 100%;
  object-fit: contain;
}

.finding-card {
  margin-top: 3rem;
  border-radius: 0.75rem;
  border: 0.0625rem solid #e1e4ec;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Animation for reveal effect - only hide if reveal class exists and visible class doesn't */
.finding-card.reveal:not(.visible) {
  opacity: 0;
  transform: translateY(2rem);
}

.finding-header {
  background-color: #6b85ff;
  padding: 1rem 1.5rem;
}

.finding-header h3 {
  margin: 0;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.finding-body {
  background-color: #f8f9ff;
  padding: 1.5rem;
}

.finding-body p {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.finding-body p strong {
  font-weight: 600;
  color: var(--text);
}

.sft-table-container {
  margin-top: 3rem;
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  overflow-x: auto;
}

.sft-table-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.sft-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sft-table thead {
  background: #f8f9fa;
}

.sft-header-row th {
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 600;
  border: 0.0625rem solid #e1e4ec;
  font-size: 0.85rem;
}

.sft-header-row th.col-l1 {
  background-color: #E6E0F8;
}

.sft-header-row th.col-l2 {
  background-color: #FCEFD8;
}

.sft-header-row th.col-l3 {
  background-color: #EFF8E0;
}

.sft-header-row th.col-l4 {
  background-color: #E0F0F8;
}

.sft-table tbody tr {
  border-bottom: 0.0625rem solid #e1e4ec;
}

.sft-table tbody tr.sft-baseline {
  background-color: #f0f7ff;
}

.sft-table tbody td {
  padding: 0.625rem 0.5rem;
  text-align: center;
  border-right: 0.0625rem solid #e1e4ec;
  font-size: 0.85rem;
}

.sft-table tbody td:first-child {
  text-align: left;
  font-weight: 500;
  padding-left: 1rem;
}

.sft-table tbody td .delta {
  font-size: 0.75rem;
  margin-left: 0.25rem;
  opacity: 0.7;
}

.sft-table tbody td.good {
  background-color: #D7EADF;
  color: #2d5016;
}

.sft-table tbody td.bad {
  background-color: #ffe6e6;
  color: #8b0000;
}

.sft-table tbody td.neutral {
  background-color: #f5f5f5;
  color: #666;
}

.table-caption {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.table-caption .good-text {
  color: #63AC86;
  font-weight: 500;
}

.table-caption .bad-text {
  color: #d32f2f;
  font-weight: 500;
}

.table-caption .neutral-text {
  color: #808080;
  font-weight: 500;
}

@media (max-width: 768px) {
  .sft-table-container {
    margin-top: 2rem;
  }
  
  .sft-table {
    font-size: 0.75rem;
  }
  
  .sft-header-row th,
  .sft-table tbody td {
    padding: 0.5rem 0.375rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .transfer-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .transfer-text {
    opacity: 1;
    transform: translateX(0);
  }
  
  .transfer-vis-image {
    margin-top: 2rem;
  }
  
  .transfer-vis-image img {
    border-radius: 0.75rem;
  }
  
  .finding-card {
    margin-top: 2rem;
  }
  
  .finding-header {
    padding: 0.875rem 1.25rem;
  }
  
  .finding-body {
    padding: 1.25rem;
  }
}

.bibtex-entry {
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
  font-size: 0.95rem;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  padding: 1rem;
  background: var(--bg);
  border: 0.0625rem solid var(--border);
  border-radius: 0.5rem;
  overflow-x: auto;
  line-height: 1.6;
  user-select: all;
  -webkit-user-select: all;
  cursor: text;
}

.bibtex-entry code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  padding: 0;
  border: none;
}

.contact-email {
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: underline;
  margin-left: 0.25rem;
  font-weight: normal;
}

.contact-email:hover {
  color: #2d4ae6;
  text-decoration: underline;
}

.footer {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 3rem auto;
  padding: 1.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 0.0625rem solid var(--border);
}

.authors p {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.authors .note {
  font-size: 0.9rem;
}

/* Column Expansion Styles */
.col-l1-det, .col-l2-det, .col-l3-det, .col-l4-det {
  display: none;
}

.col-l1-det { background-color: rgba(54, 85, 255, 0.03); }
.col-l2-det { background-color: rgba(54, 85, 255, 0.03); }
.col-l3-det { background-color: rgba(54, 85, 255, 0.03); }
.col-l4-det { background-color: rgba(54, 85, 255, 0.03); }

/* Expansion States */
.benchmark table.expand-l1 .col-l1-sum { display: none; }
.benchmark table.expand-l1 .col-l1-det { display: table-cell; }

.benchmark table.expand-l2 .col-l2-sum { display: none; }
.benchmark table.expand-l2 .col-l2-det { display: table-cell; }

.benchmark table.expand-l3 .col-l3-sum { display: none; }
.benchmark table.expand-l3 .col-l3-det { display: table-cell; }

.benchmark table.expand-l4 .col-l4-sum { display: none; }
.benchmark table.expand-l4 .col-l4-det { display: table-cell; }

/* Header specific styling for details */
th.col-l1-det, th.col-l2-det, th.col-l3-det, th.col-l4-det {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Parent category label in expanded headers */
.th-parent {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.25rem;
  line-height: 1;
  opacity: 0.8;
}

/* Add a top border to group the expanded columns visually */
.benchmark table.expand-l1 th.col-l1-det,
.benchmark table.expand-l2 th.col-l2-det,
.benchmark table.expand-l3 th.col-l3-det,
.benchmark table.expand-l4 th.col-l4-det {
  border-top: 2px solid var(--accent);
  background: rgba(54, 85, 255, 0.02);
}

/* Video Gallery Styles */
.video-gallery-container {
  margin-top: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-bottom: 2rem;
}

.video-gallery-container h3 {
  margin-bottom: 1.5rem;
}

.gallery-carousel-container {
  position: relative;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  /* Height based on 80% width with 16:9 aspect ratio, ensuring it scales proportionally */
  height: clamp(12rem, calc(80vw * 9 / 16), calc(64rem * 0.8 * 9 / 16));
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.carousel-item {
  position: absolute;
  width: 80%; /* Controls the size of the central video */
  max-width: 68rem;
  aspect-ratio: 16/9;
  height: auto; /* Height determined by aspect-ratio */
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1rem 2rem rgba(0,0,0,0.2);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  background: #000;
  opacity: 0;
  transform: translateX(0) scale(0.8);
  z-index: 1;
  cursor: pointer;
}

.carousel-item video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.carousel-item.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  z-index: 10;
  box-shadow: 0 1.5rem 3rem rgba(0,0,0,0.3);
  cursor: default;
}

.carousel-item.prev {
  opacity: 0.4;
  transform: translateX(-85%) scale(0.85);
  z-index: 5;
  filter: brightness(0.6);
}

.carousel-item.next {
  opacity: 0.4;
  transform: translateX(85%) scale(0.85);
  z-index: 5;
  filter: brightness(0.6);
}

.carousel-item.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
}

/* Navigation Buttons */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  color: var(--accent);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.prev-btn {
  left: 1rem;
}

.next-btn {
  right: 1rem;
}

.gallery-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.gallery-btn {
  padding: 0.625rem 1.25rem;
  border: 0.0625rem solid var(--border);
  background: #fff;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(54, 85, 255, 0.05);
}

.gallery-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(54, 85, 255, 0.2);
}

@media (max-width: 768px) {
  .gallery-carousel-container {
    /* On mobile, use 85% width (from .carousel-item width: 85%) */
    height: clamp(10rem, calc(85vw * 9 / 16), calc(64rem * 0.85 * 9 / 16));
  }
  
  .carousel-item {
    width: 85%;
  }
  
  .carousel-item.prev,
  .carousel-item.next {
    opacity: 0;
    pointer-events: none;
  }
  
  .nav-btn {
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* Chart Styles */
.benchmark-top {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: stretch;
  margin-top: 0.9rem;
}

.benchmark-top .benchmark-intro p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}

.chart-container {
  width: 100%;
  height: auto;
  margin-top: -8rem;
  margin-bottom: -6rem;

  /* Minimal transparent wrapper: no background, border, or padding
     The sunburst chart (radius 100%) fits exactly within this container,
     creating a perfect circle tangent to the container edges */
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;

  display: flex;
  flex-direction: column;
  gap: 0.35rem;

  /* reuse reveal-style animation */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s cubic-bezier(0.16, 0.84, 0.44, 1),
    transform 0.45s cubic-bezier(0.16, 0.84, 0.44, 1);
}

.chart-title {
  text-align: center;
  margin: 0;
  position: relative;
  top: -7.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

#sunburst-chart {
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  min-height: 0;
  margin-top: 0;
  margin-left: 0;
}

.chart-container.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .benchmark-top {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .chart-container {
    padding: 0;
  }

  #sunburst-chart {
    margin-top: 0.1rem;
  }

  .chart-title {
    text-align: center;
  }
}
