/* CoopEval page-level overrides layered on top of the copied template CSS. */

.publication-title {
  font-size: clamp(1.85rem, 3.6vw, 3.05rem) !important;
  line-height: 1.12 !important;
}

.title-line {
  display: block;
}

.title-kicker {
  font-size: 1.16em;
  line-height: 1;
}

.publication-header .hero-body {
  padding-bottom: 2.5rem;
}

.coopeval-author-list {
  margin-bottom: 1.1rem;
}

.author-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.35rem;
}

.author-row + .author-row {
  margin-top: 0.35rem;
}

.publication-authors .publication-venue {
  display: block;
  width: fit-content;
  margin: 0.8rem auto 0;
}

.affiliation-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1rem;
  max-width: 980px;
  margin: 0.8rem auto 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.45;
}

.affiliation-list span {
  display: inline-block;
}

.affiliation-list sup {
  margin-right: 0.18rem;
  color: var(--text-primary);
  font-weight: 700;
}

.mechanism-pill {
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  border-radius: 6px;
  padding: 0.08rem 0.32rem;
  font-weight: 700;
}

.repetition-pill {
  background: #edf6fa;
  color: #244d76;
}

.reputation-pill {
  background: #fff7d4;
  color: #805421;
}

.mediation-pill {
  background: #fae5e8;
  color: #8b3b47;
}

.contracting-pill {
  background: #e7f2e1;
  color: #3e6338;
}

.coopeval-teaser .hero-body {
  padding-top: 1rem;
  padding-bottom: 3rem;
}

.coopeval-teaser .publication-banner {
  max-height: none;
  box-shadow: none;
  margin: 1rem auto 1.5rem;
  overflow: visible;
  border-radius: 0;
}

.coopeval-teaser .publication-banner img {
  padding: 8px;
  max-height: 420px;
  width: 100%;
  object-fit: contain;
  box-sizing: border-box;
  box-shadow: none;
  background: #ffffff;
  border-radius: 0;
}

.coopeval-teaser .publication-banner img:hover {
  transform: none;
  box-shadow: none;
}

.section-lead {
  max-width: 780px;
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.75;
}

.section-lead.is-centered {
  text-align: center;
}

.evolution-copy {
  max-width: 820px;
  margin: 0 auto 2rem;
}

@media screen and (max-width: 768px) {
  .publication-title {
    font-size: clamp(1.85rem, 9vw, 2.35rem) !important;
  }

  .author-row {
    display: block;
  }
}

.takeaway-card,
.metric-bars,
.plot-card,
.result-table-figure,
.figure-details {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--background-primary);
  box-shadow: var(--shadow-md);
}

.takeaway-card {
  min-height: 100%;
  padding: 1.35rem;
}

.takeaway-card h3 {
  margin: 0 0 0.45rem;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 800;
}

.takeaway-card p {
  margin: 0;
  color: var(--text-secondary);
}

.mechanism-card {
  position: relative;
  overflow: hidden;
  border-left-width: 6px;
}

.mechanism-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 100%;
  opacity: 0.25;
  pointer-events: none;
}

.mechanism-card h3 {
  position: relative;
}

.mechanism-card p {
  position: relative;
}

.repetition-card {
  border-left-color: #2f5f8f;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 58%, #f8fcfd 78%, #edf6fa 100%);
}

.repetition-card::before {
  background: linear-gradient(135deg, transparent, rgb(207 226 235 / 0.45));
}

.reputation-card {
  border-left-color: #a36f2e;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 58%, #fffdf3 78%, #fff7d4 100%);
}

.reputation-card::before {
  background: linear-gradient(135deg, transparent, rgb(241 223 152 / 0.45));
}

.mediation-card {
  border-left-color: #ad4f5b;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 58%, #fdf7f8 78%, #fae5e8 100%);
}

.mediation-card::before {
  background: linear-gradient(135deg, transparent, rgb(239 189 195 / 0.45));
}

.contracting-card {
  border-left-color: #4f7748;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 58%, #f8fbf6 78%, #e7f2e1 100%);
}

.contracting-card::before {
  background: linear-gradient(135deg, transparent, rgb(201 223 194 / 0.45));
}

.result-table-figure,
.justification-figure,
.plot-card,
.details-figure {
  margin: 0;
}

.result-table-figure,
.justification-figure {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.result-table-figure {
  margin-top: 2rem;
}

.result-table-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.justification-figure {
  margin-top: 2rem;
}

.justification-figure img {
  width: 100%;
  max-width: 860px;
  max-height: 560px;
  object-fit: contain;
  margin: 0 auto;
}

figcaption {
  margin-top: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.metric-bars {
  display: grid;
  gap: 0.7rem;
  margin-top: 2rem;
  padding: 1.2rem;
}

.metric-bar-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) 4.2rem;
  gap: 0.9rem;
  align-items: center;
}

.metric-label {
  color: var(--text-primary);
  font-weight: 800;
}

.metric-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--background-accent);
}

.metric-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--metric-color-soft, #b7d8ee), var(--metric-color, #4f9d69));
}

.contracting-metric {
  --metric-color: #4f7748;
  --metric-color-soft: #c9dfc2;
}

.mediation-metric {
  --metric-color: #ad4f5b;
  --metric-color-soft: #efbdc3;
}

.repetition-metric {
  --metric-color: #2f5f8f;
  --metric-color-soft: #cfe2eb;
}

.reputation-metric {
  --metric-color: #a36f2e;
  --metric-color-soft: #f1df98;
}

.no-mechanism-metric {
  --metric-color: #6b7280;
  --metric-color-soft: #cbd5e1;
}

.metric-bar-row strong {
  color: var(--text-primary);
  font-size: 1rem;
  text-align: right;
}

.plot-card {
  padding: 1rem;
}

.plot-card img {
  width: 100%;
  max-height: 660px;
  object-fit: contain;
  border-radius: var(--border-radius);
  background: #ffffff;
}

.figure-details {
  margin-top: 1rem;
  overflow: hidden;
}

.figure-details summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  color: var(--text-primary);
  font-weight: 800;
}

.figure-details[open] summary {
  border-bottom: 1px solid var(--border-color);
}

.details-figure {
  padding: 1rem;
}

.details-figure img {
  display: block;
  width: 100%;
  max-height: 760px;
  object-fit: contain;
  border-radius: var(--border-radius);
  background: #ffffff;
}

.details-figure.tall-figure img {
  max-height: 820px;
}

iframe[title="CoopEval paper PDF"] {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

@media screen and (max-width: 768px) {
  .coopeval-teaser .publication-banner img {
    max-height: 300px;
  }

  .metric-bar-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .metric-bar-row strong {
    text-align: left;
  }

  .plot-card img,
  .details-figure img,
  .details-figure.tall-figure img {
    max-height: 70vh;
  }
}

@media screen and (max-width: 480px) {
  .metric-bars {
    padding: 1rem;
  }
}
