/* Service pages: My progress (me-), About (ab-), Sources (src-), A to Z (gl-). Everything else is the ten blocks. */
@layer pages {
  /* My progress: three bars, each a link to its list; one "Saved on this device" line is the lede */
  .me-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .me-bars a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 10px 12px; padding: 14px; border-radius: var(--r2); background: var(--s1); color: var(--tx); text-decoration: none; }
  .me-bar-t { font: 800 22px/1 var(--disp); text-transform: uppercase; letter-spacing: .01em; }
  .me-bars .prog, .me-bars .prog-row { display: contents; }
  .me-bars .prog-row b { font-size: 15px; font-weight: 600; color: var(--tx2); }
  .me-bars .prog-row span { display: none; }
  .me-bars .bar { grid-column: 1 / -1; }
  .me-bars a:hover .me-bar-t { color: var(--ac); }
  /* My progress: the 100% rows started but not done, under the bars */
  .me-started { margin-top: 24px; }
  .me-started h3 { margin: 0 0 4px; font-size: 22px; line-height: 1.1; }
  [data-me-start] .sec-lede { margin-top: 0; }
  .me-msg { margin: 10px 0 0; color: var(--tx2); }
  .me-msg:empty { display: none; }
  [data-page="me"] .spoilset { margin-top: 8px; }

  /* Sources: rows that are not links carry no arrow */
  span.item::after { content: none; }
  span.item { min-height: 0; }
  .src-list { margin-top: 12px; }

  /* About: plain paragraphs under a section heading */
  [data-page="about"] .sec > p { margin: 10px 0 0; max-width: 70ch; }

  /* About: the photo credits behind "Show all" */
  .ab-photos { margin-top: 16px; }
  .ab-photos summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px; background: var(--s2); color: var(--tx); font-weight: 600; cursor: pointer; list-style: none; }
  .ab-photos summary::-webkit-details-marker { display: none; }
  .ab-labels th[scope=row] { width: 96px; }

  /* A to Z: a letter heading needs less room than a section heading */
  .gl-letter { margin-top: 28px; }
  [data-page="glossary"] .jumps { gap: 0; }
  [data-page="glossary"] .jumps a { justify-content: center; min-width: 44px; }

  @media (min-width: 900px) {
    .me-bars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    /* Quick facts and About: tables side by side instead of one wide table with an empty middle */
    .fx-first { max-width: calc(50% - 24px); }
    .fx-groups { columns: 2; column-gap: 48px; }
    .fx-groups > .sec { break-inside: avoid; }
    .ab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; align-items: start; }
    [data-page="about"] #credits { grid-column: 1 / -1; }
  }
}
