/* Site styles on top of MkDocs Material. Colours come from the theme, so both palettes work. */

/* These pages are mostly pictures: use a wider page than the default 61rem. */
.md-grid {
  max-width: 72rem;
}

/* Pictures and captions */
.md-typeset figure {
  margin: 1.2em auto;
}
.md-typeset figure img {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.3rem;
}
.md-typeset figcaption {
  color: var(--md-default-fg-color--light);
  font-size: 0.72rem;
  font-style: normal;
  margin: 0.4em auto 0;
  max-width: 34rem;
}

/* <figure markdown="span"> leaves a line break between the picture and its caption */
.md-typeset figure > br {
  display: none;
}

/* Picture grids: <div class="pic-grid cols-3" markdown> with one <figure markdown="span"> per picture */
.md-typeset .pic-grid {
  align-items: start;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin: 1.2em 0;
}
.md-typeset .pic-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md-typeset .pic-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.md-typeset .pic-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.md-typeset .pic-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media screen and (max-width: 44.98em) {
  .md-typeset .pic-grid.cols-3,
  .md-typeset .pic-grid.cols-4,
  .md-typeset .pic-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.md-typeset .pic-grid figure {
  display: block;
  margin: 0;
  width: 100%;
}
.md-typeset .pic-grid figure img {
  display: block;
  width: 100%;
}
.md-typeset .pic-grid figcaption {
  max-width: none;
  text-align: left;
}

/* A picture that shows a defect, and the same view after the fix */
.md-typeset figure img.defect {
  border: 3px solid #cf222e;
}
.md-typeset figure img.after {
  border: 3px solid var(--md-default-fg-color--light);
}

/* Diagrams kept as SVG files bring their own white panel */
.md-typeset figure img.diagram {
  border: 0;
  width: 100%;
}

/* Short keyword lists: <div class="chips" markdown> around a bullet list */
.md-typeset .chips ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0.8em 0;
  padding: 0;
}
.md-typeset .chips ul li {
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 1rem;
  font-size: 0.72rem;
  margin: 0;
  padding: 0.15rem 0.7rem;
}

/* Gate labels, one colour per gate, the same as in the pipeline picture */
.md-typeset .gate {
  border-radius: 1rem;
  color: #fff;
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.7rem;
}
.md-typeset .gate.structure { background: #64748b; }
.md-typeset .gate.model { background: #0b8a82; }
.md-typeset .gate.placement { background: #c2650a; }
.md-typeset .gate.runtime { background: #7a4fd6; }
.md-typeset .gate.surface { background: #d02d7c; }
.md-typeset .gate.final { background: #1f6feb; }
.md-typeset .gate.you { background: #1a7f37; }

/* One-line lead under a page title */
.md-typeset .lead {
  color: var(--md-default-fg-color--light);
  font-size: 0.95rem;
  margin-top: -0.6em;
}

/* Tables never push the page wider than the screen */
.md-typeset__table {
  max-width: 100%;
}
