/* Superlattix gallery – additions to styles.css (Bulma). Leave styles.css untouched. */

/* Schematics are drawn for white slides: keep a white ground behind them. */
.gallery-figure img,
.gallery-card .card-image img {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
}

.gallery-figure {
  margin: 0 0 1.5rem;
}

.gallery-figure img {
  border: 1px solid var(--bulma-border-weak);
  border-radius: var(--bulma-radius);
}

.gallery-figure figcaption {
  margin-top: 0.75rem;
  color: var(--bulma-text-weak);
  font-size: 0.9375rem;
  max-width: 65ch;
}

/* Readable line length for prose */
.content p,
.gallery-intro p {
  max-width: 70ch;
}

/* Collapsible XML (native <details>, no JavaScript) */
.model-source {
  margin: 1.5rem 0;
  border: 1px solid var(--bulma-border);
  border-radius: var(--bulma-radius);
  padding: 0.75rem 1rem;
}

.model-source summary {
  cursor: pointer;
  font-weight: var(--bulma-weight-semibold);
  color: var(--bulma-text-strong);
}

.model-source[open] summary {
  margin-bottom: 0.75rem;
}

.model-source pre {
  max-height: 32rem;
  overflow: auto;
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: pre;
}

/* Visible keyboard focus where Bulma does not provide one */
.model-source summary:focus-visible,
.gallery-figure a:focus-visible,
.gallery-card a:focus-visible {
  outline: 2px solid var(--bulma-link);
  outline-offset: 2px;
}

.file-list td:first-child {
  white-space: nowrap;
}

.file-list .tag {
  margin: 0 0.25rem;
}

.gallery-contact {
  margin-top: 2rem;
}

.related-list {
  list-style: disc;
  margin-left: 1.25rem;
}

/* Cards: equal heights within a row */
.gallery-grid .column {
  display: flex;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.gallery-card .card-content {
  flex: 1;
}

/* Enlarged image (gallery.js) */
.gallery-modal .modal-content {
  width: auto;
  max-width: min(95vw, 1400px);
}

.gallery-modal img {
  display: block;
  max-height: 90vh;
  width: auto;
  background: #fff;
}

/* Lead sentence under the entry title */
.page-lead {
  max-width: 60ch;
}

/* "Make this figure yours" – the main action of an entry page */
.start-here {
  margin: 1.5rem 0 2.5rem;
  border-left: 4px solid var(--bulma-primary);
}

.start-steps {
  margin: 0 0 1.5rem 1.5rem;
  list-style: decimal;
}

.start-steps li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.start-steps .button {
  margin-right: 0.75rem;
  vertical-align: middle;
}

.step-note {
  color: var(--bulma-text-weak);
  font-size: 0.9375rem;
}

.try-list {
  list-style: disc;
  margin-left: 1.5rem;
}

.try-list li {
  margin-bottom: 0.25rem;
}

/* Index: short how-it-works sequence */
.intro-steps {
  margin-top: 0.5rem;
}

/* Card prompt sits at the bottom of each card */
.card-prompt {
  margin-top: 0.75rem;
  font-weight: var(--bulma-weight-semibold);
}
