/* Tool screens on the framework pages: a short block near the end of a page with one to three screenshots, each with a caption.
   A screenshot opens larger on click (tool-figures.js); one that links to a live page is a link instead. Used by the framework pages
   and nothing else. */
.tf { margin: 2.2rem 0 1.8rem; }
.tf h2 { margin-bottom: .7rem; }
.tf p { margin-bottom: 1rem; }
.tf-row { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 16px; margin: 1.1rem 0 .4rem; }
.tf-fig { margin: 0; flex: 1 1 0; min-width: 0; max-width: 430px; }
.tf-btn {
  display: block; width: 100%; margin: 0; padding: 0; font: inherit; color: inherit; text-decoration: none; text-align: left;
  background: #fff; border: 1px solid #e4e4e4; border-radius: 8px; overflow: hidden; cursor: zoom-in;
  box-shadow: 0 4px 14px rgba(16, 34, 46, .10); transition: box-shadow .2s ease, transform .2s ease;
}
a.tf-btn { cursor: pointer; }
.tf-btn:hover { box-shadow: 0 8px 22px rgba(16, 34, 46, .18); transform: translateY(-2px); }
.tf-btn:focus-visible { outline: 3px solid #5c7ba3; outline-offset: 2px; }
.tf-btn img { display: block; width: 100%; height: auto; }
.tf-fig figcaption { margin-top: .5rem; font-size: .82rem; line-height: 1.4; color: #666; }
.tf--wide { max-width: 1100px; margin-left: auto; margin-right: auto; padding: 0 2rem; }

.tf-lb { position: fixed; inset: 0; z-index: 2000; background: rgba(11, 15, 20, .9); display: grid; place-items: center; padding: 24px; }
.tf-lb[hidden] { display: none; }
.tf-lb figure { margin: 0; text-align: center; max-width: 96vw; }
.tf-lb img { max-width: 94vw; max-height: 80vh; width: auto; height: auto; border-radius: 6px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.tf-lb figcaption { color: #fff; margin-top: 12px; font-size: .95rem; }
.tf-lb-x { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.tf-lb-x:hover { background: rgba(255, 255, 255, .3); }
.tf-lb-x:focus-visible { outline: 3px solid #5c7ba3; outline-offset: 2px; }

/* One screenshot only: either beside the text (right side) or, in a narrow column, the full width of that column. */
.tf--split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
.tf--split > h2, .tf--split > h3, .tf--split > p { grid-column: 1; }
.tf--split > .tf-row, .tf--split > .tf-fig { grid-column: 2; grid-row: 1 / span 8; margin-top: 0; }
.tf--split .tf-fig { max-width: none; width: 100%; }
.tf--full .tf-fig { max-width: none; }
@media (max-width: 600px) {
  .tf--split { display: block; }
  .tf--split .tf-fig { margin-top: .6rem; }
}

/* small screens: the screenshots stay side by side, smaller */
@media (max-width: 600px) {
  .tf-row { gap: 8px; }
  .tf-fig figcaption { font-size: .7rem; }
  .tf--wide { padding: 0 1rem; }
}
@media (prefers-reduced-motion: reduce) { .tf-btn { transition: none; } }
