body {
  font-family: 'Noto Sans', sans-serif;
  overflow-x: hidden;
}

code {
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #eef2f7;
  color: #283548;
  font-size: 0.95em;
}

.navbar-menu .navbar-start {
  flex-grow: 1;
  justify-content: center;
}

.publication-title {
  font-family: 'Google Sans', sans-serif;
}

.publication-authors {
  font-family: 'Google Sans', sans-serif;
}

.publication-venue {
  color: #555;
  margin-top: 0.35rem;
}

.author-block {
  display: inline-block;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 4px;
  max-width: 100%;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.button.is-disabled {
  pointer-events: none;
  opacity: 0.58;
}

.contribution-card,
.problem-card,
.result-card {
  height: 100%;
  border: 1px solid #e5eaf2;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.contribution-card p,
.problem-card p,
.result-card p {
  color: #667085;
}

.contribution-card .title,
.problem-card .title,
.result-card .title {
  color: #2f3a4a;
}

.section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

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

.teaser-image,
.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.teaser-image {
  max-height: 560px;
  object-fit: contain;
}

.paper-figure {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.figure-caption {
  margin-top: 0.75rem;
  color: #667085;
  font-size: 0.95rem;
}

.method-figures {
  margin-top: 1.5rem;
}

@media screen and (min-width: 769px) {
  .method-figure-small {
    flex: 0 0 20%;
  }

  .method-figure-large {
    flex: 0 0 77%;
  }
}

.method-story {
  margin-top: 1.5rem;
}

.video-placeholder {
  display: flex;
  min-height: 230px;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.5rem;
  border: 1px dashed #bcc8d8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.05), rgba(31, 138, 112, 0.06)),
    #f8fafc;
  color: #667085;
  text-align: center;
}

.video-placeholder .icon {
  color: #2f3a4a;
}

.video-placeholder .title {
  margin-bottom: 0;
  color: #2f3a4a;
}

.problem-cards {
  margin-top: 1.25rem;
}

.result-card {
  text-align: center;
}

.result-number {
  margin-bottom: 0.35rem;
  color: #13866f !important;
  font-family: 'Google Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.explorer-intro {
  max-width: 860px;
  margin: 0 auto 1.25rem;
}

.viewer-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 640px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
}

.viewer-canvas-wrap {
  position: relative;
  min-height: 640px;
}

#viewer {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 640px;
  background: #0f172a;
  cursor: grab;
}

#viewer:active {
  cursor: grabbing;
}

.viewer-help {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.78);
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
  pointer-events: none;
}

.viewer-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.viewer-controls {
  padding: 1.25rem;
  border-left: 1px solid #d9e2ef;
  background: #f8fafc;
}

.viewer-stats {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
  color: #667085;
  font-size: 0.86rem;
}

.viewer-stats div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.viewer-stats strong {
  color: #1f2937;
}

.viewer-label {
  display: block;
  margin-bottom: 0.4rem;
  color: #1f2937;
  font-weight: 700;
  font-size: 0.9rem;
}

.viewer-toggles {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  color: #344054;
  font-size: 0.92rem;
}

.viewer-toggles input {
  margin-right: 0.4rem;
  accent-color: #13866f;
}

