/* The default theme of coffer.

   Everything that decides how the theme looks is a custom property below, so a
   site theme can restyle the engine's pages by overriding variables only (see
   docs/themes.md). Light values are on :root; dark values are repeated under the
   system preference and under [data-theme="dark"], and light is forced under
   [data-theme="light"]. Nothing here animates or transitions. */

:root {
  --coffer-bg: #ffffff;
  --coffer-text: #1b1b1f;
  --coffer-muted: #5a5a63;
  --coffer-accent: #0b5cad;
  --coffer-border: #d3d3da;
  --coffer-code-bg: #f3f3f6;
  --coffer-code-fg: #1b1b1f;

  --coffer-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --coffer-font-heading: var(--coffer-font-body);
  --coffer-font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --coffer-measure: 68ch;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --coffer-bg: #16181d;
    --coffer-text: #e8e8ec;
    --coffer-muted: #a9a9b3;
    --coffer-accent: #7ab7ff;
    --coffer-border: #3a3e48;
    --coffer-code-bg: #20232a;
    --coffer-code-fg: #e8e8ec;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --coffer-bg: #16181d;
  --coffer-text: #e8e8ec;
  --coffer-muted: #a9a9b3;
  --coffer-accent: #7ab7ff;
  --coffer-border: #3a3e48;
  --coffer-code-bg: #20232a;
  --coffer-code-fg: #e8e8ec;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --coffer-bg: #ffffff;
  --coffer-text: #1b1b1f;
  --coffer-muted: #5a5a63;
  --coffer-accent: #0b5cad;
  --coffer-border: #d3d3da;
  --coffer-code-bg: #f3f3f6;
  --coffer-code-fg: #1b1b1f;

  color-scheme: light;
}

/* Base ------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--coffer-bg);
  color: var(--coffer-text);
  font-family: var(--coffer-font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--coffer-font-heading);
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}

h1 {
  font-size: 2rem;
  margin-top: 1rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4,
h5,
h6 {
  font-size: 1.0625rem;
}

p,
ul,
ol,
dl,
blockquote,
figure,
pre,
table {
  margin: 0 0 1rem;
}

a {
  color: var(--coffer-accent);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--coffer-accent);
  outline-offset: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--coffer-border);
  margin: 2rem 0;
}

blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 4px solid var(--coffer-border);
  color: var(--coffer-muted);
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

th,
td {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--coffer-border);
  text-align: left;
}

/* Code ------------------------------------------------------------------- */

code,
pre,
kbd,
samp {
  font-family: var(--coffer-font-mono);
  font-size: 0.9em;
}

:not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 3px;
  background: var(--coffer-code-bg);
  color: var(--coffer-code-fg);
}

pre {
  padding: 1rem;
  border: 1px solid var(--coffer-border);
  border-radius: 4px;
  background: var(--coffer-code-bg);
  color: var(--coffer-code-fg);
  line-height: 1.5;
  overflow-x: auto;
  tab-size: 4;
}

/* Highlighted code: Shiki writes both colour schemes as variables, and these
   rules choose one. The three groups below must stay in the same order. */
.shiki,
.shiki span {
  color: var(--shiki-light);
}

.shiki {
  background-color: var(--shiki-light-bg);
}

@media (prefers-color-scheme: dark) {
  .shiki,
  .shiki span {
    color: var(--shiki-dark);
  }

  .shiki {
    background-color: var(--shiki-dark-bg);
  }
}

:root[data-theme="dark"] .shiki,
:root[data-theme="dark"] .shiki span {
  color: var(--shiki-dark);
}

:root[data-theme="dark"] .shiki {
  background-color: var(--shiki-dark-bg);
}

:root[data-theme="light"] .shiki,
:root[data-theme="light"] .shiki span {
  color: var(--shiki-light);
}

:root[data-theme="light"] .shiki {
  background-color: var(--shiki-light-bg);
}

/* Page frame ------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--coffer-bg);
  border: 2px solid var(--coffer-accent);
  z-index: 10;
}

.skip-link:focus {
  top: 0.5rem;
}

.site-header,
.site-footer,
main {
  width: 100%;
  max-width: calc(var(--coffer-measure) + 22rem);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--coffer-border);
}

.site-title {
  font-family: var(--coffer-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--coffer-text);
  text-decoration: none;
}

.site-header nav {
  flex: 1 1 auto;
}

.site-header ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header nav a {
  display: inline-block;
  padding: 0.25rem 0;
}

main {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

main > *,
main > article > * {
  max-width: var(--coffer-measure);
}

main > article > .post-layout {
  max-width: none;
}

.post-layout .post-body {
  max-width: var(--coffer-measure);
}

.site-footer {
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--coffer-border);
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: inherit;
}

/* The theme switch: the script in the page adds the class "js" to <html>, so
   the button exists only where it can work. */
