/* The tests are a visual gallery; their covers carry the hierarchy. */
.cosmo-feature-panel:has([data-feature-view="tests"].active) {
  background-color: #0c0a18 !important;
  background-image: url("/web-static/brand/cosmic-orbit-clean.svg") !important;
  background-size: 760px auto !important;
  background-position: right -100px top -200px !important;
}
.cosmo-feature-panel:has(.cosmo-tests-workspace.is-detail-open) {
  background-image: linear-gradient(rgba(7, 5, 16, .48), rgba(7, 5, 16, .48)), url("/web-static/brand/cosmic-orbit-clean.svg") !important;
  background-size: 100% 100%, 760px auto !important;
  background-position: center, right -100px top -200px !important;
}
.cosmo-feature-panel:has([data-feature-view="tests"].active) .cosmo-feature-header {
  display: none !important;
}
.cosmo-feature-view[data-feature-view="tests"] {
  width: min(1280px, calc(100% - clamp(56px, 12vw, 240px))) !important;
  padding: clamp(48px, 7.5vh, 88px) 0 clamp(72px, 9vh, 112px) !important;
}
.cosmo-tests-workspace {
  display: block !important;
  min-height: 0 !important;
}
.cosmo-tests-list {
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
}
.cosmo-tests-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(30px, 4vh, 42px);
}
.cosmo-tests-heading h3 {
  margin: 0;
  color: #f2dcb6;
  font: 500 clamp(29px, 2.4vw, 36px)/1.25 Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  letter-spacing: .025em;
}
.cosmo-tests-heading .cosmo-test-access {
  display: flex;
  width: auto !important;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0 !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d5c2cc;
  font-size: 14px;
}
.cosmo-tests-heading .cosmo-test-access > span { display: none; }
.cosmo-tests-heading .cosmo-test-access strong { color: #f2ddb8; font-weight: 500; }
.cosmo-tests-heading .cosmo-test-access button {
  min-height: 38px;
  margin-left: 14px;
  padding: 0 23px;
  border: 1px solid rgba(228, 173, 198, .75);
  border-radius: 999px;
  background: rgba(77, 45, 65, .28);
  color: #f3c1cf;
  font-size: 13px;
  cursor: pointer;
}
.cosmo-tests-heading .cosmo-test-access button:hover { background: rgba(121, 64, 92, .38); }
.cosmo-test-rows {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 42px 26px !important;
  align-content: start;
}
.cosmo-tests-list .cosmo-test-row {
  display: block !important;
  grid-column: span 2;
  width: 100%;
  min-width: 0;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #f2e6dc;
  text-align: left;
  cursor: pointer;
}
.cosmo-tests-list .cosmo-test-row:nth-child(n+4) { grid-column: span 3; }
.cosmo-tests-list .cosmo-test-row img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1.515;
  border: 1px solid rgba(243, 216, 225, .12);
  border-radius: 15px !important;
  object-fit: cover;
  padding: 0;
  background: transparent;
  transition: transform .22s ease, border-color .22s ease, filter .22s ease;
}
.cosmo-tests-list .cosmo-test-row:nth-child(n+4) img { aspect-ratio: 3; }
.cosmo-tests-list .cosmo-test-row:hover img,
.cosmo-tests-list .cosmo-test-row:focus-visible img {
  transform: translateY(-3px);
  border-color: rgba(246, 209, 227, .65);
  filter: brightness(1.06);
}
.cosmo-tests-list .cosmo-test-row:focus-visible { outline: 2px solid #e8b2c7; outline-offset: 5px; }
.cosmo-test-row-copy {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px !important;
  padding: 10px 8px 0;
}
.cosmo-test-row-copy strong {
  grid-column: 1;
  color: #f1dfbf;
  font: 500 clamp(17px, 1.4vw, 21px)/1.38 Georgia, "Songti SC", "Noto Serif CJK SC", serif !important;
}
.cosmo-test-row-copy small {
  grid-column: 1;
  color: #b6aabd !important;
  font-size: 14px !important;
  text-align: left !important;
}
.cosmo-test-row-copy b {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: end;
  color: #dfa9c0 !important;
  font: 300 24px/1 Georgia, serif !important;
}
.cosmo-tests-detail.cosmo-feature-detail { display: none; }
.cosmo-tests-workspace.is-detail-open .cosmo-tests-list { display: none; }
.cosmo-tests-workspace.is-detail-open .cosmo-tests-detail.cosmo-feature-detail {
  display: block;
  width: min(1080px, 100%);
  max-width: none;
  min-height: 0;
  margin: 0 auto;
  padding: 0 !important;
  overflow: visible;
  border: 0;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none;
}
.cosmo-tests-detail .cosmo-reader-back { margin-bottom: 27px; }
.cosmo-tests-detail .cosmo-test-intro-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(28px, 4vw, 65px);
  align-items: center;
}
.cosmo-tests-detail .cosmo-test-intro-workspace {
  position: relative;
  isolation: isolate;
  padding: clamp(28px, 5vw, 64px);
  background: radial-gradient(ellipse at 39% 42%, rgba(108, 72, 123, .21), rgba(17, 12, 30, .42) 72%, transparent);
}
.cosmo-tests-detail .cosmo-test-intro-workspace .cosmo-reader-back { position: relative; z-index: 1; }
.cosmo-tests-detail .cosmo-test-intro-art {
  display: block;
  width: 100%;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 16px;
  object-fit: contain;
  padding: 0;
  background: transparent;
  filter: drop-shadow(0 18px 48px rgba(216, 144, 192, .2));
}
.cosmo-tests-detail .cosmo-test-intro-content h3 {
  color: #f1dfbf;
  font: 500 clamp(28px, 2.5vw, 40px)/1.3 Georgia, "Songti SC", serif;
}
.cosmo-tests-detail .cosmo-test-intro-content p { color: #c7bdcc; line-height: 1.8; }
.cosmo-tests-detail .cosmo-feature-primary { background: #dfabc4; color: #241626; }
.cosmo-tests-detail .cosmo-test-intro-content .cosmo-feature-primary { margin-top: 18px; }
.cosmo-tests-detail .cosmo-result-actions {
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
}
.cosmo-tests-detail .cosmo-result-actions > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 20px;
  border-radius: 22px;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
}
.cosmo-tests-detail .cosmo-result-actions > .cosmo-feature-refresh {
  border-color: rgba(220, 201, 218, .28);
  background: rgba(220, 201, 218, .04);
  color: #d7cad9;
}
.cosmo-tests-detail .cosmo-test-credit-note { max-width: 28em; margin: 12px 0 0; color: #a99eb0; font-size: 13px; line-height: 1.55; }
.cosmo-tests-detail .cosmo-test-question-workspace,
.cosmo-tests-detail .cosmo-test-result-workspace { max-width: 950px; margin: 0 auto; }
.cosmo-tests-detail .cosmo-test-question-workspace:not(.is-visual-question) { max-width: 800px; }
.cosmo-tests-detail .cosmo-test-question-workspace:not(.is-visual-question) > h3 {
  max-width: 25em;
  margin: 34px 0 28px;
  color: #f3e6df;
  font: 500 clamp(24px, 2.1vw, 32px)/1.45 Georgia, "Songti SC", serif;
}
.cosmo-tests-detail .cosmo-question-options:not(.is-image-grid) {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 720px;
  gap: 10px;
}
.cosmo-tests-detail .cosmo-question-option:not(.has-image) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 64px;
  padding: 12px 21px;
  border: 1px solid rgba(224, 200, 219, .22);
  border-radius: 14px;
  background: rgba(55, 41, 70, .24);
  color: #ece1e9;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  transition: background .18s, border-color .18s, transform .18s;
}
.cosmo-test-result-followups { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; }
.cosmo-test-result-followups button { padding: 0; border: 0; background: none; color: #c7adbc; font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.cosmo-test-result-followups button:hover { color: #f1d9c0; }
.cosmo-tests-detail .cosmo-question-option:not(.has-image):hover,
.cosmo-tests-detail .cosmo-question-option:not(.has-image):focus-visible,
.cosmo-tests-detail .cosmo-question-option:not(.has-image).active {
  border-color: rgba(239, 208, 167, .8);
  background: rgba(109, 69, 91, .29);
  transform: translateY(-2px);
}
.cosmo-tests-detail .cosmo-test-question-workspace footer { margin-top: 25px; color: #9c8ea4; font-size: 13px; }
.cosmo-tests-detail .cosmo-test-question-workspace.is-visual-question { max-width: 1060px; }
.cosmo-tests-detail .is-visual-question > h3 {
  margin: 19px 0 24px;
  color: #f3e6df;
  font: 500 clamp(24px, 2.3vw, 35px)/1.4 Georgia, "Songti SC", serif;
}
.cosmo-tests-detail .cosmo-question-options.is-image-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
  margin-top: 0;
}
.cosmo-tests-detail .cosmo-question-option.has-image {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(220px, 28vh, 300px);
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(231, 211, 222, .18);
  border-radius: 16px;
  background: #1b182d;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease;
}
.cosmo-tests-detail .cosmo-question-option.has-image:hover,
.cosmo-tests-detail .cosmo-question-option.has-image:focus-visible,
.cosmo-tests-detail .cosmo-question-option.has-image.active {
  border-color: #efd0a7;
  transform: translateY(-2px);
  outline: none;
}
.cosmo-tests-detail .cosmo-question-option-image-frame {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}
.cosmo-tests-detail .cosmo-question-option-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  aspect-ratio: auto;
  object-fit: cover;
}
.cosmo-tests-detail .cosmo-question-option-image-frame.is-sheet-crop img {
  position: absolute;
  width: 200% !important;
  height: 200% !important;
  max-width: none;
}
.cosmo-tests-detail .cosmo-question-option-image-frame img.crop-top-left { top: 0; left: 0; }
.cosmo-tests-detail .cosmo-question-option-image-frame img.crop-top-right { top: 0; right: 0; }
.cosmo-tests-detail .cosmo-question-option-image-frame img.crop-bottom-left { bottom: 0; left: 0; }
.cosmo-tests-detail .cosmo-question-option-image-frame img.crop-bottom-right { bottom: 0; right: 0; }
.cosmo-tests-detail .cosmo-question-option.has-image .cosmo-question-option-copy {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: baseline;
  gap: 13px;
  padding: 38px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(11, 9, 26, .86));
  color: #f9eee5;
  font: 500 17px/1.35 Georgia, "Songti SC", serif;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .65);
}
.cosmo-tests-detail .cosmo-question-option.has-image .cosmo-question-option-copy small {
  color: #f2d29e;
  font: 500 14px Georgia, serif;
}
@media (max-width: 900px) {
  .cosmo-feature-view[data-feature-view="tests"] { width: calc(100% - 48px) !important; }
  .cosmo-test-rows { gap: 26px 18px !important; }
  .cosmo-tests-list .cosmo-test-row { grid-column: span 3; }
  .cosmo-tests-list .cosmo-test-row:nth-child(n+4) { grid-column: span 3; }
  .cosmo-tests-list .cosmo-test-row img,
  .cosmo-tests-list .cosmo-test-row:nth-child(n+4) img { aspect-ratio: 1.55; }
}
@media (max-width: 600px) {
  .cosmo-tests-detail .cosmo-test-intro-workspace { padding: 20px 16px 30px; }
  .cosmo-tests-detail .cosmo-question-options:not(.is-image-grid) { grid-template-columns: 1fr; gap: 11px; }
  .cosmo-tests-detail .cosmo-question-option:not(.has-image) { min-height: 80px; padding: 16px 18px; font-size: 16px; }
  .cosmo-feature-view[data-feature-view="tests"] { width: calc(100% - 28px) !important; padding-top: 25px !important; }
  .cosmo-tests-heading { align-items: flex-start; gap: 16px; margin-bottom: 24px; }
  .cosmo-tests-heading h3 { font-size: 27px; }
  .cosmo-tests-heading .cosmo-test-access { display: grid; justify-items: end; gap: 6px; font-size: 12px; }
  .cosmo-tests-heading .cosmo-test-access button { margin: 0; padding: 0 12px; }
  .cosmo-test-rows { gap: 22px 12px !important; }
  .cosmo-tests-list .cosmo-test-row,
  .cosmo-tests-list .cosmo-test-row:nth-child(n+4) { grid-column: span 3; }
  .cosmo-test-row-copy { padding: 8px 2px 0; }
  .cosmo-test-row-copy strong { font-size: 15px !important; }
  .cosmo-test-row-copy small { font-size: 11px !important; }
  .cosmo-test-row-copy b { display: none; }
  .cosmo-tests-detail .cosmo-test-intro-content { grid-template-columns: 1fr; }
  .cosmo-tests-detail .cosmo-test-intro-art { max-height: 250px; }
  .cosmo-tests-detail .cosmo-question-options.is-image-grid { gap: 10px !important; }
  .cosmo-tests-detail .cosmo-question-option.has-image { height: clamp(180px, 42vw, 250px); }
  .cosmo-tests-detail .cosmo-question-option.has-image .cosmo-question-option-copy { gap: 7px; padding: 30px 10px 10px; font-size: 13px; }
}
