/*
 * Activities (page 314, key "activities"), rulebook P-08.
 * Code-rendered: eam-activities/templates/activities.php ([eam_activities]
 * inside the eam/section block). Loaded by includes/redesign.php only on this
 * page and only while the redesign switch is on.
 *
 * RS model: Summer Science Exhibition (clone:src/app/science-events-and-lectures/
 * summer-science-exhibition/page.tsx). Shared parts already style the hero,
 * the "On this page" panel, section headers, the card frame, buttons and the
 * CTA band (components.css, forms.css). This file only lays out:
 *   1. Courses & Workshops as a BlogSection main column (cols 1-7 of 10)
 *      holding an RS NewsLatest dated list (.rd-act-dated, template markup
 *      used only while the switch is on);
 *   2. Networking & Collaborations (and the optional Publications cards) as an
 *      RS CardList listing: 3 per row, 2 at <= 820px, 1 at <= 480px.
 * Every rule: body.eam-redesign.page-id-314, tokens only.
 */

/* ---- 1. Courses & Workshops: dated list ---------------------------------- */

/* RS BlogSection main column: columns 1-7 of a 10-column grid (916px at 1440). */
body.eam-redesign.page-id-314 .eam-act .rd-act-dated {
  max-width: calc((100% - 9 * var(--rd-grid-gap)) * .7 + 6 * var(--rd-grid-gap));
  margin: 0;
  padding: 0;
  list-style: none;
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated__item {
  display: block;
  margin: 0;
  padding: 0;
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated__item + .rd-act-dated__item {
  margin-top: var(--rd-space-base);
}

/* RS .plain-card__title: 18 / 1.2 semibold at every width. */
body.eam-redesign.page-id-314 .eam-act .rd-act-dated__title {
  margin: 0 0 .46em;
  font-family: var(--rd-font);
  font-size: var(--rd-fs-large);
  font-weight: var(--rd-fw-semibold);
  line-height: 1.2;
  letter-spacing: var(--rd-ls-heading);
  text-transform: none;
  color: var(--rd-color-text);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated__text {
  margin: 0;
  font-size: var(--rd-fs-body);
  line-height: var(--rd-lh-body);
  color: var(--rd-color-text);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated__text + .rd-act-dated__text {
  margin-top: var(--rd-space-2xs);
}

/* RS .search-result-card__meta: the date in semibold. */
body.eam-redesign.page-id-314 .eam-act .rd-act-dated__date {
  margin: 0;
  font-size: var(--rd-fs-body);
  font-weight: var(--rd-fw-semibold);
  line-height: var(--rd-lh-body);
  color: var(--rd-color-text);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--rd-space-base);
  margin: var(--rd-space-2xs) 0 0;
  font-size: var(--rd-fs-body);
  line-height: var(--rd-lh-body);
}

/* Link-sized tap target (44px) without moving the text. */
body.eam-redesign.page-id-314 .eam-act .rd-act-dated__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -10px;
  font-weight: var(--rd-fw-semibold);
  color: var(--rd-color-link);
  text-decoration: none;
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated__links a:is(:hover, :focus-visible) {
  color: var(--rd-color-link-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* Members-only course materials under a course (eam-activities.css:264-280):
 * a quiet square panel instead of the dashed rule and capital labels. */
body.eam-redesign.page-id-314 .eam-act .rd-act-dated .eam-act-materials {
  margin: var(--rd-space-xs) 0 0;
  padding: var(--rd-space-xs) var(--rd-space-s);
  border: 0;
  border-radius: var(--rd-radius);
  background: var(--rd-color-surface-muted);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated .eam-act-materials__label {
  margin: 0 0 var(--rd-space-2xs);
  font-size: var(--rd-fs-small);
  font-weight: var(--rd-fw-semibold);
  line-height: var(--rd-lh-body);
  letter-spacing: 0;
  text-transform: none;
  color: var(--rd-color-text-70);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated .eam-act-materials__tag {
  padding: 0 var(--rd-space-2xs);
  font-size: var(--rd-fs-xs);
  letter-spacing: 0;
  background: var(--rd-color-primary);
  color: var(--rd-color-on-primary);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated .eam-act-materials__list a {
  font-size: var(--rd-fs-body);
  font-weight: var(--rd-fw-semibold);
  color: var(--rd-color-link);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated .eam-act-materials__meta {
  font-size: var(--rd-fs-small);
  color: var(--rd-color-text-70);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated .eam-act-materials--locked svg {
  fill: var(--rd-color-text-70);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated .eam-act-materials--locked p {
  font-size: var(--rd-fs-body);
  line-height: var(--rd-lh-body);
  color: var(--rd-color-text-70);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated .eam-act-materials--locked strong {
  color: var(--rd-color-text);
}

body.eam-redesign.page-id-314 .eam-act .rd-act-dated .eam-act-materials--locked a {
  font-weight: var(--rd-fw-semibold);
  color: var(--rd-color-link);
}

/* Tablet and phone: the list takes the full column (RS 4-column grid). */
@media (max-width: 820px) {
  body.eam-redesign.page-id-314 .eam-act .rd-act-dated {
    max-width: none;
  }
}

/* ---- 2. Networking & Collaborations (+ optional Publications): RS listing - */

/* 3 per row, cards up to 428px (RS CardList "listing"), 16px gaps. With two
 * entries the row stays left-aligned, as RS listings do. */
body.eam-redesign.page-id-314 .eam-act .eam-act-section .eam-act-grid--2 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rd-grid-gap);
}

body.eam-redesign.page-id-314 .eam-act .eam-act-section .eam-act-grid--2 > .eam-act-card {
  max-width: 428px;
}

@media (max-width: 820px) {
  body.eam-redesign.page-id-314 .eam-act .eam-act-section .eam-act-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.eam-redesign.page-id-314 .eam-act .eam-act-section .eam-act-grid--2 > .eam-act-card {
    max-width: none;
  }
}

@media (max-width: 480px) {
  body.eam-redesign.page-id-314 .eam-act .eam-act-section .eam-act-grid--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Optional Publications cards (Page texts checkbox, off on live): the tick
 * list look (.eam-act-checks) is shared, in components.css section 7. */

/* ---- Anchors -------------------------------------------------------------- */

/* "On this page" jumps (#workshops, #networking, legacy #collaboration) clear
 * the header while it is shown (eam-activities.css:47-52 used a fixed 110px). */
body.eam-redesign.page-id-314 .eam-act :is(.eam-act-section, .eam-act-anchor) {
  scroll-margin-top: var(--rd-header-offset, var(--rd-header-h));
}