.theme-switch {
  display: none;
  margin-left: auto;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--coffer-border);
  border-radius: 4px;
  background: var(--coffer-bg);
  color: var(--coffer-text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.js .theme-switch {
  display: inline-block;
}

/* Posts and lists -------------------------------------------------------- */

.post-meta,
.preview-note {
  color: var(--coffer-muted);
  font-size: 0.9375rem;
  margin: 0 0 0.75rem;
}

.preview-note {
  padding: 0.5rem 0.75rem;
  border: 1px dashed var(--coffer-border);
}

.preview-banner {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-style: solid;
  border-width: 1px 1px 1px 0.375rem;
}

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--coffer-border);
}

.post-item h2,
.post-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.post-item .post-meta {
  margin-bottom: 0.25rem;
}

.post-summary {
  margin: 0;
}

.post-layout {
  display: block;
}

.post-body {
  min-width: 0;
}

.post-body img,
.post-body pre {
  max-width: 100%;
}

.post-body figure {
  margin: 1.5rem 0;
}

.post-body figure picture,
.post-body figure img {
  display: block;
}

.js .post-body a.viewer-link {
  cursor: zoom-in;
}

.post-body figure a.viewer-link {
  display: block;
}

.post-body figcaption {
  margin-top: 0.4rem;
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

.post-body pre {
  overflow-x: auto;
}

/* Carousels ---------------------------------------------------------------
   A carousel is a row of slides that scrolls sideways and snaps to each slide,
   so it can be swiped, and scrolled with the keyboard or a wheel, without a
   script. carousel.js adds buttons and a position on top. Nothing moves by
   itself and nothing is animated. */

.carousel {
  margin: 1.5rem 0;
}

.carousel .carousel-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
}

.carousel .carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.carousel .carousel-slide figure {
  margin: 0;
}

.carousel .carousel-slide img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.carousel .carousel-slide figcaption {
  margin-top: 0.4rem;
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.carousel-button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--coffer-border);
  border-radius: 4px;
  background: transparent;
  color: var(--coffer-text);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.carousel-button[aria-disabled="true"] {
  color: var(--coffer-muted);
  cursor: default;
  opacity: 0.5;
}

.carousel-position {
  color: var(--coffer-muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.toc {
  margin: 0 0 1.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--coffer-border);
  border-radius: 4px;
  font-size: 0.9375rem;
}

.toc summary {
  cursor: pointer;
  font-weight: 600;
}

.toc ol {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.toc .toc-depth-3 {
  margin-left: 1rem;
}

/* On a wide screen the table of contents sits beside the text and stays open. */
@media (min-width: 60rem) {
  .post-layout.has-toc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16rem;
    column-gap: 2rem;
    align-items: start;
  }

  .post-layout.has-toc .post-body {
    grid-column: 1;
    grid-row: 1;
  }

  .post-layout.has-toc .toc {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }

  .toc summary {
    cursor: default;
    pointer-events: none;
    list-style: none;
  }

  .toc summary::-webkit-details-marker {
    display: none;
  }

  .toc::details-content {
    content-visibility: visible;
    display: block;
  }
}

/* The home page: links under the about text, and the less prominent ones last. */
.home-links ul,
.secondary-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.secondary-links {
  margin-top: 2rem;
  font-size: 0.875em;
}

/* Search: the page explains itself until search.js (which needs Pagefind) sets
   data-search-ready on it; only then do the form and the results show. */
.search-form,
.search-status,
.search-results {
  display: none;
}

.search[data-search-ready] .search-form {
  display: block;
}

.search[data-search-ready] .search-status {
  display: block;
}

.search[data-search-ready] .search-results {
  display: block;
}

.search[data-search-ready] .search-nojs {
  display: none;
}

.search-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.search-input {
  width: 100%;
  max-width: var(--coffer-measure);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--coffer-border);
  border-radius: 4px;
  background: var(--coffer-bg);
  color: var(--coffer-text);
  font: inherit;
}

.search-status {
  min-height: 1.5em;
  margin: 0.75rem 0;
  color: var(--coffer-muted);
}

.search-results {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-result {
  margin: 0 0 1.5rem;
  max-width: var(--coffer-measure);
}

.search-result-title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
}

.search-result-excerpt {
  margin: 0;
}

.search-result-excerpt mark {
  background: transparent;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

/* Small screens ---------------------------------------------------------- */

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  .theme-switch {
    margin-left: 0;
  }
}

/* Print ------------------------------------------------------------------ */

