/* Text first artwork for resource cards: no thumbnail or playback control visuals. */
.resource-card .card-media,
.result-media {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 4 / 5 !important;
  overflow: hidden !important;
  isolation: isolate;
  background: #182033 !important;
}
.featured-card-media {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
  background: #182033 !important;
}
.resource-card .card-media > img,
.result-media > img,
.featured-card-media > img {
  display: none !important;
}
.resource-card .rank-badge,
.resource-card .card-view { display: none !important; }
/* The source card already prints the category and sequence number.  The
   typographic cover supplies its own single header, so remove the duplicate. */
.featured-card[data-text-cover-ready="1"] .featured-card-top,
.featured-card[data-text-cover-ready="1"] .featured-card-shade,
.resource-card[data-text-cover-ready="1"] .card-media > .card-caption,
.result-card[data-text-cover-ready="1"] .result-media > .result-number {
  display: none !important;
}
.resource-card .card-media::after,
.result-media::after,
.featured-card-media::after { display: none !important; }
.text-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(18px, 2vw, 30px);
  overflow: hidden;
  color: #fff8ee;
  background:
    radial-gradient(ellipse at 82% 18%, rgba(255, 224, 174, .50), transparent 24%),
    radial-gradient(ellipse at 12% 86%, rgba(123, 164, 216, .30), transparent 37%),
    linear-gradient(145deg, #16243c, #37435c 55%, #b46e58);
}
.text-cover::before {
  content: "";
  position: absolute;
  width: 76%;
  aspect-ratio: 1;
  right: -29%;
  top: 13%;
  border: 1px solid rgba(255, 247, 224, .24);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(255, 247, 224, .035), 0 0 0 54px rgba(255, 247, 224, .025);
  pointer-events: none;
}
.text-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 11, 20, .02) 24%, rgba(8, 11, 20, .08) 43%, rgba(8, 11, 20, .68) 100%);
  pointer-events: none;
}
.text-cover-top,
.text-cover-copy,
.text-cover-foot { position: relative; z-index: 1; }
.text-cover-top,
.text-cover-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: rgba(255, 246, 230, .78);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.text-cover-stamp {
  padding: 6px 9px;
  border: 1px solid rgba(255, 247, 230, .28);
  border-radius: 999px;
  background: rgba(16, 19, 29, .16);
  backdrop-filter: blur(8px);
}
.text-cover-copy { margin-top: auto; padding-top: 70px; }
.text-cover h2 {
  max-width: 15ch;
  margin: 0;
  color: #fff9ef;
  font-size: clamp(20px, 2.05vw, 31px);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -.045em;
  text-wrap: pretty;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .18);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.text-cover p {
  max-width: 34ch;
  margin: 11px 0 0;
  color: rgba(255, 246, 230, .78);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: .025em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.text-cover-foot { margin-top: 18px; color: rgba(255, 246, 230, .64); }
.text-cover[data-palette="1"] {
  background: radial-gradient(ellipse at 80% 16%, rgba(255, 209, 159, .47), transparent 25%), radial-gradient(ellipse at 18% 78%, rgba(190, 128, 184, .32), transparent 40%), linear-gradient(145deg, #28213e, #66465d 56%, #cb825e);
}
.text-cover[data-palette="2"] {
  background: radial-gradient(ellipse at 80% 15%, rgba(211, 242, 220, .43), transparent 25%), radial-gradient(ellipse at 17% 76%, rgba(83, 176, 188, .31), transparent 41%), linear-gradient(145deg, #102d3a, #28606b 56%, #d09367);
}
.text-cover[data-palette="3"] {
  background: radial-gradient(ellipse at 80% 15%, rgba(255, 217, 154, .48), transparent 24%), radial-gradient(ellipse at 16% 78%, rgba(223, 127, 96, .27), transparent 40%), linear-gradient(145deg, #30271f, #684d39 55%, #bd7955);
}
.text-cover[data-palette="4"] {
  background: radial-gradient(ellipse at 79% 17%, rgba(229, 202, 255, .48), transparent 24%), radial-gradient(ellipse at 17% 78%, rgba(97, 138, 209, .33), transparent 40%), linear-gradient(145deg, #202541, #4b4e75 56%, #bb7566);
}
.text-cover[data-palette="5"] {
  background: radial-gradient(ellipse at 80% 15%, rgba(255, 222, 174, .49), transparent 24%), radial-gradient(ellipse at 15% 78%, rgba(116, 184, 151, .27), transparent 40%), linear-gradient(145deg, #1a302d, #42614d 55%, #c18156);
}
.text-cover[data-layout="1"] .text-cover-copy { text-align: center; }
.text-cover[data-layout="1"] .text-cover-copy h2,
.text-cover[data-layout="1"] .text-cover-copy p { margin-left: auto; margin-right: auto; }
.text-cover[data-layout="2"] .text-cover-copy { padding-left: 10%; border-left: 2px solid rgba(255, 225, 179, .66); }
[data-cover-orientation="landscape"] .text-cover {
  display: block;
  padding: 16px 20px;
}
[data-cover-orientation="landscape"] .text-cover::before {
  width: 31%;
  right: 5%;
  top: 12%;
}
[data-cover-orientation="landscape"] .text-cover::after {
  background: linear-gradient(90deg, rgba(7, 11, 20, .50), rgba(7, 11, 20, .16) 68%, rgba(7, 11, 20, .08));
}
[data-cover-orientation="landscape"] .text-cover-top {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
}
[data-cover-orientation="landscape"] .text-cover-copy {
  position: absolute;
  left: 20px;
  bottom: 16px;
  width: 62%;
  margin: 0;
  padding: 0;
  text-align: left;
}
[data-cover-orientation="landscape"] .text-cover h2 {
  max-width: 22ch;
  font-size: clamp(16px, 1.35vw, 23px);
  line-height: 1.2;
  -webkit-line-clamp: 2;
}
[data-cover-orientation="landscape"] .text-cover p {
  max-width: 38ch;
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
}
[data-cover-orientation="landscape"] .text-cover-foot {
  position: absolute;
  right: 20px;
  bottom: 16px;
  width: 24%;
  margin: 0;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 7px;
  text-align: right;
  font-size: 9px;
  letter-spacing: .10em;
}
[data-cover-orientation="landscape"] .text-cover-foot span:last-child {
  max-width: 100%;
  max-height: 2.8em;
  overflow: hidden;
}
[data-cover-orientation="landscape"] .text-cover[data-layout="1"] .text-cover-copy {
  top: 48px;
  bottom: auto;
}
[data-cover-orientation="landscape"] .text-cover[data-layout="1"] .text-cover-copy h2,
[data-cover-orientation="landscape"] .text-cover[data-layout="1"] .text-cover-copy p {
  margin-left: 0;
  margin-right: 0;
}
[data-cover-orientation="landscape"] .text-cover[data-layout="2"] .text-cover-copy {
  padding-left: 10px;
  border-left: 2px solid rgba(255, 225, 179, .66);
}
@media (max-width: 700px) {
  .text-cover { padding: 16px; }
  .text-cover h2 { font-size: clamp(18px, 5vw, 25px); }
  .text-cover p { font-size: 11px; }
}
