/* Final layout overrides: compact object cards, controlled title wrapping and pagination. */
.title-line {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

h1,
h2,
h3 {
  line-break: strict;
  word-break: normal;
}

#theme-title .title-line + .title-line {
  margin-top: 0.06em;
}

.feature-subtitle {
  margin-top: 0.24em;
  font-size: 0.52em;
  line-height: 1.25;
}

.about-card .feature-copy {
  align-self: center;
  max-width: 1120px;
  padding-top: clamp(54px, 6vw, 108px);
  padding-bottom: clamp(54px, 6vw, 108px);
}

#about-title {
  max-width: 11em;
  margin-top: 0.32em;
  margin-bottom: 0.52em;
  font-size: clamp(4.5rem, 5.6vw, 7.4rem);
  line-height: 0.98;
}

#about-title .title-line + .title-line {
  margin-top: 0.08em;
}

.about-card .feature-copy > p:not(.eyebrow) {
  max-width: 50em;
  margin-top: 0;
  margin-bottom: 1.05em;
  font-size: clamp(1.15rem, 1.32vw, 1.6rem);
  line-height: 1.85;
}

#artifact-catalog-root {
  width: 100%;
  max-width: none;
}

.artifact-catalog-intro,
.artifact-catalog-toolbar,
.artifact-catalog-grid,
.artifact-catalog-pager {
  width: min(1880px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.artifact-catalog-intro {
  min-height: 0;
  padding-top: clamp(52px, 6vw, 92px);
  padding-bottom: clamp(34px, 4vw, 64px);
  gap: clamp(32px, 5vw, 96px);
}

.artifact-catalog-intro h2 {
  max-width: 11em;
  margin-bottom: 0;
  font-size: clamp(3rem, 5.2vw, 6.8rem);
  line-height: 0.98;
  text-wrap: balance;
}

.artifact-catalog-intro h2 .title-line + .title-line {
  margin-top: 0.08em;
}

.artifact-catalog-intro > p {
  max-width: 38em;
  margin: 0;
  align-self: end;
  font-size: clamp(1rem, 1.2vw, 1.28rem);
  line-height: 1.9;
}

.artifact-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 24px;
  padding-bottom: 28px;
}

.artifact-catalog-card {
  display: grid;
  grid-template-columns: minmax(150px, 38%) minmax(0, 1fr);
  min-width: 0;
  min-height: 270px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(231, 224, 207, 0.2);
  content-visibility: auto;
  contain-intrinsic-size: 270px;
}

.artifact-card-media {
  min-width: 0;
  min-height: 270px;
  background: #090b09;
}

.artifact-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.artifact-card-copy {
  min-width: 0;
  padding: 22px 22px 18px;
}

.artifact-catalog-card h3 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 1.65vw, 2rem);
  line-height: 1.18;
  line-break: strict;
  word-break: normal;
}

.artifact-card-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.artifact-catalog-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px 0 72px;
}

.artifact-catalog-pager button {
  min-width: 110px;
  padding: 12px 18px;
  border: 1px solid rgba(231, 224, 207, 0.32);
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.artifact-catalog-pager button:hover:not(:disabled),
.artifact-catalog-pager button:focus-visible {
  border-color: #d6b76c;
  color: #d6b76c;
}

.artifact-catalog-pager button:disabled {
  opacity: 0.35;
  cursor: default;
}

.artifact-catalog-pager span {
  min-width: 7em;
  text-align: center;
}

@media (max-width: 1180px) {
  .artifact-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .artifact-catalog-intro {
    grid-template-columns: 1fr;
  }

  .artifact-catalog-intro > p {
    max-width: 48em;
  }
}

@media (max-width: 760px) {
  #theme-title {
    font-size: clamp(3.25rem, 15.2vw, 5.4rem);
    line-height: 0.94;
  }

  #about-title .title-line,
  #other-title .title-line,
  #treasure-title .title-line,
  .artifact-catalog-intro h2 .title-line {
    width: auto;
    white-space: normal;
  }

  .about-card .feature-copy {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  #about-title {
    max-width: none;
    font-size: clamp(3rem, 13.5vw, 4.8rem);
  }

  .about-card .feature-copy > p:not(.eyebrow) {
    font-size: 1.05rem;
    line-height: 1.78;
  }

  .artifact-catalog-intro,
  .artifact-catalog-toolbar,
  .artifact-catalog-grid,
  .artifact-catalog-pager {
    width: calc(100% - 24px);
  }

  .artifact-catalog-intro {
    padding-top: 42px;
    padding-bottom: 30px;
  }

  .artifact-catalog-intro h2 {
    max-width: none;
    font-size: clamp(2.7rem, 13vw, 4.5rem);
  }

  .artifact-catalog-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding-top: 16px;
  }

  .artifact-catalog-card {
    grid-template-columns: minmax(112px, 34%) minmax(0, 1fr);
    min-height: 190px;
  }

  .artifact-card-media {
    min-height: 190px;
  }

  .artifact-card-copy {
    padding: 16px 15px 14px;
  }

  .artifact-catalog-card h3 {
    font-size: clamp(1.25rem, 6vw, 1.75rem);
  }

  .artifact-card-summary {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .artifact-catalog-pager {
    gap: 8px;
    padding-bottom: 46px;
  }

  .artifact-catalog-pager button {
    min-width: 84px;
    padding: 11px 12px;
  }
}
