/* ========================================================================
   Flame3D — project page styles (white-blue / bright high-tech)
   ======================================================================== */

:root {
  --bg: #f6f9ff;
  /* near-white with a hint of blue */
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: #eef3fb;
  --line: #d8e1ee;
  --line-soft: #e8eef7;
  --line-strong: #c2cfe1;
  --text: #0c1a2b;
  /* deep navy for body */
  --text-soft: #3b4a60;
  --text-mute: #6a7890;
  --accent: #1f6feb;
  /* primary blue */
  --accent-2: #0a4ec9;
  /* deeper blue */
  --accent-soft: #5b95f5;
  --accent-bg: rgba(31, 111, 235, 0.07);
  --accent-bg-2: rgba(31, 111, 235, 0.14);
  --cyan: #06b6d4;
  --flame: #e3592a;
  /* kept only for the brand name */
  --shadow-sm: 0 1px 2px rgba(13, 41, 86, 0.04), 0 1px 3px rgba(13, 41, 86, 0.05);
  --shadow-md: 0 4px 14px rgba(13, 41, 86, 0.06), 0 1px 3px rgba(13, 41, 86, 0.04);
  --shadow-lg: 0 18px 50px rgba(13, 41, 86, 0.10), 0 2px 8px rgba(13, 41, 86, 0.05);
  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* bright background: blue glow + grid + soft conic accent */
body {
  background-image:
    radial-gradient(ellipse 70% 55% at 50% -8%, rgba(31, 111, 235, 0.18), transparent 65%),
    radial-gradient(ellipse 40% 30% at 95% 10%, rgba(6, 182, 212, 0.10), transparent 70%),
    linear-gradient(rgba(31, 111, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 111, 235, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  background-attachment: fixed, fixed, fixed, fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-2);
}

code,
pre,
.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

/* ----- Layout ----- */

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 48px 0;
  position: relative;
}

section:first-of-type {
  padding-top: 0;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-label .num {
  background: var(--accent-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--accent-2);
  font-weight: 600;
}

h1,
h2,
h3,
h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px 0;
  color: var(--text);
}

h2 {
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 20px;
  line-height: 1.3;
}

p {
  color: var(--text-soft);
  margin: 0 0 16px 0;
}

/* ----- Brand ----- */

.brand-flame {
  color: var(--flame);
  font-weight: 700;
}

.brand-compose {
  color: var(--accent);
  font-weight: 700;
}

/* ----- Nav ----- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  background: rgba(246, 249, 255, 0.78);
  border-bottom: 1px solid var(--line-soft);
}

/* Scroll-progress bar pinned to the bottom edge of the sticky nav. */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  /* sit on top of the nav border */
  height: 2px;
  background: transparent;
  pointer-events: none;
  overflow: hidden;
}

.scroll-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--scroll, 0));
  background: linear-gradient(90deg, var(--accent) 0%, var(--cyan) 100%);
  will-change: transform;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-brand .logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  box-shadow: 0 2px 8px rgba(31, 111, 235, 0.35);
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 26px;
  font-size: 14px;
}

.nav-links a {
  color: var(--text-soft);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ----- Hero ----- */

.hero {
  padding: 72px 0 40px 0;
  text-align: center;
}

.venue-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 32px;
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}

.venue-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

.title {
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 18px 0;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.title .subtitle {
  display: block;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: -0.018em;
  margin-top: 14px;
}

.authors {
  font-size: 16px;
  color: var(--text-soft);
  margin: 28px 0 6px 0;
}

.authors a {
  color: var(--accent);
}

.authors a:hover {
  color: var(--accent-2);
}

.authors sup {
  color: var(--accent);
  font-weight: 600;
}

.affiliations {
  font-size: 14px;
  color: var(--text-mute);
  margin-bottom: 36px;
}

.affiliations sup {
  color: var(--accent);
}

.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn.primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(31, 111, 235, 0.32);
}

