/* ---- STARS project page: additions on top of the template's index.css ---- */

figure.image img {
  border-radius: 6px;
}

/* ---- Cards ("What's in STARS") ---- */
.stars-card {
  height: 100%;
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid #e6e6e3;
  border-radius: 8px;
  background: #fff;
}

.stars-card-kicker {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #8a8a84;
  margin-bottom: 0.35rem;
}

.stars-card-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0b0b0b;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.stars-card-body {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #363636;
}

/* ---- Tables ---- */
.stars-table {
  background: transparent;
  font-size: 0.9rem;
}

.stars-table thead th {
  font-family: 'Google Sans', sans-serif;
  font-size: 0.85rem;
  white-space: nowrap;
}

.stars-results td {
  text-align: center;
  white-space: nowrap;
}

.stars-results td:first-of-type {
  text-align: left;
}

.stars-results .pm {
  color: #7a7a74;
  font-size: 0.8em;
}

.stars-results .best {
  font-weight: 700;
}

.stars-results .ours td {
  background-color: rgba(42, 120, 214, 0.06);
}

.stars-results .ours-tag {
  color: #7a7a74;
  font-weight: 400;
}

.stars-results tr.stars-rule td {
  border-top: 1px solid #c9c9c4;
}

.stars-results tr.stars-block th,
.stars-results tr.stars-block td {
  border-top: 2px solid #b5b5b0;
}

.stars-results .stars-group {
  vertical-align: middle;
  text-align: left;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.85rem;
  line-height: 1.25;
  white-space: nowrap;
}

.stars-results .stars-group span {
  font-weight: 400;
  color: #52514e;
}

/* ---- Chart ---- */
.stars-figure {
  margin-top: 1.5rem;
}

.viz-root {
  position: relative;
  color-scheme: light;
  --surface-1: #ffffff;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #7a7a74;
  --grid: #e6e6e3;
  --series-1: #2a78d6; /* STARS-He */
  --series-2: #eb6834; /* STARS-Ho */
  --series-3: #1baf7a; /* Autoencoder */
  --series-4: #eda100; /* MLP */
  background: var(--surface-1);
  border: 1px solid var(--grid);
  border-radius: 8px;
  padding: 1rem 1rem 0.75rem;
}

.viz-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.viz-scroll {
  overflow-x: auto;
}

.viz-scroll svg {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
}

.viz-grid line {
  stroke: var(--grid);
  stroke-width: 1;
}

.viz-axis {
  stroke: #c9c9c4;
  stroke-width: 1;
}

.viz-axis-label text {
  font-family: 'Noto Sans', sans-serif;
  font-size: 13px;
  fill: var(--text-secondary);
}

.viz-y-label text {
  text-anchor: end;
  dominant-baseline: middle;
}

.viz-x-label text {
  text-anchor: middle;
}

.viz-x-label text:first-child {
  text-anchor: start;
}

.viz-x-label text:last-child {
  text-anchor: end;
}

.viz-axis-title {
  font-family: 'Noto Sans', sans-serif;
  font-size: 13px;
  fill: var(--text-muted);
  text-anchor: middle;
}

.viz-series polyline {
  fill: none;
  stroke: var(--c);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.viz-direct-label text {
  font-family: 'Google Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  fill: var(--c);
  dominant-baseline: middle;
}

/* Yellow and aqua sit below 3:1 on a white surface: the direct labels above and
   the full results table below are the required relief. */

.viz-point {
  fill: var(--c);
  stroke: var(--surface-1);
  stroke-width: 2;
}

.viz-hit {
  fill: transparent;
  cursor: pointer;
}

.viz-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  transform: translate(-50%, -100%);
  background: var(--surface-1);
  border: 1px solid #c9c9c4;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--text-primary);
}

.viz-tooltip .viz-tooltip-series {
  font-weight: 700;
}

.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.viz-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.viz-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--c);
  display: inline-block;
}

/* ---- Small screens ---- */
.publication-title {
  overflow-wrap: break-word;
  word-break: break-word;
}

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

  .publication-authors {
    font-size: 1rem !important;
  }

  .viz-scroll svg {
    min-width: 520px;
  }
}

/* Bulma's .hero is a flex column, so its children default to min-width:auto and
   are sized by their min-content. Wide tables and the chart would then stretch
   the page instead of scrolling inside their own containers. */
.hero > .container,
.hero-body > .container {
  width: 100%;
}

.hero .container,
.hero .content,
.table-container,
.viz-root,
.viz-scroll {
  min-width: 0;
}
