/* R345. Compact discovery cards and library listings. */

#app .dq255-hub .dq255-groups {
  gap: 8px !important;
  grid-auto-rows: auto !important;
}

#app .dq255-hub .dq255-groups > .dq255-card {
  border-radius: 15px !important;
}

#app .dq255-hub .dq255-groups > .dq255-card > .dq255-art,
#app .dq255-hub .dq255-groups > .dq255-card > .dq320-art-stage {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1.59 !important;
  flex: none !important;
  overflow: hidden;
}

#app .dq255-hub .dq255-groups > .dq255-card > .dq255-art {
  object-fit: cover !important;
  object-position: center 32% !important;
}

#app .dq255-hub .dq255-groups > .dq255-card > b {
  min-height: 48px !important;
  padding: 6px 8px !important;
  gap: 4px !important;
  font-size: 13.5px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

#app .dq255-hub .dq255-groups > .dq255-card > b > span {
  flex: 0 0 11px;
  width: 11px;
  height: auto;
  font-size: 18px;
}

#app .dq255-hub .dq255-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 9px 0 12px;
}

#app .dq255-hub .dq255-tools > button {
  min-width: 0;
  min-height: 38px;
  padding: 5px 4px;
  font-size: 12.5px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

#app .dq255-hub .dq261-entry {
  --dq345-compass-size: clamp(45px, 13vw, 56px);
  position: relative;
  margin: 12px 0;
  padding: 14px;
  border-radius: 18px;
}

#app .dq255-hub .dq261-entry::before {
  inset: 5px;
  border-radius: 14px;
}

#app .dq255-hub .dq261-entry .dq262-entry-top {
  position: static;
  min-height: 0;
  margin-bottom: 7px;
  padding-inline-end: calc(var(--dq345-compass-size) + 8px);
}

#app .dq255-hub .dq261-entry .dq262-eyebrow {
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: .055em;
  text-align: left;
  text-wrap: wrap;
}

#app .dq255-hub .dq261-entry .dq262-compass {
  position: absolute;
  top: 11px;
  right: 11px;
  width: var(--dq345-compass-size);
  height: var(--dq345-compass-size);
  pointer-events: none;
}

#app .dq255-hub .dq261-entry > h2.dq263-industry-title {
  margin: 0 0 8px;
  padding-inline-end: calc(var(--dq345-compass-size) + 5px);
  color: #fff0d0;
  font-size: clamp(19px, 5.6vw, 24px);
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: break-word;
}

#app .dq255-hub .dq261-entry > p {
  margin: 0 0 9px;
  font-size: 12.5px;
  line-height: 1.42;
}

#app .dq255-hub .dq261-entry .dq262-entry-topics {
  gap: 5px 6px;
  margin: 0 0 10px;
}

#app .dq255-hub .dq261-entry .dq262-entry-topics > span {
  padding: 4px 8px;
  font-size: 10.75px;
  line-height: 1.3;
}

#app .dq255-hub .dq261-entry > button {
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.3;
  white-space: normal;
}

#app .dq255-hub .dq261-entry > button > i {
  font-size: 19px;
}

/* The shared library panel and its two-column topic controls. */

#app .dq338.dq345-library {
  margin: 12px 0;
  padding: 14px 12px;
  border-radius: 16px;
  color: #fff3d9;
}

#app .dq345-library > .dq338-kicker {
  font-size: 10px;
  line-height: 1.3;
}

#app .dq345-library > h2 {
  margin: 6px 0 8px;
  font-size: clamp(19px, 5.4vw, 23.5px);
  line-height: 1.2;
}

#app .dq345-library > .dq345-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
  color: #d0e0d5;
  font: 400 11.5px/1.35 system-ui, sans-serif;
}

#app .dq345-summary > small {
  color: #f1d39c;
  font-size: 10.5px;
  font-weight: 700;
}

#app .dq338 .dq345-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 7px;
  margin: 12px 0 14px;
}

#app .dq345-topic-grid > .dq338-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 42px;
  padding: 6px 7px 6px 8px;
  border: 1px solid #718461;
  border-radius: 9px;
  background: #1b4038;
  color: #fff3d9;
  font: 600 12.25px/1.25 system-ui, sans-serif;
  text-align: left;
  white-space: normal;
}

#app .dq345-topic-name {
  overflow-wrap: anywhere;
}

#app .dq345-topic-count {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 18px;
  min-height: 18px;
  padding: 1px 3px;
  border: 1px solid #a58c55;
  border-radius: 6px;
  background: #283c2e;
  color: #f1d097;
  font: 700 10.5px/1.2 system-ui, sans-serif;
  opacity: 1;
}

#app .dq345-topic-grid > .dq338-chip[aria-pressed="true"] {
  border-color: #ead09b;
  background: #ead09b;
  color: #183a30;
}

#app .dq345-topic-grid > .dq345-topic-all {
  grid-column: 1 / -1;
  display: block;
  min-height: 36px;
}

#app .dq345-library > .dq345-featured-title {
  margin: 14px 0 8px;
  color: #efd09b;
  font: 700 10px/1.3 system-ui, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
}

#app .dq345-library > .dq338-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  margin: 10px 0 0;
  padding: 8px 11px;
  border-color: #a9905a;
  border-radius: 9px;
  background: #173a32;
  color: #f5dfa9;
  font: 700 12px/1.3 system-ui, sans-serif;
  text-align: left;
}

#app .dq345-library > .dq338-button::after {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* A complete article title can make its own row taller on narrow screens. */

#app .dq338 .dq338-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 8px 0 12px;
}

#app .dq338 .dq338-card {
  position: relative;
  display: grid;
  grid-template-columns: clamp(64px, 23vw, 98px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 0;
  padding: 8px 24px 8px 8px;
  border: 1px solid #617654;
  border-radius: 12px;
  background: #173631;
  text-align: left;
  white-space: normal;
}

#app .dq338 .dq338-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 8px;
}

#app .dq338 .dq338-card > .dq338-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  overflow-wrap: anywhere;
}

#app .dq338 .dq338-card-copy > strong {
  color: inherit;
  font-size: 15.5px;
  line-height: 1.2;
  white-space: normal;
  word-break: normal;
}

#app .dq338 .dq338-card-copy > small {
  color: #f0d09a;
  font: 600 10px/1.25 system-ui, sans-serif;
}

#app .dq338 .dq338-card-copy > span {
  display: none;
}

#app .dq338 .dq338-card-copy > small:last-child {
  margin: 0;
  color: #cedbd0;
  font-weight: 400;
}

#app .dq338 .dq338-card-copy > small:last-child > span {
  position: absolute;
  top: 50%;
  right: 8px;
  color: #e6c587;
  font: 400 21px/1 Georgia, serif;
  transform: translateY(-50%);
}

@media (max-width: 359px) {
  #app .dq255-hub .dq255-groups > .dq255-card > b {
    font-size: 13px !important;
  }

  #app .dq338 .dq338-card {
    gap: 8px;
    padding-inline-end: 20px;
  }

  #app .dq338 .dq338-card-copy > strong {
    font-size: 14.5px;
  }
}