.btn.primary:hover {
  color: #fff;
  box-shadow: 0 6px 20px rgba(31, 111, 235, 0.42);
}

.btn .icon {
  font-size: 14px;
}

.btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* ----- Hero figure ----- */

.hero-figure {
  margin: 40px auto 0 auto;
  max-width: 1100px;
  padding: 0 24px;
}

.hero-figure .frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-figure .frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.4), transparent 50%, rgba(6, 182, 212, 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.hero-figure .caption {
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
  margin-top: 16px;
  line-height: 1.55;
}

/* ----- TL;DR / Key insight ----- */

.tldr {
  padding: 32px 0;
}

.tldr-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(31, 111, 235, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%),
    var(--bg-elev);
  padding: 38px 42px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.tldr-card .stamp {
  position: absolute;
  top: 18px;
  right: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 4px;
}

.tldr-card p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.005em;
}

.tldr-card p strong {
  color: var(--accent-2);
  font-weight: 600;
  background: linear-gradient(180deg, transparent 60%, rgba(31, 111, 235, 0.15) 60%);
  padding: 0 2px;
}

/* ----- Abstract ----- */

.abstract p {
  font-size: 16px;
  line-height: 1.78;
}

/* ----- Video placeholder ----- */

.video-placeholder {
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg,
      rgba(31, 111, 235, 0.04),
      rgba(31, 111, 235, 0.04) 10px,
      transparent 10px,
      transparent 22px),
    var(--bg-elev);
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.video-placeholder .ph-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(31, 111, 235, 0.35);
}

.video-placeholder h3 {
  margin: 0 0 8px 0;
  color: var(--text);
}

.video-placeholder p {
  max-width: 580px;
  font-size: 14px;
  color: var(--text-mute);
  margin: 0;
}

/* ----- Pillars / approach ----- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.pillar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 28px;
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.3, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.pillar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pillar:hover {
  border-color: var(--accent-soft);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.pillar:hover::before {
  opacity: 1;
}

.pillar .step {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
}

.pillar h3 {
  font-size: 17px;
  margin-bottom: 10px;
  color: var(--accent);
}

.pillar p {
  font-size: 14px;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.62;
}

/* ----- Method figure ----- */

.method-figure {
  margin-top: 32px;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.method-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.method-figure .caption {
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
  margin-top: 16px;
  line-height: 1.55;
}

/* ----- Tools grid ----- */

.tools {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.tool {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 18px 22px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.tool:hover {
  border-color: var(--accent-soft);
  transform: translateX(2px);
}

.tool .name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent-2);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.tool .name::before {
  content: "▸";
  color: var(--accent);
}

.tool .desc {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.6;
}

.tool.meta {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-bg) 0%, transparent 100%);
}

.tool.meta .name {
  color: var(--accent-2);
}

/* ----- Compose3D benchmark section ----- */

.bench {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 28px;
}

.bench .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bench .panel.figure {
  padding: 24px;
}

.bench .panel img {
  width: 100%;
  height: auto;
  display: block;
}

.bench h3 .brand-compose {
  font-weight: 700;
}

.bench p {
  font-size: 15px;
}

/* ----- Results table ----- */

