/* Screenshots are taken at twice the window's size, for sharp text on
   high-density screens, and shown at the window's size, framed like one. */
.screenshot,
.walkthrough-image {
  display: block;
  max-width: 100%;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
}

/* A walkthrough: the picture, its caption, and the controls. */
.walkthrough {
  margin: 1em 0 1.5em;
  outline-offset: 4px;
}

.walkthrough-image {
  cursor: pointer;
}

.walkthrough-caption {
  min-height: 3em;
  margin: 0.6em 0 0.2em;
}

.walkthrough-bar {
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.walkthrough-button {
  padding: 0.1em 0.7em;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 4px;
  color: var(--md-default-fg-color);
  cursor: pointer;
}

.walkthrough-button:hover {
  border-color: var(--md-accent-fg-color);
  color: var(--md-accent-fg-color);
}

.walkthrough-dots {
  display: flex;
  gap: 0.35em;
}

.walkthrough-dot {
  width: 0.7em;
  height: 0.7em;
  padding: 0;
  border-radius: 50%;
  background: var(--md-default-fg-color--lighter);
  cursor: pointer;
}

.walkthrough-dot[aria-current="step"] {
  background: var(--md-primary-fg-color);
}

.walkthrough-counter {
  margin-left: auto;
  color: var(--md-default-fg-color--light);
  font-size: 0.8em;
}

/* Diagrams are drawn on white: keep them on white in the dark scheme. */
.diagram {
  display: block;
  max-width: 100%;
  margin: 1em auto;
  border-radius: 6px;
  background: #fff;
}

/* The home page's grid of screenshots. */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1em;
}

.shots figure {
  margin: 0;
}

/* Thumbnails of one shape, each window shown whole inside it. */
.shots img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 4px;
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
}

.shots a {
  color: inherit;
  text-decoration: none;
}

.shots a:hover img {
  border-color: var(--md-accent-fg-color);
}

.shots figcaption {
  margin-top: 0.3em;
  font-style: normal;
  text-align: center;
}
