/* =====================================================================
   PARTICIPANT PRESENTATIONS PAGE: extra styles (used only by this page)
   Fonts, the navy banner, panels and buttons come from style.css.
   You normally never need to edit this file.
   ===================================================================== */

/* ---------- Topic accent colours ----------
   A topic chooses one with  color: `teal`  in presentations-data.js.
   --acc = strong colour, --acc-soft = very light background tint.       */
.accent-indigo { --acc: #4338ca; --acc-soft: #eef0fd; }   /* the site's accent */
.accent-teal   { --acc: #0f766e; --acc-soft: #eaf5f3; }
.accent-amber  { --acc: #a8520a; --acc-soft: #fbf4e8; }
.accent-purple { --acc: #6d28d9; --acc-soft: #f3edfd; }
.accent-rose   { --acc: #be123c; --acc-soft: #fdecef; }
.accent-blue   { --acc: #1d4ed8; --acc-soft: #e9effd; }
.accent-green  { --acc: #15803d; --acc-soft: #e8f5ec; }

/* ---------- Numbers in the banner ---------- */
.pres-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.pres-stat {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r); padding: 12px 22px; min-width: 130px;
}
.pres-stat strong { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 2rem; line-height: 1.1; color: #fff; }
.pres-stat span { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }

/* Opening /presentations/#topic-id: land the topic below the menu AND the filter bar */
html { scroll-padding-top: calc(var(--header-h) + 84px); }

/* ---------- Filter bar (sticks under the top menu) ---------- */
.topic-filter-bar {
  position: sticky; top: var(--header-h); z-index: 50;
  background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.topic-filter {
  width: 100%; max-width: calc(var(--w-page) + 2 * var(--gutter)); margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
}
.topic-filter::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  font: 600 .95rem var(--font-body); color: var(--text-2);
  background: #fff; border: 1px solid var(--line-2);
  border-radius: 999px; padding: 7px 16px; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.chip span { font-family: var(--font-mono); font-size: .8rem; background: var(--canvas-2); color: var(--text-2); border-radius: 999px; padding: 1px 8px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.chip.is-active span { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- One topic (dataset) block ---------- */
.topic {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); margin-bottom: 32px; overflow: hidden;
  border-top: 5px solid var(--acc);
}
.topic-head {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start;
  padding: clamp(24px, 3.6vw, 44px) clamp(22px, 3.6vw, 48px) 6px;
}
.topic-num {
  font-family: var(--font-mono); font-weight: 600; font-size: 1.7rem; line-height: 1;
  color: var(--acc); background: var(--acc-soft);
  width: 68px; height: 68px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.topic-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tag {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; padding: 4px 11px; border-radius: 999px;
}
.tag--organism { background: var(--acc); color: #fff; }
.tag--type { background: var(--acc-soft); color: var(--acc); }
.topic-head h2 { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.9rem); margin: 0 0 6px; }
.topic-typenote { color: var(--text-3); font-size: var(--fs-small); margin: 0; }

.topic > :not(.topic-head):not(.pres-grid) { margin-left: clamp(22px, 3.6vw, 48px); margin-right: clamp(22px, 3.6vw, 48px); }

/* Fold-out background box (EAE) */
.topic-background {
  margin-top: 18px; background: var(--canvas); border: 1px solid var(--line);
  border-radius: var(--r); padding: 0 18px;
}
.topic-background summary { cursor: pointer; font-weight: 600; color: var(--acc); padding: 13px 0; list-style: none; }
.topic-background summary::-webkit-details-marker { display: none; }
.topic-background summary::before { content: "+"; display: inline-block; width: 1.4em; font-weight: 700; }
.topic-background[open] summary::before { content: "−"; }
.topic-background p { margin: 0 0 16px; color: var(--text-2); }

/* "About the dataset" and "Why the analysis was done" */
.topic-info { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.info-card { background: var(--acc-soft); border-radius: var(--r); padding: 20px 22px; }
.info-card h4, .topic-question span, .pres-head h4 {
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
}
.info-card h4 { color: var(--acc); margin: 0 0 8px; }
.info-card p { margin: 0; color: var(--text-2); }

.topic-question {
  margin-top: 18px; border-left: 4px solid var(--acc); background: #fff;
  border-radius: 0 var(--r) var(--r) 0; padding: 14px 20px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.topic-question span { display: block; color: var(--acc); margin-bottom: 4px; }
.topic-question p { margin: 0; font-weight: 500; color: var(--text); }

/* ---------- Presentations: 2 side by side on computers ---------- */
.pres-head { display: flex; align-items: center; gap: 10px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.pres-head h4 { margin: 0; color: var(--text-3); }
.pres-head .count { font-family: var(--font-mono); background: var(--acc); color: #fff; font-weight: 500; font-size: .78rem; border-radius: 999px; padding: 2px 10px; }

.pres-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
  padding: 18px clamp(22px, 3.6vw, 48px) clamp(24px, 3.6vw, 44px);
}
.pres-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.pres-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }

.video-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  border: 0; padding: 0; margin: 0; background: #05080f; cursor: pointer; overflow: hidden;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .3s; opacity: .94; }
.video-thumb:hover img { transform: scale(1.04); opacity: 1; }
/* Play button sits in the bottom-right corner so it doesn't cover the title on the thumbnail */
.video-thumb .play { position: absolute; right: 10px; bottom: 10px; display: flex; }
.video-thumb .play svg { width: 48px; height: 34px; filter: drop-shadow(0 3px 8px rgba(0,0,0,.45)); transition: transform .2s; }
.video-thumb:hover .play svg { transform: scale(1.1); }
.video-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-thumb.is-playing { cursor: default; }
.video-thumb--empty { display: flex; align-items: center; justify-content: center; color: var(--on-dark-3); font-weight: 600; cursor: default; }

.pres-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.pres-card__body h3 { font-size: 1.22rem; margin: 0 0 4px; }
.pres-aff { color: var(--text-3); font-size: var(--fs-small); line-height: 1.55; margin: 0 0 12px; }
.pres-link { margin-top: auto; font-weight: 600; font-size: .95rem; color: var(--acc); text-decoration: none; }
.pres-link:hover { text-decoration: underline; }

/* ---------- Bottom box ---------- */
.pres-cta { margin-top: 12px; margin-bottom: 0; }
.pres-cta h2 { margin-bottom: 10px; }

/* ---------- Tablets & phones ---------- */
@media (max-width: 760px) {
  .topic-info { grid-template-columns: 1fr; }
  .topic-head { grid-template-columns: 1fr; gap: 14px; }
  .topic-num { width: 52px; height: 52px; font-size: 1.35rem; border-radius: 13px; }
}
@media (max-width: 600px) {
  .pres-grid { grid-template-columns: 1fr; padding: 16px 18px 24px; }
  .topic > :not(.topic-head):not(.pres-grid) { margin-left: 18px; margin-right: 18px; }
  .topic-head { padding: 22px 18px 6px; }
  .pres-stat { min-width: 0; flex: 1; padding: 10px 14px; }
  .pres-stat strong { font-size: 1.6rem; }
}