.results-table-wrap {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 8px;
  overflow-x: auto;
  box-shadow: var(--shadow-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table th,
table td {
  text-align: right;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
}

table th:first-child,
table td:first-child {
  text-align: left;
}

table th {
  font-weight: 500;
  color: var(--text-mute);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  background: var(--bg-soft);
}

table th:first-child {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

table th:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

table td {
  color: var(--text-soft);
}

table tr.group td {
  border-bottom: 1px solid var(--line);
  padding: 16px 16px 8px 16px;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
}

table tr.ours td {
  background: linear-gradient(90deg, var(--accent-bg-2) 0%, var(--accent-bg) 100%);
  color: var(--text);
  font-weight: 500;
  border-bottom: none;
}

table tr.ours td:first-child {
  color: var(--accent-2);
  font-weight: 700;
}

table .best {
  color: var(--accent-2);
  font-weight: 700;
  background: var(--accent-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

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

.results-note {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 14px;
  font-style: italic;
}

/* small charts row */
.charts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.charts-row.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.charts-row .chart {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.charts-row .chart img {
  width: 100%;
  height: auto;
  display: block;
}

.charts-row .chart .label {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 10px;
}

.legend-strip {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
}

.legend-strip img {
  width: 100%;
  height: auto;
  display: block;
}

/* ----- Qualitative ----- */

.qualitative .qual-img-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  padding: 8px;
  box-shadow: var(--shadow-md);
  margin-top: 28px;
}

.qualitative .qual-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ----- BibTeX ----- */

.bibtex pre {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  margin: 28px 0 0 0;
  box-shadow: var(--shadow-sm);
}

.bibtex .key {
  color: var(--accent);
  font-weight: 500;
}

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

footer {
  padding: 48px 0 64px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(31, 111, 235, 0.04));
}

footer a {
  color: var(--text-soft);
}

footer a:hover {
  color: var(--accent);
}

/* ----- Example query videos (side-by-side) ----- */

.examples-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

.example {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.example-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  line-height: 0;
  /* eliminate inline-baseline gap below the video */
}

.example-frame video {
  width: 100%;
  height: auto;
  /* match the video's true aspect ratio */
  display: block;
  background: #000;
}

/* Lock carousel video frames to a fixed height so arrows don't shift */
.carousel-slide .example-frame {
  aspect-ratio: 16 / 9;
}

.carousel-slide .example-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.example-frame.placeholder {
  aspect-ratio: 16 / 9;
  /* placeholders fall back to 16:9 */
  border: 1.5px dashed var(--accent);
  background:
    repeating-linear-gradient(45deg,
      rgba(31, 111, 235, 0.04),
      rgba(31, 111, 235, 0.04) 10px,
      transparent 10px,
      transparent 22px),
    var(--bg-elev);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  box-shadow: none;
}

.example-frame.placeholder .ph-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.example-frame.placeholder h3 {
  margin: 0 0 8px 0;
  font-size: 17px;
  color: var(--text);
}

.example-frame.placeholder p {
  font-size: 13px;
  color: var(--text-mute);
  margin: 0;
  max-width: 320px;
}

.example-frame.placeholder code {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent-2);
}

.example-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.example-controls .speed-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-right: 4px;
}

.example-controls button {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--bg-elev);
  border: 1px solid #333;
  color: #222;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.example-controls button:hover {
  border-color: #000;
  color: #000;
}

.example-controls button.active {
  background: #222;
  color: #fff;
  border-color: #222;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.example-caption {
  margin: 14px 0 0 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-bg);
  border-radius: 0 8px 8px 0;
}

.example-caption .query-marker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.example-caption p {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  font-style: italic;
  line-height: 1.5;
}

.example-caption.muted {
  border-left-color: var(--line-strong);
  background: var(--bg-soft);
}

.example-caption.muted .query-marker {
  color: var(--text-mute);
}

.example-caption.muted p {
  color: var(--text-mute);
  font-style: normal;
}

/* ----- Takeaways / Insight cards ----- */

.draft-note {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: -4px;
}

.draft-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: 1px;
}

.insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.insights.three-col {
  grid-template-columns: repeat(3, 1fr);
}

.insight {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 24px 24px 24px 30px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100px;
}

.insight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--cyan));
}

.insight:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.insight-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
}

.insight h3 {
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.015em;
  font-weight: 500;
}

.insight p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--text-soft);
}

/* ----- Result-insight callouts (lead-with-claim blocks above tables) ----- */

.result-insight {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(31, 111, 235, 0.07) 0%, rgba(6, 182, 212, 0.04) 100%),
    var(--bg-elev);
  padding: 22px 26px;
  margin: 24px 0;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.result-insight .claim-marker {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-bg);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-weight: 600;
}

