/* Fonts are vendored in static/fonts (latin subset, SIL OFL 1.1, see OFL-*.txt). */
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/GoogleSans-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/NotoSans-latin.woff2') format('woff2');
}

:root {
  --accent: #0065aa;
  --muted: #555;
  --soft-bg: #f5f7fa;
}

body {
  font-family: 'Noto Sans', sans-serif;
  color: #222;
  background: #fff;
}

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

/* The title breaks after "Tokens" (explicit <br>); balance keeps narrow screens tidy too */
.publication-title {
  text-wrap: balance;
}

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

.publication-authors a {
  color: hsl(204, 86%, 45%) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
  margin: 0 0.35em;
}

.affiliation-block {
  display: inline-block;
  margin: 0 0.6em;
}

.publication-venue {
  color: var(--muted);
  font-weight: bold;
}

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

.link-block .icon svg {
  width: 1em;
  height: 1em;
}

.section {
  padding: 2.5rem 1.5rem;
}

.section.soft {
  background: var(--soft-bg);
}

h2.title {
  color: var(--accent);
}

h3.title {
  margin-top: 1.5rem;
}

.figure {
  margin: 1rem 0 0.5rem;
  text-align: center;
}

.figure img,
.figure video {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.figure video {
  border-radius: 4px;
}

.figure.narrow img {
  max-width: 560px;
}

.caption {
  font-size: 0.95rem;
  color: var(--muted);
  text-align: justify;
  margin-top: 0.6rem;
}

/* TrackTok-only gallery under the token video + click-to-enlarge view */
.gallery-title {
  margin-top: 1.75rem;
  margin-bottom: 0.25rem !important;
}

.gallery-hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.gallery {
  margin-bottom: 2rem;
}

.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid #e3e6ea;
  border-radius: 4px;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  outline: none;
}

