/*
 * Research disclosure controls and evidence-rail presentation.
 *
 * Design intent:
 * - The four research directions keep their existing two-column layout.
 * - All evidence panels are visible by default and can be collapsed independently.
 * - The entire research direction remains clickable and toggles its own evidence panel.
 * - Hover feedback is a very light neutral-grey band spanning the full viewport.
 * - The disclosure control is explicit: SELECTED WORK ⊖ / SELECTED WORK ⊕.
 * - Evidence cards are intentionally styled like news stories: image, headline,
 *   short deck and publication date. No category labels are shown at this stage.
 * - The evidence rail uses a neutral light-grey background and a restrained grey
 *   scrollbar so it reads as editorial content rather than a blue UI widget.
 */

.research-direction-shell {
  border-top: 1px solid #e3eaf2;
}

.research-direction-shell:first-child {
  border-top: 0;
}

/*
 * The existing research-direction grid remains visually unchanged.
 * A full-viewport pseudo-element supplies the hover background while the actual
 * text and visual stay aligned to the site's 1180 px content column.
 */
.research-direction-toggle {
  position: relative;
  isolation: isolate;
  cursor: pointer;
  padding-right: 0;
}

.research-direction-toggle::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
  background: transparent;
  transition: background-color .18s ease;
}

.research-direction-toggle:hover::before {
  background: #f6f7f8;
}

.research-direction-toggle > * {
  position: relative;
  z-index: 1;
}

.research-direction-toggle:focus-visible {
  outline: 2px solid rgba(7,26,51,.28);
  outline-offset: 6px;
}

/*
 * Explicit disclosure affordance. The element's own text is ⊖ / ⊕, while the
 * pseudo-element supplies the persistent SELECTED WORK label.
 */
.research-toggle-mark {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 14px;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  color: #0b335b;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: color .18s ease, opacity .18s ease;
}

.research-toggle-mark::before {
  content: "SELECTED WORK";
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1;
}

.research-direction-toggle:hover .research-toggle-mark,
.research-direction-toggle[aria-expanded="true"] .research-toggle-mark {
  color: #071a33;
}

/* Expanded evidence panel -------------------------------------------------- */
.research-evidence[hidden] {
  display: none;
}

/*
 * The evidence area becomes a full-viewport neutral band. The cards themselves
 * remain aligned to the same central content width as the rest of the page.
 */
.research-evidence {
  width: 100vw;
  margin: 0 0 34px calc(50% - 50vw);
  padding: 30px max(24px, calc((100vw - 1180px) / 2 + 24px)) 22px;
  overflow: hidden;
  border-top: 1px solid #e1e5e9;
  border-bottom: 1px solid #e1e5e9;
  background: #f4f5f6;
  color: #071a33;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  animation: research-evidence-in .22s ease both;
}

@keyframes research-evidence-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/*
 * A rail uses horizontal scroll instead of pagination. The width intentionally
 * leaves the next card partly visible on desktop, signalling that more stories
 * can be reached by trackpad, mouse-wheel gesture or scrollbar drag.
 */
.research-news-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(310px, 37%, 390px);
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 18px;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-color: #8f98a2 #dfe3e7;
  scrollbar-width: thin;
}

.research-news-rail::-webkit-scrollbar {
  height: 6px;
}

.research-news-rail::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #dfe3e7;
}

.research-news-rail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #8f98a2;
}

.research-news-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d9dee4;
  border-radius: 20px;
  background: #fff;
  color: #071a33;
  scroll-snap-align: start;
  box-shadow: 0 10px 28px rgba(7,26,51,.045);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.research-news-card:hover,
.research-news-card:focus-visible {
  transform: translateY(-2px);
  border-color: #c2c9d1;
  box-shadow: 0 16px 34px rgba(7,26,51,.08);
}

.research-news-visual {
  overflow: hidden;
  aspect-ratio: 1.45 / 1;
  border-bottom: 1px solid #e2e6ea;
  background: #061426;
}

.research-news-visual .work-visual-shared {
  min-height: 0;
  height: 100%;
}

.research-news-body {
  display: flex;
  min-height: 245px;
  flex-direction: column;
  padding: 20px 20px 18px;
}

.research-news-body h3 {
  margin: 0 0 12px;
  color: #071a33;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.024em;
}

.research-news-body p {
  margin: 0;
  color: #5b6877;
  font-size: 14px;
  line-height: 1.62;
}

.research-news-date {
  margin-top: auto;
  padding-top: 22px;
  color: #6f7882;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .research-direction-toggle {
    padding-right: 0;
    padding-bottom: 56px;
  }

  .research-toggle-mark {
    right: 0;
    bottom: 12px;
  }

  .research-news-rail {
    grid-auto-columns: min(78vw, 350px);
  }
}

@media (max-width: 640px) {
  .research-direction-toggle {
    padding-bottom: 52px;
  }

  .research-evidence {
    margin-bottom: 24px;
    padding: 20px 16px 16px;
  }

  .research-news-rail {
    grid-auto-columns: min(84vw, 320px);
    gap: 14px;
  }

  .research-toggle-mark {
    right: 0;
    bottom: 10px;
    min-height: 32px;
    gap: 8px;
    font-size: 19px;
  }

  .research-toggle-mark::before {
    font-size: 9px;
  }
}