.pose-tool-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.pose-tool-option {
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.pose-tool-option.start.is-armed {
  border-color: #00d85a;
  color: #087443;
  box-shadow: 0 0 0 2px rgba(0, 216, 90, 0.18);
}

.pose-tool-option.goal.is-armed {
  border-color: #ff1f2d;
  color: #b42318;
  box-shadow: 0 0 0 2px rgba(255, 31, 45, 0.18);
}

.viewer-buttons {
  margin-bottom: 1rem;
}

.route-control {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.route-control #route {
  flex: 1 1 auto;
  min-width: 0;
}

.route-speed {
  flex: 0 0 auto;
  min-width: 3.2rem;
}

.viewer-asa {
  margin: 1.1rem 0;
  padding-top: 1rem;
  border-top: 1px solid #d9e2ef;
}

.viewer-asa .asa-stepper {
  justify-content: flex-start;
  margin-bottom: 0;
}

.viewer-asa-caption {
  margin: 0.7rem 0 0;
  color: #475569;
  font-size: 0.86rem;
  min-height: 3.2em;
}

.viewer-asa .asa-stats {
  margin-top: 0.5rem;
}

.viewer-legend {
  display: grid;
  gap: 0.42rem;
  padding: 1rem 0;
  border-top: 1px solid #d9e2ef;
  border-bottom: 1px solid #d9e2ef;
  color: #667085;
  font-size: 0.86rem;
}

.legend-line {
  display: inline-block;
  width: 24px;
  height: 4px;
  margin-right: 0.45rem;
  border-radius: 99px;
  vertical-align: middle;
}

.legend-line.start {
  background: #22a06b;
}

.legend-line.path {
  background: #ef5b45;
}

.legend-line.navmesh {
  background: rgba(166, 220, 253, 0.9);
}

.legend-line.used-navmesh {
  background: rgba(255, 214, 92, 0.9);
}

.legend-line.mesh {
  background: #b7c4d8;
}

.viewer-note {
  margin-top: 1rem;
  color: #667085;
  font-size: 0.86rem;
}

.bibtex {
  overflow-x: auto;
  padding: 1.1rem;
  border-radius: 8px;
  background: #111827;
  color: #d1d5db;
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
  }

  .container,
  .container.is-max-desktop,
  .container.is-max-widescreen {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
  }

  .columns {
    margin-left: 0;
    margin-right: 0;
  }

  .column {
    padding-left: 0;
    padding-right: 0;
  }

  .publication-title {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: 1.68rem !important;
    line-height: 1.08;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .publication-links {
    gap: 0.45rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .publication-links .button {
    max-width: 100%;
    white-space: normal;
    font-size: 0.92rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .publication-links .link-block {
    max-width: 100%;
  }

  .content.has-text-justified {
    text-align: left !important;
  }

  .teaser .subtitle {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .viewer-panel {
    grid-template-columns: 1fr;
  }

  .viewer-controls {
    border-left: 0;
    border-top: 1px solid #d9e2ef;
  }

  .viewer-canvas-wrap,
  #viewer {
    min-height: 460px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Added components: contribution links, MathJax, tags, videos,
   demos (yaw + ASA), comparison slider, benchmark table, charts
   ═══════════════════════════════════════════════════════════════ */

/* Contribution cards as links */
.contribution-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.contribution-card-link:hover { color: inherit; text-decoration: none; }
.contribution-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contribution-card-link:hover .contribution-card {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

h3.title.is-4 {
  font-size: 1.45rem;
  margin-top: 1.4rem;
}

/* MathJax overflow protection */
mjx-container {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

/* Inline safe / restricted tags */
.tag-safe,
.tag-restricted {
  display: inline-block;
  padding: 0.05em 0.5em;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9em;
}
.tag-safe { background: #dcfce7; color: #166534; }
.tag-restricted { background: #fef9c3; color: #854d0e; }

/* ── Video section ───────────────────────────────────────────── */
.video-intro {
  max-width: 720px;
  margin: 0 auto 1.25rem;
  color: #667085;
}

.seg-track {
  position: relative;
  display: flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  width: fit-content;
  margin: 0 auto 1.5rem;
}
.seg-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: #6b7280;
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4em 1.15em;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.seg-btn:hover { color: #374151; }
.seg-btn.is-active { color: #1e293b; font-weight: 600; }
.seg-slider {
  position: absolute;
  z-index: 0;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.video-frame {
  max-width: 880px;
  margin: 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.video-frame video,
.video-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

/* ── Generic demo boxes ──────────────────────────────────────── */
.demo-box {
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  box-shadow: none;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.demo-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.3rem;
}
.demo-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}
.demo-box input[type="range"] {
  width: 100%;
  accent-color: #13866f;
  cursor: pointer;
}

/* ── Yaw-feasibility demo ────────────────────────────────────── */
.yaw-stage-col svg { width: 100%; height: auto; display: block; }

.demo-readout {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.05rem;
  color: #374151;
  margin-bottom: 0.9rem;
}
.demo-readout-num {
  font-weight: 800;
  font-size: 1.35em;
  color: #13866f;
  margin: 0 0.15em;
}
.fit-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.15em 0.7em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  vertical-align: middle;
}
.fit-badge.fit-yes { background: #dcfce7; color: #166534; }
.fit-badge.fit-no { background: #fee2e2; color: #991b1b; }

.yaw-dial-wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5eaf2;
}
#yaw-dial { width: 96px; height: 96px; flex: 0 0 96px; }
.yaw-dial-caption { font-size: 0.86rem; color: #667085; }
.yaw-dial-caption strong { color: #1f2937; font-size: 1.05em; }
.yaw-region-tag {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.1em 0.6em;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}
.yaw-region-tag.tag-safe { background: #dcfce7; color: #166534; }
.yaw-region-tag.tag-restricted { background: #fef9c3; color: #854d0e; }
.yaw-region-tag.tag-blocked { background: #fee2e2; color: #991b1b; }

/* ── ASA stepper ─────────────────────────────────────────────── */
.asa-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.asa-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1.5px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4em 0.85em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.asa-step-btn:hover { border-color: #94a3b8; }
.asa-step-btn.is-active {
  background: #eef7f4;
  border-color: #13866f;
  color: #0f5c4d;
  font-weight: 700;
}
.asa-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: #cbd5e1;
  color: #1e293b;
  font-size: 0.78em;
  font-weight: 700;
}
.asa-step-btn.is-active .asa-step-num { background: #13866f; color: #fff; }

.asa-stats {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: #667085;
}
.asa-stats div { display: flex; justify-content: space-between; gap: 1rem; }
.asa-stats strong { color: #13866f; font-family: 'Google Sans', sans-serif; }

/* ── Algorithm box ───────────────────────────────────────────── */
.algo-box {
  font-size: 0.9em;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.algo-header {
  background: #f1f5f9;
  border-bottom: 1.5px solid #cbd5e1;
  padding: 0.55rem 1.1rem;
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  color: #1e293b;
}
.algo-inputs {
  padding: 0.6rem 1.1rem 0.45rem;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.65;
}
.algo-body { padding: 0.65rem 1.1rem 0.75rem; }
.algo-step { line-height: 1.75; }
.algo-block {
  margin-left: 0.9em;
  padding-left: 1em;
  border-left: 1.5px solid #cbd5e1;
}
.algo-kw { font-weight: 700; font-variant: small-caps; color: #0f5c4d; }
.algo-comment { color: #9ca3af; font-size: 0.92em; }

/* ── Before/after comparison slider ──────────────────────────── */
.compare-wrap {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  /* Per-scene aspect ratio is set inline by JS; this is the default (Store). */
  aspect-ratio: 3198 / 1965;
  background: #fff;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
  user-select: none;
}
.compare-img-base,
.compare-img-top {
  position: absolute;
  inset: 0;
}
.compare-img-base img,
.compare-img-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.compare-img-top { clip-path: inset(0 50% 0 0); }
.compare-tag {
  position: absolute;
  top: 10px;
  padding: 0.2em 0.7em;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}
.compare-tag-left { left: 10px; background: rgba(19, 134, 111, 0.85); }
.compare-tag-right { right: 10px; background: rgba(71, 85, 105, 0.85); }
.compare-handle {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: 0;
  transform: translateX(-1px);
  pointer-events: none;
}
.compare-handle-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
}
.compare-handle-circle {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #13866f;
}
#compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

/* ── Benchmark table ─────────────────────────────────────────── */
.benchmark-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.benchmark-table {
  font-size: 0.95em;
  min-width: 480px;
  border-collapse: collapse;
}
.benchmark-table thead th {
  background: #f8fafc;
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 2px solid #cbd5e1;
  text-align: center !important;
  white-space: nowrap;
}
.benchmark-table thead th:first-child { text-align: left !important; }
.benchmark-table tbody td {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}
.benchmark-table tbody td:first-child { text-align: left; font-weight: 600; color: #374151; }
.benchmark-table tbody tr:hover { background: #f8fafc; }
.benchmark-table .cell-best { color: #111827; font-weight: 700; }
.benchmark-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.8em;
  color: #6b7280;
  flex-wrap: wrap;
}
.benchmark-legend .legend-label { margin-right: 4px; }

/* ── Bar plot ────────────────────────────────────────────────── */
.barplot-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.barplot-frame { position: relative; width: 100%; height: 340px; }
.barplot-frame canvas { display: block; width: 100% !important; height: 100% !important; }

/* ── Explorer legend swatches ────────────────────────────────── */
.legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.5rem;
  border-radius: 3px;
  vertical-align: middle;
}
.legend-swatch.start { background: #00d85a; }
.legend-swatch.goal { background: #ff1f2d; }
.legend-swatch.path { background: #ff6a4d; }
.legend-swatch.navmesh { background: #6db8f2; }
.legend-swatch.used-navmesh { background: #ffce4d; }
.legend-swatch.safe { background: #32c771; }
.legend-swatch.restricted { background: #ffc23d; }

/* ── Inline stat band (replaces 3 stat boxes) ────────────────── */
.stat-band {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin: 0.5rem 0 1.25rem;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.stat-item {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.1rem 1.25rem;
  text-align: center;
}
.stat-item + .stat-item { border-left: 1px solid #eef2f7; }
.stat-num {
  font-family: 'Google Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #13866f;
}
.stat-label { color: #667085; font-size: 0.9rem; max-width: 16rem; }

@media (max-width: 600px) {
  .stat-item { flex-basis: 100%; }
  .stat-item + .stat-item { border-left: 0; border-top: 1px solid #eef2f7; }
}

/* ── Mobile tweaks for new components ────────────────────────── */
@media (max-width: 768px) {
  .seg-track { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .seg-btn { font-size: 0.78rem; padding: 0.35em 0.8em; }

  #yaw-demo .columns { display: flex; flex-direction: column; }
  #yaw-demo .column { width: 100%; }

  .asa-step-btn { font-size: 0.78rem; padding: 0.35em 0.7em; }

  .barplot-frame { min-width: 560px; height: 360px; }
  .algo-box { overflow-x: auto; }
  .algo-body { min-width: 420px; }

  .compare-tag { font-size: 0.7rem; }
}
