/* =========================================
   Research overview + research area pages
   (research-area.css imports this file)
   ========================================= */

.research-summary__card--green,  .area-panel--green,  .area-about--green  { --area-accent: #3acc90; }
.research-summary__card--teal,   .area-panel--teal,   .area-about--teal   { --area-accent: #06afae; }
.research-summary__card--orange, .area-panel--orange, .area-about--orange { --area-accent: #f39200; }
.research-summary__card--violet, .area-panel--violet, .area-about--violet { --area-accent: #792eef; }
/* legacy key */
.research-summary__card--yellow, .area-panel--yellow, .area-about--yellow { --area-accent: #f39200; }

/* --- Hero: room for the overlapping cards --- */
.hero--research { padding-bottom: 8.5rem; }

/* --- Topic cards --- */
/* "Back to overview" jumps here: the cards end up below the sticky header (4.5rem) with some air above them */
.research-summary { margin-top: -5.75rem; scroll-margin-top: 7rem; }
.research-summary__grid { gap: 1.1rem; align-items: stretch; }

.research-summary .research-summary__card,
.research-siblings .research-summary__card {
  position: relative;
  padding: 1.6rem 0.9rem 2.6rem;
  border: 1px solid #b9b9b9;
  border-radius: 14px;
  box-shadow: none;
  background: #fff;
}
.research-summary .research-summary__card:hover,
.research-siblings .research-summary__card:hover { box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12); }

.research-summary__card .research-summary__title { color: #333; font-size: var(--fs-h3); font-weight: 500; margin-bottom: 0.9rem; }
.research-summary__card .research-summary__tagline { font-size: var(--fs-small); color: #333; line-height: 1.55; max-width: 12em; margin: 0 auto; text-wrap: balance; }

/* coloured chevron marker that interrupts the bottom border */
.research-summary__marker {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -13px;
  height: 14px;
  color: var(--area-accent, var(--color-primary));
  background: linear-gradient(#fff, #fff) top / 100% 2px no-repeat;
  pointer-events: none;
}
.research-summary__marker svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  -webkit-mask-image: linear-gradient(90deg, transparent 12%, #000 38%, #000 62%, transparent 88%);
          mask-image: linear-gradient(90deg, transparent 12%, #000 38%, #000 62%, transparent 88%);
}

/* --- Interconnected research --- */
.research-intro { padding-top: 4rem; padding-bottom: 1rem; text-align: left; }
.research-intro .research-intro__title { text-align: left; color: #0f172a; margin: 0 0 1.2rem; font-size: calc(var(--fs-h2) * 0.9); font-weight: 600; }
.research-intro .research-intro__text { max-width: 60em; margin: 0; text-align: left; color: #0f172a; font-size: var(--fs-small); line-height: 1.7; }
.research-intro__text p { margin: 0 0 0.75rem; }

/* --- Area panels --- */
.research-details { padding-top: 2.5rem; padding-bottom: 2rem; }
.research-details--single { padding-top: 4rem; }

.area-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 23.4%) minmax(0, 1fr);
  gap: 2.75rem;
  align-items: start;
  padding: 0 2.75rem 0 0;
  margin: 0 0 4.5rem;
  /* a topic card jumps here: 2rem of air below the sticky header (4.5rem + 1px) - feedback 29.09.: it ended right at
     the header's edge (110px left ~25px, and the reveal shift took 20px of it - see anchorTop() in main.js) */
  scroll-margin-top: calc(6.5rem + 1px);
}
/* thin accent line on the right with rounded top corner */
.area-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 14px;
  border: solid var(--area-accent);
  border-width: 1px 1px 0 0;
  border-top-right-radius: 14px;
  pointer-events: none;
}

.area-panel__media img,
.area-panel__placeholder {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 170 / 245;
  object-fit: cover;
  border-radius: 14px;
}
.area-panel__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-dark);
}
.area-panel__placeholder img { width: 45%; aspect-ratio: auto; border-radius: 0; object-fit: contain; }

/* no space above the title: the photo begins level with it (feedback 28.10.) */
.area-panel__content { padding-top: 0; min-width: 0; }
.area-panel__media picture { display: block; }

.area-panel__title {
  position: relative;
  margin: 0 0 1.5rem;
  padding-bottom: 1.1rem;
  font-size: calc(var(--fs-h3) * 1.35);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #333;
  max-width: 24em;
}
.area-panel__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1.4rem;
  height: 2px;
  background: var(--area-accent);
}

.area-panel__lead { margin: 0 0 0.6rem; font-size: var(--fs-small); font-weight: 600; color: #333; line-height: 1.5; }
.area-panel__text { font-size: var(--fs-small); color: #333; line-height: 1.6; max-width: 46em; }
.area-panel__text p { margin: 0 0 0.6rem; }

.area-panel__tags { display: flex; flex-wrap: wrap; gap: 0.4rem 0.3rem; margin: 1rem 0 1.6rem; }
.area-panel__tags .method-tag {
  padding: 0.12rem 0.55rem;
  font-family: inherit;
  font-size: var(--fs-small);
  font-weight: 400;
  line-height: 1.35;
  color: #333;
  background: #fff;
  border: 1px solid #b5b5b5;
  border-radius: 999px;
}
.area-panel__tags .method-tag[data-method]:hover,
.area-panel__tags .method-tag[data-method]:focus-visible {
  border-color: var(--area-accent);
  color: #0f172a;
  background: color-mix(in srgb, var(--area-accent) 10%, #fff);
}
.area-panel__tags .method-tag--static:hover { border-color: #b5b5b5; color: #333; background: #fff; }
.area-panel__tags a.method-tag--link { text-decoration: none; transition: border-color 0.2s, background 0.2s, color 0.2s; }
.area-panel__tags a.method-tag--link:hover,
.area-panel__tags a.method-tag--link:focus-visible {
  border-color: var(--area-accent);
  color: #0f172a;
  background: color-mix(in srgb, var(--area-accent) 10%, #fff);
  text-decoration: none;
}

/* buttons to partner group websites (field "external_links") */
.area-panel__buttons { display: flex; flex-wrap: wrap; gap: 0.6rem 0.75rem; margin: 1rem 0 1.6rem; }
.area-panel__tags + .area-panel__buttons { margin-top: -0.4rem; }
.area-panel__button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  font-size: var(--fs-ui);
  font-weight: 500;
  line-height: 1.3;
  color: #0f172a;
  background: #fff;
  border: 1px solid var(--area-accent);
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.area-panel__button:hover { background: var(--area-accent); color: #fff; text-decoration: none; }

.area-panel__boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.area-panel__box { padding: 0.95rem 1rem 0.9rem; border: 1px solid #8f8f8f; border-radius: 10px; background: #fff; }
.area-panel__box-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.6rem;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
}
.area-panel__box-title .icon { color: var(--area-accent); }
.area-panel__list { margin: 0; padding: 0 0 0 1.35rem; list-style: disc; font-size: var(--fs-small); color: #0f172a; line-height: 1.5; }
.area-panel__list li { margin: 0 0 0.45rem; padding-left: 0.15rem; }
.area-panel__list li:last-child { margin-bottom: 0; }
.area-panel__list li::marker { font-size: 0.8em; }
.area-panel__source { display: block; color: var(--area-accent); text-decoration: none; font-weight: 400; transition: color 0.2s; }
a.area-panel__source:hover { color: color-mix(in srgb, var(--area-accent) 75%, #000); text-decoration: none; }

.area-panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; margin-top: 1.25rem; padding-bottom: 0.25rem; }
.area-panel__compare,
.area-panel__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: var(--fs-ui);
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.area-panel__compare .icon,
.area-panel__link .icon { transition: transform 0.2s ease; }
.area-panel__compare {
  padding: 0.3rem 0.7rem;
  color: #0f172a;
  background: #fff;
  border: 1px solid var(--area-accent);
  border-radius: 7px;
  transition: background 0.2s, color 0.2s;
}
.area-panel__compare:hover { background: var(--area-accent); color: #fff; }
.area-panel__link { color: var(--area-accent); transition: color 0.2s; }
.area-panel__link:hover { text-decoration: none; color: color-mix(in srgb, var(--area-accent) 75%, #000); }
.area-panel__link:hover .icon:first-child { transform: translateX(3px); }
.area-panel__link--more:hover .icon { transform: translateX(4px); }
.area-panel__link--more { margin-left: auto; }

/* --- Collaboration CTA --- */
.research-cta { padding: 3rem 0 2.75rem; border-top: 6px solid #ececec; text-align: left; background: #fff; }
.research-cta .research-cta__title { margin: 0 0 0.15rem; font-size: var(--fs-h3); font-weight: 600; color: #0f172a; text-align: left; }
.research-cta .research-cta__text { margin: 0 0 1.4rem; font-size: var(--fs-small); color: #0f172a; text-align: left; max-width: none; }
.research-cta .research-cta__actions { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 0.75rem 1.5rem; }
.research-cta .research-cta__btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.5rem 1rem; border-radius: 6px; font-size: var(--fs-ui); font-weight: 500; background: #9964ff; border-color: #9964ff; color: #fff; }
.research-cta .research-cta__btn .icon { width: 1rem; height: 1rem; }
.research-cta .research-cta__btn:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.research-cta .research-cta__link { display: inline-flex; align-items: center; gap: 0.5rem; color: #9964ff; font-size: var(--fs-ui); font-weight: 500; text-decoration: none; transition: color 0.2s; }
.research-cta .research-cta__link .icon { width: 1rem; height: 1rem; transition: transform 0.2s ease; }
.research-cta .research-cta__link:hover { color: var(--color-primary-hover); text-decoration: none; }
.research-cta .research-cta__link:hover .icon { transform: translateX(3px); }

/* --- Method modal (mockup state p02) --- */
dialog.method-modal {
  width: min(92vw, 970px);
  max-height: 85vh;
  border-radius: 10px;
  background: #eff4f7;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
}
dialog.method-modal::backdrop { background: rgba(90, 94, 104, 0.45); }
.method-modal .method-modal__inner { position: relative; max-height: 85vh; padding: 3.75rem 4.25rem 3.5rem; overflow-y: auto; }
.method-modal .method-modal__header { display: block; padding: 0; border: 0; }
.method-modal .method-modal__title {
  margin: 0 3rem 2.5rem 0;
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #333;
}
.method-modal .method-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  color: #6d28d9;
  border-radius: 50%;
}
.method-modal .method-modal__close:hover { background: rgba(109, 40, 217, 0.1); color: #6d28d9; }
.method-modal .method-modal__body { padding: 0; max-width: 44em; overflow: visible; font-size: var(--fs-body); font-weight: 400; line-height: 1.7; color: #333; }
.method-modal .method-modal__body p:last-child { margin-bottom: 0; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero--research { padding-bottom: 6rem; }
  .research-summary { margin-top: -4rem; }
  .research-summary .research-summary__grid { gap: 1.6rem 1rem; }
  .area-panel { grid-template-columns: minmax(0, 30%) minmax(0, 1fr); gap: 1.75rem; padding-right: 1.75rem; margin-bottom: 3.5rem; }
  .area-panel__boxes { grid-template-columns: 1fr; }
  .method-modal .method-modal__inner { padding: 3rem 2.25rem 2.5rem; }
}

@media (max-width: 600px) {
  .research-summary .research-summary__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-summary .research-summary__card,
  .research-siblings .research-summary__card { padding: 1.2rem 0.6rem 2rem; }
  .research-intro { padding-top: 3rem; }
  /* the whole picture across the full width (feedback 28.10.: before, the portrait cut was cut once more to 4:3 and
     filled only 60 % of the width) - area-block.php hands the uncut picture to phones. The thin accent line on the
     right goes here (feedback 28.10.: one below the other it frames nothing), and with it the room kept for it */
  .area-panel { grid-template-columns: 1fr; gap: 1.25rem; padding-right: 0; }
  .area-panel::after { display: none; }
  .area-panel__media img { aspect-ratio: auto; }
  .area-panel__placeholder { max-width: 60%; aspect-ratio: 4 / 3; }
  .area-panel__content { padding-top: 0; }
  .area-panel__link--more { margin-left: 0; }
  .method-modal .method-modal__inner { padding: 3rem 1.4rem 2rem; }
  .method-modal .method-modal__title { margin-bottom: 1.5rem; }
}
