/* Long-form layout for the GameBench 2 technical report and its companion post. Both pages are
   generated from Markdown; colours come from the shared tokens, so light and dark both work. */

/* The article is a grid item; without this, a wide table would widen the whole page on phones
   instead of scrolling inside its wrapper. */
.gb2-publication {
  min-width: 0;
}

/* Long policy identifiers and spelled-out source URLs must wrap on phones. */
.gb2-publication p,
.gb2-publication li {
  overflow-wrap: break-word;
}

.gb2-publication code,
.gb2-publication li a {
  overflow-wrap: anywhere;
}

.gb2-publication h2 {
  scroll-margin-top: 5.5rem;
}

.gb2-publication h3 {
  scroll-margin-top: 5.5rem;
}

.gb2-publication--report > h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* The research page's download line, under the title. */
.report-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  margin: 0.25rem 0 0.5rem;
}

.blog-post .report-download a {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--mint-line);
  border-radius: var(--radius-sm);
  background: var(--mint-soft);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.blog-post .report-download a:hover,
.blog-post .report-download a:focus-visible {
  border-color: var(--mint);
}

.report-download__details {
  color: var(--muted);
  font-size: 0.9rem;
}

.report-toc {
  max-width: 72ch;
  margin: 1.5rem 0 2rem;
  padding: 0.9rem 1.15rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}

.blog-post .report-toc__title {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-post .report-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 15rem;
  column-gap: 2rem;
}

.blog-post .report-toc li {
  margin: 0 0 0.35rem;
  break-inside: avoid;
  font-size: 0.94rem;
}

.blog-post .report-toc li + li {
  margin-top: 0;
}

.blog-post .report-toc a {
  color: var(--text);
  text-decoration: none;
}

.blog-post .report-toc a:hover,
.blog-post .report-toc a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.gb2-publication blockquote {
  max-width: 72ch;
  margin: 1.5rem 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 3px solid var(--line-strong);
}

/* Figures and tables of a few columns stay as wide as the text, so captions keep a readable line
   length; tables with many columns use the full article width. */
.gb2-publication .gbr-figure,
.gb2-publication .blog-table-wrap:not(:has(.report-table-wide)) {
  max-width: 72ch;
}

.blog-table thead td {
  background: var(--panel-2);
}

.blog-table th.center,
.blog-table td.center {
  text-align: center;
}

.blog-table tbody th {
  color: var(--text);
  font-weight: 600;
}

/* Tables with many columns scroll sideways on phones instead of squeezing every cell. */
.blog-table.report-table-wide {
  min-width: 46rem;
}

.report-figure-placeholder {
  max-width: 72ch;
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border: 2px dashed var(--accent-warm);
  border-radius: var(--radius-md);
}

.blog-post .report-figure-placeholder p {
  margin: 0;
  color: var(--accent-warm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