.result-insight h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.result-insight p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--text-soft);
}

.result-insight.subtle {
  background: var(--bg-soft);
  border-color: var(--line-soft);
}

.result-insight.subtle .claim-marker {
  color: var(--text-mute);
  background: var(--bg-elev);
}

/* Inline highlight for key phrases within insight headlines. */
.hi {
  background: linear-gradient(180deg, transparent 60%, rgba(31, 111, 235, 0.22) 60%);
  padding: 0 3px;
  color: var(--accent-2);
  font-weight: 700;
}

/* ----- Qualitative carousel ----- */

.carousel {
  margin-top: 28px;
}

.carousel-stage {
  display: grid;
  grid-template-columns: 1fr;
}

.carousel-slide {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  align-items: start;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease;
}


#qual-carousel .slide-left,
#qual-carousel .slide-right {
  display: flex;
  flex-direction: column;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.carousel-slide .slide-header {
  min-height: 100px;
}

.carousel-slide .example {
  margin: 0;
}

.carousel-slide .example-frame {
  /* video panel keeps the natural aspect from earlier rules */
}

/* Narrative panel */
.slide-narrative {
  display: flex;
  flex-direction: column;
}

.slide-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-bg);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.slide-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.slide-meta .slide-tag {
  margin-bottom: 0;
}

.scene-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--text-mute);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}

.slide-query {
  border-left: 3px solid var(--accent);
  background: var(--accent-bg);
  padding: 12px 16px;
  margin-bottom: 18px;
  border-radius: 0 8px 8px 0;
}

.slide-query .query-marker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
}

.slide-query p {
  margin: 4px 0 0 0;
  font-size: 16px;
  color: var(--text);
  line-height: 1.5;
}

.slide-query .query-summary {
  margin-top: 8px;
  font-size: 13px;
  font-style: normal;
  color: var(--text-mute);
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.slide-query .query-summary::before {
  content: "Summary";
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 3px;
}

.slide-block {
  margin-bottom: 16px;
}

.slide-block h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 6px 0;
  font-weight: 500;
}

.slide-block p {
  font-size: 14.5px;
  line-height: 1.62;
  margin: 0;
  color: var(--text-soft);
}

.slide-bullets {
  margin: 0;
  padding-left: 20px;
}

.slide-bullets li {
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--text-soft);
  margin-bottom: 7px;
}

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

.slide-tools {
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.slide-tools .tools-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-right: 4px;
}

.tool-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: #000;
  padding: 3px 9px;
  border-radius: 4px;
}

/* Carousel controls */
.carousel-controls {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.carousel-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text-mute);
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
}

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

.tag-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(31, 111, 235, 0.32);
}

.carousel-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.carousel-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.12em;
  min-width: 60px;
  text-align: center;
}

/* Variant: controls without tag pills (single-slide or counter-only). */
.carousel-controls.solo {
  justify-content: center;
}

/* ----- ScanQA answer comparison block ----- */

.answer-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.ans {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg-elev);
}

.ans-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}

.ans.gt {
  background: var(--bg-soft);
  border-color: var(--line);
}

.ans.gt .ans-label {
  color: var(--text-mute);
}

.ans.gt ul {
  margin: 0;
  padding-left: 18px;
}

.ans.gt li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
}

.ans.gt p {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: var(--text);
}

.ans.ours {
  background: var(--accent-bg);
  border-color: var(--accent);
}

.ans.ours .ans-label {
  color: var(--accent-2);
}

.ans.ours p {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}

/* ----- Responsive ----- */