@media print {
  :root,
  :root[data-theme] {
    --coffer-bg: #ffffff;
    --coffer-text: #000000;
    --coffer-muted: #333333;
    --coffer-accent: #000000;
    --coffer-border: #999999;
    --coffer-code-bg: #ffffff;
    --coffer-code-fg: #000000;

    color-scheme: light;
  }

  .shiki,
  .shiki span,
  :root[data-theme] .shiki,
  :root[data-theme] .shiki span {
    color: var(--shiki-light);
  }

  .shiki,
  :root[data-theme] .shiki {
    background-color: var(--shiki-light-bg);
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  .skip-link,
  .site-header nav,
  .theme-switch,
  .home-links,
  .secondary-links,
  .toc {
    display: none;
  }

  .site-header,
  .site-footer,
  main {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  .site-header,
  .site-footer {
    border: 0;
  }

  main > *,
  main > article > *,
  .post-layout .post-body {
    max-width: none;
  }

  a {
    color: inherit;
  }

  .post-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }

  pre {
    white-space: pre-wrap;
    overflow: visible;
    break-inside: avoid;
  }

  img,
  figure,
  blockquote,
  table {
    break-inside: avoid;
  }

  /* On paper every slide is printed, one under the other. */
  .carousel .carousel-track {
    display: block;
    overflow: visible;
  }

  .carousel-controls {
    display: none;
  }

  h1,
  h2,
  h3,
  h4 {
    break-after: avoid;
  }
}

.tags-link,
.feed-link,
.breadcrumbs,
.post-tags,
.tag-count,
.tag-description {
  color: var(--coffer-muted);
  font-size: 0.9375rem;
}

.tags-link,
.feed-link {
  margin: 0 0 1rem;
}

.breadcrumbs ol,
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.75rem;
}

.tag-tree ul {
  margin: 0.25rem 0;
  padding-left: 1.25rem;
}

.tag-tree > ul {
  padding-left: 0;
  list-style: none;
}

.tag-children ul {
  margin: 0;
  padding-left: 1.25rem;
}

.series-nav {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--coffer-border);
  font-size: 0.9375rem;
}

.series-nav .series-title {
  margin: 0;
}

.series-part,
.series-kicker,
.series-count,
.series-label {
  color: var(--coffer-muted);
}

.series-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.series-label {
  display: block;
  font-size: 0.8125rem;
}

.series-kicker,
.series-count,
.post-item > .series-part {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
}

/* Projects: the cards on the home page and on the projects page, and a project's page. */
.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1.25rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.project-cards > li {
  display: flex;
}

.project-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  border: 1px solid var(--coffer-border);
  border-radius: 0.375rem;
  overflow: hidden;
}

.project-card-picture img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-card-text {
  padding: 0.75rem 1rem 1rem;
}

.project-card-title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

/* The name is the link; it covers the whole card so the picture is clickable too. */
.project-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project-meta {
  margin: 0 0 0.25rem;
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

.project-pitch {
  margin: 0;
}

.project-header .project-pitch {
  font-size: 1.125rem;
}

.project-license,
.all-projects {
  color: var(--coffer-muted);
  font-size: 0.9375rem;
}

/* Posts about a project: the badge near the title, the block at the end, and the list on the project's page. */
.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}

.project-badge {
  display: inline-block;
  padding: 0.0625rem 0.5rem;
  border: 1px solid var(--coffer-border);
  border-radius: 999px;
  color: var(--coffer-muted);
  font-size: 0.8125rem;
  text-decoration: none;
}

.project-badge:hover,
.project-badge:focus-visible {
  border-color: var(--coffer-accent);
  color: var(--coffer-accent);
}

.project-block {
  margin: 2rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--coffer-border);
  border-radius: 0.375rem;
}

.project-block-kicker {
  margin: 0 0 0.25rem;
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

.project-block-title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.project-block-links,
.project-latest-list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.project-block-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.project-block-posts h3 {
  margin: 0.75rem 0 0.25rem;
  color: var(--coffer-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.project-block-posts ul {
  margin: 0;
  padding-left: 1.25rem;
}

.project-block-posts time,
.project-latest-item time {
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

.project-latest {
  margin: 1.5rem 0;
}

.project-latest-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--coffer-border);
}

.project-latest-item .post-summary {
  color: var(--coffer-muted);
  font-size: 0.9375rem;
}

/* A tool's page: the facts box under the heading (source, documentation, license). */
.project-facts {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--coffer-border);
  border-radius: 0.375rem;
}

.project-facts h2 {
  margin: 0 0 0.5rem;
  color: var(--coffer-muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-facts dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0;
}

.project-fact dt {
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

.project-fact dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* A project's documentation: breadcrumbs, a sidebar with the pages in their order
   (above the text on a narrow screen, beside it on a wide one), the page, and
   previous and next. Theme colours only; nothing moves. */
.docs {
  max-width: none;
}

.docs-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

.docs-breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
}

.docs-sidebar {
  margin: 0 0 1.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--coffer-border);
  border-radius: 0.375rem;
  font-size: 0.9375rem;
}

.docs-sidebar-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.docs-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-sidebar a {
  display: block;
  padding: 0.3rem 0;
  overflow-wrap: anywhere;
}

.docs-sidebar a[aria-current="page"] {
  color: var(--coffer-text);
  font-weight: 700;
  text-decoration: none;
}

.docs-page {
  min-width: 0;
}

.docs-page > * {
  max-width: var(--coffer-measure);
}

.docs-index-list {
  padding-left: 1.25rem;
}

.docs-pager ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin: 2rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--coffer-border);
  list-style: none;
}

