/* T-LESSA page styles, layered on the lab's Bulma template (index.css). */

:root {
  --ink: #222;
  --muted: #666;
  --line: #e4e4e4;
  --panel: #f7f7f5;
  --ours: #2e7d5b;
  --ours-bg: #eef6f1;
  /* Event colors follow the teaser figure: A orange, B teal, C purple, D blue. */
  --ev-a: #d9822b;
  --ev-b: #2f8f7f;
  --ev-c: #8a56b0;
  --ev-d: #4a7fd0;
  --ev-never: #d0413e;
}

body {
  color: var(--ink);
  background: #fff;
}

section.page-section {
  padding: 2.5rem 1.5rem;
}

.section-title {
  font-family: 'Google Sans', sans-serif;
  text-align: center;
  margin-bottom: 1.25rem !important;
}

.section-lead {
  max-width: 46rem;
  margin: 0 auto 1.5rem;
  text-align: center;
  color: var(--muted);
}

.release-statement {
  font-size: 0.85rem;
  color: var(--muted);
}

.publication-title .name {
  color: var(--ours);
}

.publication-links .button.is-static {
  opacity: 0.55;
}

figure.figure-block {
  margin: 0 auto;
  text-align: center;
}

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

figure.figure-block figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.75rem;
  text-align: left;
}

.tldr {
  max-width: 46rem;
  margin: 2rem auto 0;
  font-size: 1.15rem;
  text-align: center;
  font-family: 'Google Sans', sans-serif;
}

/* Headline numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem auto 0;
  max-width: 60rem;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 0.9rem;
  text-align: center;
  background: #fff;
}

.stat .num {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ours);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat .label {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* Method steps */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.step > div {
  min-width: 0;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--ours);
  color: #fff;
  display: grid;
  place-items: center;
}

.step h3 {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.step p {
  margin-bottom: 0.4rem;
}

.math-block {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.2rem 0;
}

.theorem {
  border-left: 3px solid var(--ours);
  background: var(--ours-bg);
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  margin-top: 1.25rem;
}

/* TLVBench classes */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.spec-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: #fff;
}

.spec-card .kicker {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec-card h3 {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.15rem 0 0.35rem;
}

.spec-card .formula {
  font-size: 1.05rem;
  margin: 0.3rem 0 0.5rem;
}

.spec-card .example {
  font-size: 0.9rem;
  color: #444;
  background: var(--panel);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
}

/* Event highlighting, shared by TLVBench examples and the gallery */
.ev {
  border-bottom: 2px solid var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
  border-radius: 2px;
  padding: 0 1px;
}

.ev.never {
  text-decoration: line-through;
  text-decoration-color: var(--ev-never);
  text-decoration-thickness: 1.5px;
}

.ev .tag,
.sym {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  color: var(--c);
}

.ev .tag {
  font-size: 0.7em;
  margin-left: 2px;
  vertical-align: super;
  line-height: 0;
}

.c-A { --c: var(--ev-a); }
.c-B { --c: var(--ev-b); }
.c-C { --c: var(--ev-c); }
.c-D { --c: var(--ev-d); }
.c-never { --c: var(--ev-never); }

/* Gallery */
.g-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.g-tab {
  border: 1px solid #363636;
  background: #fff;
  color: #363636;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.98rem;
  cursor: pointer;
}

.g-tab[aria-selected="true"] {
  background: #363636;
  color: #fff;
}

.g-about {
  max-width: 46rem;
  margin: 0 auto 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.g-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.g-filter-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.g-filter-row .g-row-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
}

.g-pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.86rem;
  cursor: pointer;
  color: #444;
}

.g-pill[aria-pressed="true"] {
  border-color: var(--ours);
  background: var(--ours-bg);
  color: var(--ours);
  font-weight: 600;
}

.g-pill .count {
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.g-list {
  display: grid;
  gap: 1.25rem;
}

.g-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.1rem;
  background: #fff;
}

.g-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.g-badge {
  font-family: 'Google Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 0.12rem 0.45rem;
  background: #363636;
  color: #fff;
}

.g-bb {
  font-family: 'Google Sans', sans-serif;
  font-weight: 600;
}

.g-seed {
  color: var(--muted);
  font-size: 0.82rem;
}

.g-replay {
  margin-left: auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  color: #444;
}

.g-prompt {
  font-size: 1rem;
  line-height: 1.6;
}

.g-spec {
  margin-top: 0.3rem;
  font-size: 0.92rem;
  color: #444;
}

.g-given {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.g-given summary {
  cursor: pointer;
}

.g-clips {
  display: grid;
  grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.g-clip {
  margin: 0;
}

.g-clip figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.25rem;
}

.g-clip.ours figcaption {
  color: var(--ours);
}

.g-clip video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #eee;
  border: 2px solid transparent;
}

.g-clip.ours video {
  border-color: var(--ours);
}

.g-note {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: #444;
  background: var(--panel);
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
}

.g-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 0;
}

.g-more {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

/* Results */
.results-table {
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  margin: 0 auto;
}

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

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

.results-table thead th {
  text-align: center;
}

.results-table tr.ours td {
  background: var(--ours-bg);
}

.results-table tr.group-start td {
  border-top: 2px solid #ccc;
}

.results-table .sig {
  color: var(--ours);
  font-size: 0.8em;
}

.table-caption {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.6rem auto 0;
  max-width: 52rem;
}

.result-block {
  margin-bottom: 2.75rem;
}

.result-block h3 {
  font-family: 'Google Sans', sans-serif;
  text-align: center;
}

.bars {
  max-width: 34rem;
  margin: 1.25rem auto 0;
  display: grid;
  gap: 0.45rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr 3.4rem;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.bar-track {
  background: var(--panel);
  border-radius: 4px;
  height: 0.9rem;
  overflow: hidden;
}

.bar-fill {
  background: var(--ours);
  height: 100%;
  border-radius: 4px;
}

.bar-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

.bibtex-wrap {
  position: relative;
}

.bibtex-copy {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
}

@media (max-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  section.page-section {
    padding: 2rem 0.25rem;
  }

  .g-card {
    padding: 0.8rem;
  }

  .g-clips {
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  .g-clips.n3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
