/* Hand-written stylesheet, loaded on every page (see extra_css in
   zensical.toml). Nothing generates it. */

/* A page whose title carries `.toc-tops-only` shows only its level-2 sections
   in the right-hand table of contents.

   Zensical builds that sidebar from python-markdown's `toc` extension, whose
   `toc_depth` is a *site-wide* setting: turning the subsections off there
   would flatten the sommaire of every page, including the ones whose `###`
   entries are what a reader looks up (the atmxg keyword pages). So the page
   says it for itself, in its title:

       # Available question types { .toc-tops-only }

   The headings themselves are untouched — they keep their id, their
   permalink, and whatever links point at them from elsewhere. Only the
   sidebar stops listing them, so that what a reader scans there is the list
   of question types and not the hundred subsections under it. */
body:has(h1.toc-tops-only) .md-nav--secondary .md-nav__item .md-nav {
  display: none;
}

/* The polygon catalogue (docs/polygon_catalogue.md, generated by
   tools/polygons_contact_sheet.py).

   The figures come in as raw HTML inside the markdown, so the page carries no
   style of its own: a plain wrapping row of cells, each holding one drawing
   and the line that asks for it. Kept to the theme's own colours, so the
   sheet reads the same in light and dark. */
.polygon-sheet {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.polygon-sheet .cell {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  padding: .6rem;
  min-width: 9rem;
  text-align: center;
}
.polygon-sheet .cell figure {
  margin: 0 0 .5rem;
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.polygon-sheet .cell code {
  font-size: .78rem;
}
.polygon-sheet .cell .note {
  display: block;
  font-size: .72rem;
  color: var(--md-default-fg-color--light);
}
