/* The question collection is the landing page's primary content. */
.question-first-hero {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  margin: 14px auto 0;
  max-width: 1760px;
  padding: 0 14px 34px;
}
.question-mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(6, 90px);
  gap: 10px;
  padding: 0;
}
.mosaic-tile {
  min-width: 0;
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.mosaic-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
  display: block;
  border-radius: 7px;
}
.mosaic-tile span {
  position: absolute;
  inset: auto 0 0;
  background: #ffffffed;
  padding: 4px;
  font-size: 9px;
  line-height: 1.3;
  color: var(--ink);
  opacity: 0;
  border-radius: 0 0 7px 7px;
}
.mosaic-tile:hover,
.mosaic-tile:focus-visible {
  transform: scale(1.06);
  z-index: 3;
  box-shadow: 0 4px 22px #182b4b22;
}
.mosaic-tile:hover span,
.mosaic-tile:focus-visible span {
  opacity: 1;
}
.question-first-hero .hero-body {
  position: absolute;
  inset: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  pointer-events: none;
}
.hero-copy {
  pointer-events: auto;
  width: 680px;
  padding: 28px 25px 30px;
  border: 1px solid #fff;
  border-radius: 18px;
  background: #fffffff7;
  box-shadow: 0 0 35px 25px #ffffffdf;
  backdrop-filter: blur(8px);
}
.question-first-hero .project-name {
  font-size: 45px;
  margin-bottom: 12px;
}
.question-first-hero .publication-title.title.is-1 {
  font-size: 30px;
  line-height: 1.22;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}