.gallery-item video {
  display: block;
  width: 100%;
  height: auto;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox video {
  width: min(96vw, 1400px);
  max-height: 85vh;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
}

.lightbox-hint {
  color: #ddd;
  font-size: 0.85rem;
}

.highlights {
  list-style: none;
  margin: 0 auto;
  max-width: 820px;
}

.highlights li {
  margin: 0.7rem 0;
  font-size: 1.05rem;
}

.highlights li::before {
  content: '✓';
  color: var(--accent);
  font-weight: bold;
  padding-right: 0.6rem;
}

.method-steps li {
  margin: 0.35rem 0;
}

.results-table {
  margin: 1rem auto 0;
  font-size: 0.95rem;
}

/* Charts drawn by static/js/charts.js. Series colours were run through the colour-blind
   palette check (TrackTok = page accent); pink sits below 3:1 on white, so every chart also
   carries direct labels and a data table. */
.chart {
  --c-tracktok: #0065aa;
  --c-larp: #008300;
  --c-adaptok: #e87ba4;
  --c-other: #898781;
  --ink-1: #1f1f1d;
  --ink-2: #52514e;
  --ink-muted: #767570;
  --grid: #e9e8e2;
  --axis: #c3c2b7;
  position: relative;
  background: #fff;
  border: 1px solid rgba(11, 11, 11, 0.08);
  border-radius: 6px;
  padding: 10px 12px 6px;
  margin-top: 0.5rem;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  font-size: 0.8rem;
  color: var(--ink-2);
  margin: 0 0 0.25rem 0.25rem;
}

.chart .key {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.chart .key-line {
  width: 16px;
  height: 2px;
  border-radius: 1px;
}

.chart .key-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.chart .key-none {
  width: 9px;
}

.chart-plot {
  position: relative;
}

.chart-plot svg {
  display: block;
  overflow: visible;
  outline: none;
}

.chart-plot svg:focus-visible {
  outline: 2px solid var(--c-tracktok);
  outline-offset: 2px;
  border-radius: 4px;
}

.chart svg text {
  font-family: 'Noto Sans', sans-serif;
}

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

.chart .axis {
  stroke: var(--axis);
  stroke-width: 1;
}

.chart .tick {
  font-size: 11px;
  fill: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.chart .axis-title {
  font-size: 11.5px;
  fill: var(--ink-2);
}

.chart .line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart .dot,
.chart .bubble {
  stroke: #fff;
  stroke-width: 2;
}

.chart .bubble {
  fill-opacity: 0.9;
}

.chart .size-key {
  fill: none;
  stroke: var(--axis);
  stroke-width: 1;
}

.chart .series-label {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink-1);
}

.chart .series-label.ours {
  fill: var(--c-tracktok);
}

.chart .other-label {
  font-size: 11px;
  fill: var(--ink-2);
}

.chart .leader {
  stroke: var(--axis);
  stroke-width: 1;
}

.chart .band {
  fill: #f2f6fb;
}

.chart .band-label {
  font-size: 11px;
  fill: var(--ink-muted);
}

/* Annotations follow the paper: red dashed arrows with red labels */
.chart {
  --c-note: #c62828;
}

.chart .note-line {
  fill: none;
  stroke: var(--c-note);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.chart .note-head {
  fill: var(--c-note);
  stroke: none;
}

.chart .note-text {
  font-size: 11.5px;
  font-weight: 700;
  fill: var(--c-note);
}

.chart .crosshair {
  stroke: var(--ink-muted);
  stroke-width: 1;
  pointer-events: none;
}

.chart-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: #fff;
  border: 1px solid rgba(11, 11, 11, 0.12);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  padding: 6px 9px;
  font-size: 0.78rem;
  color: var(--ink-2);
  white-space: nowrap;
}

.chart-tip .tip-title {
  color: var(--ink-1);
  font-weight: 600;
  margin-bottom: 2px;
}

.chart-tip .tip-row strong {
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}

.chart-data {
  margin: 0.2rem 0 0.2rem 0.25rem;
}

.chart-data summary {
  font-size: 0.78rem;
  color: var(--ink-muted);
  cursor: pointer;
}

.chart-data .results-table {
  font-size: 0.78rem;
  margin: 0.4rem 0 0.2rem;
}

/* UCF-101 generation table and K600 frame-prediction plot side by side */
.side-by-side {
  margin-top: 0.5rem;
}

.side-by-side h3.title {
  margin-top: 0.5rem;
}

.side-by-side .results-table {
  font-size: 0.85rem;
}

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

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

.results-table tr.ours td {
  background: #eaf3fb;
}

.results-table .best {
  font-weight: bold;
}

.table-container {
  overflow-x: auto;
}

pre {
  background: var(--soft-bg);
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: pre;
  overflow-x: auto;
}

.footer {
  padding: 2rem 1.5rem;
  background: #fafafa;
}

@media (max-width: 768px) {
  .section {
    padding: 2rem 1rem;
  }

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

  .compression-arrow {
    font-size: 0.8rem;
  }

  .publication-title {
    font-size: 1.75rem !important;
  }
}

.chart-heading {
  font-size: 0.95rem;
  color: #363636;
  margin-bottom: 0.1rem;
}

/* Arrow over the UCF-101 generation columns: LARP 1024 -> TrackTok 256 -> 128 -> 32 tokens */
.compression-arrow {
  position: relative;
  margin-bottom: 0.4rem;
  padding-bottom: 14px;
  text-align: center;
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

/* green, darkening along the arrow as compression increases */
.compression-text {
  color: #1b7a3a;
  background: linear-gradient(90deg, #43a862, #0b6b2e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.compression-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 10px;
  bottom: 4px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #cdebd3, #6cc17f 45%, #0b6b2e);
}

.compression-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  border-left: 13px solid #0b6b2e;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* YouTube-VIS table: full width under the full-width video */
.tracking-table {
  margin-top: 1.75rem;
}

.tracking-table .results-table {
  margin: 0;
  font-size: 1.05rem;
}

.tracking-table .results-table th,
.tracking-table .results-table td {
  padding: 0.6em 0.85em;
}