.docs-next {
  margin-left: auto;
  text-align: right;
}

.docs-pager-label {
  display: block;
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

.docs-source {
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

@media (min-width: 60rem) {
  .docs-layout {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    column-gap: 2rem;
    align-items: start;
  }

  .docs-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    margin: 0;
    overflow-y: auto;
  }
}

@media print {
  .docs-breadcrumbs,
  .docs-sidebar,
  .docs-pager {
    display: none;
  }
}

/* A game's page. Only the wrapper .game-page is restyled: the site header and
   footer are outside it. A game may set --project-accent, --project-on-accent
   (a readable text colour on the accent) and --project-font in the style
   attribute of the wrapper; without them the theme's own colours and heading
   font apply. */
.game-page h1,
.game-page h2,
.game-page h3,
.game-page .project-pitch {
  font-family: var(--project-font, var(--coffer-font-heading));
}

.game-hero {
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--project-accent, var(--coffer-border));
}

.game-logo {
  margin: 0 0 0.75rem;
}

.game-logo img {
  display: block;
  max-width: min(100%, 20rem);
  height: auto;
}

.game-key-art {
  margin-top: 1rem;
}

.game-key-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.375rem;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0;
}

.game-actions p {
  margin: 0;
}

.game-button {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 0.375rem;
  background: var(--project-accent, var(--coffer-accent));
  color: var(--project-on-accent, var(--coffer-bg));
  font-family: var(--project-font, var(--coffer-font-body));
  font-weight: 600;
  text-decoration: none;
}

.game-button:hover {
  text-decoration: underline;
}

.game-trailer video,
.game-trailer .game-embed {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0.375rem;
  background: var(--coffer-code-bg);
}

.game-features ul {
  padding-left: 1.25rem;
}

.game-features li::marker {
  color: var(--project-accent, var(--coffer-accent));
}

.game-details {
  border-color: var(--project-accent, var(--coffer-border));
}

/* The press kit of a game: factsheet, descriptions, and thumbnails with a link
   to the full-resolution file. */
.press-kit {
  margin: 2rem 0 1rem;
  padding-top: 1rem;
  border-top: 3px solid var(--project-accent, var(--coffer-border));
}

.press-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.75rem 1.5rem;
  margin: 1rem 0;
}

.press-fact dt {
  color: var(--coffer-muted);
  font-size: 0.875rem;
}

.press-fact dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.press-description h3,
.press-assets h3 {
  font-size: 1.0625rem;
}

.press-asset-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.press-asset figure {
  margin: 0;
}

.press-thumbnail {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6rem;
  padding: 0.5rem;
  border: 1px solid var(--coffer-border);
  border-radius: 0.375rem;
  background: var(--coffer-code-bg);
}

.press-thumbnail picture {
  display: contents;
}

.press-thumbnail img {
  display: block;
  max-width: 100%;
  max-height: 10rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

.press-asset figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.4rem;
  font-size: 0.9375rem;
}

.press-asset-name {
  font-weight: 600;
}

.press-download {
  overflow-wrap: anywhere;
}

/* The share summary at the end of a post: collapsed until the visitor opens it. The copy
   button comes with the `hidden` attribute and is shown by share.js, so that it is only
   there when it works. */
.share {
  margin: 2rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--coffer-border);
  border-radius: 4px;
  font-size: 0.9375rem;
}

.share summary {
  cursor: pointer;
  font-weight: 600;
}

.share-hint {
  margin: 0.75rem 0 0.5rem;
  color: var(--coffer-muted);
}

.share-text {
  margin: 0;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--coffer-code-bg);
  color: var(--coffer-code-fg);
  font-family: var(--coffer-font-body);
  font-size: 0.9375rem;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0.75rem 0 0;
}

.share-copy[hidden] {
  display: none;
}

.share-status {
  color: var(--coffer-muted);
}