.question-first-hero .hero-description {
  font-size: 15px;
  margin: 12px 0 20px;
}
.question-first-hero .publication-links .button {
  font-size: 12px;
  height: 40px;
  padding: 0 18px;
}
.mosaic-caption {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  position: absolute;
  inset: auto 15px 0;
  padding: 5px;
}
.explorer-section {
  background: #fff;
  border-top: 0;
  padding-top: 42px;
}
.explorer-section .site-width {
  max-width: 1280px !important;
}
.explorer-section .section-intro {
  margin-bottom: 30px;
}
.explorer-section .filter-bar {
  background: var(--wash);
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.explorer-status {
  margin: 18px 0;
}
.world-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.world-card {
  padding: 13px;
  border-radius: 12px;
  transition:
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
  position: relative;
}
.world-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px #2636530d;
}
.world-card[aria-pressed="true"] {
  padding: 12px;
}
.world-card img {
  height: 200px;
  border-radius: 6px;
}
.world-card .card-title {
  font-size: 14px;
  min-height: 0;
  margin: 15px 0 5px;
  font-weight: 600;
}
.world-card .card-type {
  font-size: 10px;
  margin-top: 0;
}
.world-card .card-question {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 10px 0 12px;
}
.world-card .card-open {
  display: flex;
  justify-content: space-between;
  color: var(--blue);
  font-size: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.selection-note {
  margin-top: 28px;
}
body:has(dialog[open]) {
  overflow: hidden;
}
.quiz-dialog {
  width: min(1160px, 96vw);
  padding: 0;
  max-height: 92dvh;
  border-radius: 14px;
}
.quiz-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 4;
  border-bottom: 1px solid var(--line);
}
.quiz-toolbar > span {
  font-size: 11px;
  color: var(--muted);
}
.quiz-navigation {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quiz-navigation button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  min-height: 34px;
  font-size: 11px;
}
.quiz-navigation #close-question {
  font-size: 25px;
  line-height: 1;
  padding: 0;
  width: 34px;
  margin-left: 8px;
}
.quiz-dialog .question-viewer {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.quiz-dialog .image-stage {
  height: 460px;
}
.quiz-dialog .question-column blockquote {
  font-size: 14px;
  max-height: 290px;
}
.quiz-dialog .visual-column {
  justify-content: center;
}
.quiz-options {
  margin-top: 18px;
  border: 0;
  padding: 0;
  min-width: 0;
}
.quiz-options legend {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
#option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
#option-buttons button {
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
  max-width: 100%;
}
#option-buttons button[aria-pressed="true"] {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}
.choice-status {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.choice-status[data-match="true"] {
  color: var(--green);
}
.quiz-dialog .answer-controls {
  margin-top: 15px;
}
.abstract-section {
  background: var(--wash);
  padding-top: 55px;
  padding-bottom: 55px;
}
@media (min-width: 1550px) {
  .question-mosaic {
    grid-template-rows: repeat(6, 105px);
  }
  .question-first-hero {
    min-height: 710px;
  }
  .hero-copy {
    width: 720px;
  }
}
@media (max-width: 1100px) {
  .question-mosaic {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-template-rows: repeat(6, 90px);
  }
  .mosaic-tile:nth-child(n + 49) {
    display: none;
  }
  .hero-copy {
    width: 620px;
  }
  .world-card img {
    height: 175px;
  }
  .world-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}
@media (max-width: 700px) {
  .question-first-hero {
    min-height: 596px;
    padding: 0 10px 38px;
    margin-top: 10px;
  }
  .question-mosaic {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(6, 84px);
    gap: 8px;
  }
  .mosaic-tile:nth-child(n + 25) {
    display: none;
  }
  .mosaic-tile:nth-child(-n + 24) {
    display: block;
  }
  .mosaic-tile img {
    padding: 3px;
  }
  .question-first-hero .hero-body {
    inset: 0 0 45px;
    padding: 0 17px;
  }
  .hero-copy {
    width: 420px;
    padding: 22px 12px 25px;
    box-shadow: 0 0 14px 7px #ffffffd9;
    border-radius: 12px;
  }
  .question-first-hero .project-name {
    font-size: 36px;
    margin-bottom: 12px;
  }
  .question-first-hero .publication-title.title.is-1 {
    font-size: 23px;
    letter-spacing: -0.5px;
  }
  .question-first-hero .hero-description {
    font-size: 13px;
    margin: 14px 0 17px;
  }
  .question-first-hero .hero-description br {
    display: none;
  }
  .question-first-hero .publication-links {
    gap: 8px;
  }
  .question-first-hero .publication-links .button {
    font-size: 11px;
    height: 36px;
  }
  .mosaic-caption {
    font-size: 10px;
    bottom: 12px;
  }
  .explorer-section {
    padding-top: 22px;
  }
  .explorer-section .filter-bar {
    padding: 13px;
  }
  .explorer-section .section-intro {
    margin-bottom: 25px;
  }
  .world-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }
  .world-card {
    padding: 9px;
    border-radius: 9px;
  }
  .world-card[aria-pressed="true"] {
    padding: 8px;
  }
  .world-card img {
    height: 140px;
  }
  .world-card .card-title {
    font-size: 12px;
    margin-top: 11px;
    min-height: 35px;
  }
  .world-card .card-type {
    font-size: 9px;
    min-height: 25px;
  }
  .world-card .card-question {
    font-size: 10px;
  }
  .world-card .card-open {
    font-size: 10px;
  }
  .quiz-dialog {
    width: 96vw;
    max-height: 94dvh;
  }
  .quiz-toolbar {
    padding: 10px 12px;
  }
  .quiz-navigation {
    gap: 6px;
  }
  .quiz-navigation #close-question {
    margin-left: 2px;
  }
  .quiz-dialog .image-stage {
    height: 300px;
  }
  .quiz-dialog .question-column blockquote {
    max-height: none;
    font-size: 14px;
  }
  .quiz-dialog .visual-column {
    padding: 14px;
  }
  .quiz-dialog .question-column {
    padding: 20px;
  }
}
@media (max-width: 380px) {
  .question-first-hero .publication-title.title.is-1 {
    font-size: 20px;
  }
  .hero-copy {
    padding: 20px 10px;
  }
  .world-card img {
    height: 112px;
  }
  .quiz-toolbar > span {
    font-size: 10px;
  }
  .quiz-navigation button {
    font-size: 10px;
    padding: 5px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .world-card,
  .mosaic-tile {
    transition: none;
  }
}
@media print {
  .question-first-hero .hero-body {
    position: static;
  }
  .question-mosaic,
  .mosaic-caption,
  .quiz-dialog {
    display: none;
  }
  .question-first-hero {
    min-height: 0;
  }
  .hero-copy {
    box-shadow: none;
  }
  .world-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
  }
  .world-card {
    break-inside: avoid;
  }
}

/* The catalog spans thousands of worlds; images and card batches load on demand. */
.gallery-sentinel {
  text-align: center;
  padding: 35px 0 10px;
}
.gallery-sentinel p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.gallery-sentinel .button {
  font-size: 13px;
}
.quiz-error {
  padding: 70px 24px;
  text-align: center;
}
.quiz-error p {
  margin-bottom: 18px;
}
.world-card .card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 41px;
}
.world-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 380px;
}
@media (max-width: 700px) {
  .world-card {
    contain-intrinsic-size: auto 325px;
  }
  .world-card .card-title {
    min-height: 35px;
  }
}
/* The paper page has a bounded preview; the collection has its own page. */
.homepage .filter-bar,
.homepage .explorer-status,
.homepage #gallery-sentinel {
  display: none;
}
.homepage .world-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gallery-invitation {
  text-align: center;
  margin-top: 30px;
}
.gallery-invitation p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.gallery-page .explorer-section {
  padding-top: 55px;
}
@media (max-width: 700px) {
  .homepage .world-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-invitation .button {
    white-space: normal;
    height: auto;
    padding: 12px 18px;
    font-size: 13px;
  }
}