@media (max-width: 800px) {
  .title {
    font-size: 36px;
  }

  .title .subtitle {
    font-size: 18px;
  }

  h2 {
    font-size: 26px;
  }

  .pillars {
    grid-template-columns: 1fr;
  }

  .tools {
    grid-template-columns: 1fr;
  }

  .bench {
    grid-template-columns: 1fr;
  }

  .charts-row,
  .charts-row.two-col {
    grid-template-columns: 1fr;
  }

  .examples-row {
    grid-template-columns: 1fr;
  }

  .insights,
  .insights.three-col {
    grid-template-columns: 1fr;
  }

  .carousel-slide {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .answer-compare {
    grid-template-columns: 1fr;
  }

  .carousel-controls {
    justify-content: center;
  }

  .carousel-tags {
    justify-content: center;
  }

  section {
    padding: 36px 0;
  }

  .hero {
    padding: 48px 0 24px 0;
  }

  .nav-links {
    display: none;
  }

  .tldr-card {
    padding: 26px;
  }

  .tldr-card p {
    font-size: 16px;
  }
}

/* ----- Side Arrows for Carousels ----- */
.side-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  color: var(--text);
  padding: 0;
}

.side-arrow:hover {
  background: var(--bg-elev-hover);
  color: var(--accent);
  border-color: var(--accent-soft);
  transform: translateY(-50%) scale(1.05);
}

.side-arrow.prev {
  left: -70px;
}

.side-arrow.next {
  right: -70px;
}

@media (max-width: 1000px) {
  .side-arrow.prev {
    left: -20px;
  }

  .side-arrow.next {
    right: -20px;
  }
}

@media (max-width: 768px) {
  .side-arrow {
    display: none;
  }
}

/* ----- Code Examples (execute_program showcase) ----- */

.code-carousel {
  margin-top: 16px;
}

.code-carousel .carousel-slide {
  align-items: stretch;
}

.code-example-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  width: 100%;
}

.code-example-category {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: #1a2740;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
  font-weight: 500;
}

.code-example-query {
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}

.code-example-query-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-example-query .query-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1a2740;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-example-query p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--text);
}

.code-example-body {
  display: grid;
  grid-template-columns: 2fr 3fr;
  min-height: 0;
}

.code-example-left {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.code-example-tools {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.code-example-tools-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: #47749e;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
  font-weight: 500;
}

.code-example-tools p {
  margin: 0 0 4px 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-soft);
}

.code-example-tools p:last-child {
  margin-bottom: 0;
}

.code-example-tools .tool-search {
  color: #1f6feb;
  font-weight: 700;
}

.code-example-tools .tool-retrieve {
  color: #d32f2f;
  font-weight: 700;
}

.code-example-tools .tool-execute {
  color: #2e7d32;
  font-weight: 700;
}

.code-example-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #fafbfe;
}

.code-example-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.code-example-right {
  display: flex;
  flex-direction: column;
  background: #f5f7fb;
}

.code-example-pseudo-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(90deg, #1a2740 0%, #2a4060 100%);
  padding: 7px 14px;
  text-align: center;
}

.code-example-pseudo {
  margin: 0;
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  overflow-x: auto;
  flex: 1;
  border: none;
  border-radius: 0;
}

.code-example-pseudo code {
  font-family: inherit;
  font-size: inherit;
}

.code-example-pseudo .pseudo-highlight {
  background: #f5a623;
  color: #1a2740;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  font-style: normal;
}

.code-example-pseudo .pseudo-web-note {
  font-size: 10px;
  font-weight: 600;
  color: #d32f2f;
  letter-spacing: 0.04em;
}

.code-example-answer {
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-elev);
}

.code-example-answer-label {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: #2e7d32;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
  margin-right: 4px;
  font-weight: 500;
}

.code-example-answer .entity-red {
  color: #d32f2f;
  font-weight: 700;
}

.code-example-answer .entity-green {
  color: #2e7d32;
  font-weight: 700;
}

.code-example-answer .entity-purple {
  color: #7b1fa2;
  font-weight: 700;
}

@media (max-width: 800px) {
  .code-example-body {
    grid-template-columns: 1fr;
  }

  .code-example-left {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}