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

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

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

.publication-authors .author-block {
  display: inline-block;
  margin-right: 0.35rem;
}

.publication-links {
  margin-top: 1.5rem;
}

.publication-links .link-block {
  display: inline-block;
  margin: 0.25rem;
}

.external-link.button {
  min-width: 8rem;
}

.title.is-3,
.title.is-5 {
  font-family: 'Google Sans', sans-serif;
}

/* Figures ------------------------------------------------------------- */

.hero.teaser img,
.section img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.hero.teaser .subtitle,
.caption {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4a4a4a;
}

/* Tables -------------------------------------------------------------- */

.table-container {
  overflow-x: auto;
  margin-top: 1rem;
}

.table th,
.table td {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

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

.table thead th {
  font-family: 'Google Sans', sans-serif;
}

tr.highlight-row td {
  background-color: #eef4ff;
}

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

#BibTeX pre {
  background-color: #f5f5f5;
  border-radius: 6px;
  overflow-x: auto;
}

#BibTeX code {
  background: none;
  color: #363636;
  font-size: 0.85rem;
}

/* Small screens ------------------------------------------------------- */

@media screen and (max-width: 768px) {
  .publication-title {
    font-size: 2rem !important;
  }

  .external-link.button {
    min-width: 6.5rem;
  }
}

.legend {
  max-width: 52rem;
  margin: 0 auto 2.5rem auto;
  text-align: left;
  font-size: 0.95rem;
  color: #4a4a4a;
}

.legend ul {
  margin-top: 0.5rem;
}

/* Background-condition column: keep centered even when it is the first cell
   in a row (the task name above it spans two rows). */
.table td.bg {
  text-align: center;
}

/* Ablation breakdown: left-align the descriptive cells rather than centring
   them like the numeric result tables. */
.ablation-table td,
.ablation-table th {
  text-align: left;
  white-space: normal;
  font-size: 0.9rem;
}

/* Keep the long component names from hyphen-breaking mid-word in the
   ablation table's narrow cells. */
.ablation-table td {
  overflow-wrap: break-word;
  hyphens: none;
}

/* ============================ Result charts ============================ */
/* Categorical slots 1-4 from the reference palette; both modes selected. */
.viz-root {
  --viz-s1: #2a78d6;
  --viz-s2: #eb6834;
  --viz-s3: #1baf7a;
  --viz-s4: #eda100;
  --viz-grid: #e0e0dc;
  --viz-track: #ebebe7;
  --viz-ink: #0b0b0b;
  --viz-ink-2: #52514e;
  max-width: 52rem;
  margin: 0 auto;
  text-align: left;
}

.s1 { background: var(--viz-s1); }
.s2 { background: var(--viz-s2); }
.s3 { background: var(--viz-s3); }
.s4 { background: var(--viz-s4); }

.viz-heading { margin: 2.25rem 0 0.25rem 0 !important; }
.viz-title   { font-size: 0.9rem; color: var(--viz-ink-2); margin: 1.75rem 0 1rem 0 !important; }

.viz-legend { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-bottom: 0.5rem; }
.viz-legend-item { display: inline-flex; align-items: center; gap: 0.4rem;
                   font-size: 0.85rem; color: var(--viz-ink-2); }
.viz-swatch { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }

/* Horizontal bars — overall averages */
.hbar-chart { display: flex; flex-direction: column; gap: 6px; }
.hbar-row   { display: grid; grid-template-columns: 7.5rem 1fr 2.5rem; align-items: center; gap: 0.6rem; }
.hbar-label { font-size: 0.85rem; color: var(--viz-ink-2); text-align: right; }
.hbar-track { background: var(--viz-track); border-radius: 2px; height: 18px; }
.hbar-fill  { height: 18px; border-radius: 0 4px 4px 0; }
.hbar-value { font-size: 0.85rem; color: var(--viz-ink); font-variant-numeric: tabular-nums; }

/* Vertical grouped bars — per category / per task.
   The plot box is exactly the gridded region: 200px tall, gridlines every 50px
   (= 0.25), so a bar of height N% lands on the line it should. Labels live
   outside the box so they cannot shift the baseline. */
.vbar-chart { display: flex; gap: 0.4rem; }
.vbar-axis  { position: relative; width: 2rem; height: 200px; flex: none; }
.vbar-axis span { position: absolute; right: 0; transform: translateY(50%);
                  font-size: 0.72rem; color: var(--viz-ink-2); }
.vbar-area  { flex: 1 1 auto; min-width: 0; }
.vbar-plot  { height: 200px; display: flex; align-items: flex-end; gap: 0.5rem;
              background: repeating-linear-gradient(to top,
                          var(--viz-grid) 0 1px, transparent 1px 50px); }
.vbar-stack { flex: 1 1 0; min-width: 0; height: 100%;
              display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.vbar       { width: 14px; max-width: 24px; border-radius: 4px 4px 0 0; min-height: 2px; }
.vbar-labels{ display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.vbar-label { flex: 1 1 0; min-width: 0; text-align: center; font-size: 0.72rem;
              color: var(--viz-ink-2); word-break: break-word; }

@media screen and (max-width: 640px) {
  .hbar-row  { grid-template-columns: 5.5rem 1fr 2.2rem; }
  .vbar      { width: 8px; }
  .vbar-label{ font-size: 0.62rem; }
}

.all-numbers { max-width: 52rem; margin: 2.5rem auto 0 auto; text-align: left; }
.all-numbers > summary { cursor: pointer; font-size: 0.9rem; color: #4a4a4a; }

/* Breathing room inside the disclosure: the first heading sat flush against
   the summary line when opened. */
.all-numbers[open] > summary { margin-bottom: 1.75rem; }
.all-numbers h3 { margin-top: 2.5rem !important; margin-bottom: 0.5rem !important; }
.all-numbers > h3:first-of-type { margin-top: 0 !important; }
.all-numbers .table-container { margin-bottom: 1.5rem; }

/* Two vertical charts side by side, each with its own caption above it. */
.viz-row { display: flex; gap: 2rem; align-items: flex-start; }
.viz-col { min-width: 0; }
.viz-col-wide   { flex: 5 1 0; }
.viz-col-narrow { flex: 2 1 0; }
.viz-col > .viz-title:first-child { margin-top: 1.75rem !important; }

@media screen and (max-width: 700px) {
  .viz-row { flex-direction: column; gap: 0; }
  .viz-col { width: 100%; flex: none; }
}

/* Real-world rollout clips: 2x2, autoplaying loops. */
.rollout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rollout-grid figure { margin: 0; }
.rollout-grid video {
  display: block; width: 100%; height: auto;
  border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,0.12); background: #000;
}
.rollout-grid figcaption {
  margin-top: 0.5rem; font-size: 0.85rem; color: #363636; text-align: center;
}
.rollout-bg { color: #7a7a7a; }
.rollout-tag { font-weight: 600; color: #363636; }

@media screen and (max-width: 700px) {
  .rollout-grid { grid-template-columns: 1fr; }
}
