/* ---------------------------------------------------------------------------
   about.css — a game's details as every view shows them (assets/js/ui/about.js):
   what it is, how it was made and what has become of it on 52in1. It takes the
   colours of the text around it, so it reads the same in the dark drawer, on
   the Couch, in Library and on the Catalogue's paper; the game's own colour
   (--g-light, set by every view's details) marks its figures.
--------------------------------------------------------------------------- */

.about {
  --about-dim: color-mix(in srgb, currentColor 66%, transparent);
  --about-line: color-mix(in srgb, currentColor 15%, transparent);
  --about-tile: color-mix(in srgb, currentColor 6%, transparent);
  --about-mark: var(--g-light, currentColor);
  display: grid;
  gap: 1.6rem;
  min-width: 0;
}

.about__part {
  min-width: 0;
}

.about__head {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--about-dim);
}

.about__facts {
  margin: 0;
  border-top: 1px solid var(--about-line);
}

.about__row {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--about-line);
  font-size: 0.92em;
}

.about__row dt {
  flex: none;
  color: var(--about-dim);
}

.about__row dd {
  margin: 0;
  min-width: 0;
  text-align: end;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

/* A second line under a value: the lab under a model, when the build was last changed. */
.about__note {
  display: block;
  margin-top: 0.1rem;
  color: var(--about-dim);
  font-size: 0.86em;
}

/* The plays (ui/plays.js) wait for the hub's counts, and where they were played for a first play. */
.about__row[hidden],
.about__note[hidden] {
  display: none;
}

.plays__place {
  white-space: nowrap;
}

.about__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
  padding: 0;
}

.about__tag {
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--about-line);
  border-radius: 999px;
  font-size: 0.82em;
}

/* The build record's figures, as tiles. */
.about__stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.2rem, 1fr));
  gap: 0.45rem;
  margin: 0.8rem 0 0;
  padding: 0;
}

.about__stats .stat {
  display: grid;
  align-content: start;
  gap: 0.1rem;
  padding: 0.6rem 0.65rem;
  border-radius: 0.55rem;
  background: var(--about-tile);
  border: 1px solid var(--about-line);
}

.about__stats .stat__icon {
  font-size: 1.05rem;
  line-height: 1;
}

.about__stats .stat__value {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.about__stats .stat.is-cost .stat__value,
.about__stats .stat.is-minutes .stat__value {
  color: var(--about-mark);
}

.about__stats .stat__label {
  color: var(--about-dim);
  font-size: 0.8rem;
  line-height: 1.3;
}

.about__more,
.about__fun {
  margin: 0.65rem 0 0;
  font-size: 0.9em;
}

.about__more {
  color: var(--about-dim);
}

.about__fun::before {
  content: '📚 ';
}

/* The record itself, a click away. */
.about__raw {
  margin-top: 0.75rem;
}

.about__raw summary {
  display: inline-block;
  list-style: none;
  padding: 0.2rem 0;
  color: var(--about-dim);
  font-size: 0.88em;
  cursor: pointer;
}

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

.about__raw summary::before {
  content: '▸ ';
}

[dir='rtl'] .about__raw summary::before {
  content: '◂ ';
}

.about__raw[open] summary::before {
  content: '▾ ';
}

.about__raw summary:hover {
  color: inherit;
}

.about .json {
  margin: 0.4rem 0 0;
  padding: 0.7rem 0.85rem;
  overflow-x: auto;
  background: var(--about-tile);
  border: 1px solid var(--about-line);
  border-radius: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  text-align: start;
  white-space: pre;
}

.about .json__key {
  color: var(--about-dim);
}

.about .json__number {
  font-weight: 700;
}

.about .json__line.is-mark .json__string {
  color: var(--about-mark);
  font-weight: 700;
}

/* The creator's credit in a game's details (ui/credit.js). */
.about__row.is-creator .credit {
  color: inherit;
  font-weight: 600;
}
.about__row.is-creator .credit__mark {
  margin-inline-start: 0.25em;
  font-size: 0.8em;
  color: var(--attract);
}
