/* 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);
}

/* Titles, figures and tables stay as wide as the text column, so the page keeps one measure on
   wide screens; a table with many columns scrolls sideways inside its wrapper instead. */
.gb2-publication h1,
.gb2-publication .gbr-figure,
.gb2-publication .blog-table-wrap {
  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;
}

/* Keep each value and its interval on one line; the wrapper scrolls if the table is too wide. */
.blog-table.report-table-wide td {
  white-space: nowrap;
}

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

  /* The row names stay in view while the table scrolls sideways (2026-11-07 phone checks). */
  .blog-table.report-table-wide tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--panel);
  }

  .blog-table.report-table-wide thead tr > :first-child {
    background: var(--panel-2);
  }
}

/* Number tags: ranks, scores and costs each keep one look across every release post, so a regular
   reader can tell them apart at a glance. All three share one size and weight. */
.gb2-publication :is(.n-rank, .n-score, .n-cost) {
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.gb2-publication .n-rank {
  padding: 0 0.38em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
}

/* Scores are marked with a tint, not the mint text colour links use. */
.gb2-publication .n-score {
  padding: 0 0.22em;
  border-radius: 0.25em;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--text);
}

/* Costs use a deeper gold than the dark page's bright amber (owner, 2026-11-20); the light page's
   amber is already dark. */
.gb2-publication .n-cost {
  color: var(--n-cost, var(--amber));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --n-cost: color-mix(in srgb, var(--amber) 72%, var(--bg));
  }
}

:root[data-theme="dark"] {
  --n-cost: color-mix(in srgb, var(--amber) 72%, var(--bg));
}

/* A score cell draws its score as a bar on a fixed 0-100 scale under the number. */
.blog-table--bars .n-bar {
  display: block;
  width: 100%;
  min-width: 4.5rem;
  height: 0.3rem;
  margin-top: 0.25rem;
  border-radius: 999px;
}

.blog-table--bars .n-bar__track {
  /* Strong enough to show the 0-100 range on the dark page too (owner check 2026-11-20). */
  fill: color-mix(in srgb, var(--text) 22%, transparent);
}

.blog-table--bars .n-bar__fill {
  fill: var(--accent);
}

.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;
}
