/* ========= Core variables ========= */
:root{
  /* Brand */
  --brand-red:#c32020;
  --brand-red-cta:#e04949;
  --ink:#231f20;
  --muted:#6b7280;
  --bg-soft:#fff7f7;
  --line:#ead8d8;

  /* Layout */
  --layout-max:1280px;
  --layout-max-xl:1400px;
  --left-col:320px;
  --gap:2rem;

  /* Sticky offsets */
  --sticky-top:90px;         /* distance below fixed site menu */
  --pane-pad-bottom:24px;    /* bottom breathing room */

  /* Tracks */
  --mc-blue:#2563eb;
  --mc-blue-soft:#eef3ff;
  --dc-green:#059669;
  --dc-green-soft:#ecfdf5;
}

/* ========= Program layout (two-pane) ========= */
.program-main{ padding:1rem 1rem 2rem; }
.program-main__header{ max-width:var(--layout-max); margin:0 auto 1rem; text-align:center; }
.program-main__header h2{ color:var(--brand-red); margin:.25rem 0; }
.program-main__header p{ color:var(--muted); margin:0; }

.program-main__layout{
  max-width:var(--layout-max);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(260px,var(--left-col)) minmax(0,1fr);
  gap:var(--gap);
  align-items:stretch;
}
@media (min-width:1400px){
  .program-main__layout{
    max-width:var(--layout-max-xl);
    grid-template-columns:340px minmax(0,1fr);
  }
}

/* LEFT: at-a-glance (sticky, own scroll) */
.program-main__glance{
  position:sticky; top:var(--sticky-top);
  max-height:calc(100vh - var(--sticky-top) - var(--pane-pad-bottom));
  overflow:auto;
  padding-right:.25rem;
  scrollbar-gutter:stable both-edges;
}
.glance-day{ margin-bottom:1.25rem; }
.glance-day h3{
  font-size:1rem; font-weight:800; margin:.25rem 0 .5rem;
  color:var(--brand-red);
  border-left:4px solid var(--brand-red-cta);
  padding-left:.5rem;
}
.glance-table{
  width:100%; border-collapse:collapse; font-size:.95rem;
  background:#fff; border:1px solid var(--line);
  border-radius:10px; overflow:hidden;
}
.glance-table th{
  white-space:nowrap; width:11ch; text-align:left;
  background:var(--bg-soft); padding:.5rem .6rem;
  border-bottom:1px solid var(--line); font-weight:800;
}
.glance-table td{ padding:.5rem .75rem; border-bottom:1px solid var(--line); }
.glance-table tr:last-child th,
.glance-table tr:last-child td{ border-bottom:0; }
.glance-link{ color:var(--brand-red); text-decoration:none; font-weight:700; }
.glance-link:hover{ text-decoration:underline; }

/* RIGHT: details (own scroll) */
.program-main__details{
  min-width:0;
  max-height:calc(100vh - var(--sticky-top) - var(--pane-pad-bottom));
  overflow:auto;
  padding-right:.5rem;
  scroll-behavior:smooth;
  /* populated via JS to match sticky tools height */
  scroll-padding-top: var(--details-pad, 84px);
  scrollbar-gutter:stable both-edges;
}

/* Sticky tools (search) under the right pane top */
.program-tools{
  position:sticky; top:0; z-index:3;
  background:#fff;
  padding:.6rem 0 .75rem;
  border-bottom:1px solid var(--line);
  margin-bottom:.75rem;
}
.visually-hidden{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.search-input{
  width:min(560px,100%); padding:.6rem .75rem;
  border:1px solid var(--line); border-radius:8px; font-size:1rem;
}
.search-btn{
  margin-left:.5rem; padding:.6rem .95rem; border:none; border-radius:8px;
  font-weight:700; cursor:pointer; background:var(--brand-red-cta); color:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,.08); transition:filter .2s;
}
.search-btn:hover{ filter:brightness(.95); }
.search-results{ list-style:none; margin:.5rem 0 0; padding:0; }
.search-results li{
  padding:.45rem .6rem; border:1px solid var(--line); border-radius:8px;
  background:#fff; margin:.35rem 0; cursor:pointer;
}
.search-results li strong{ color:var(--brand-red); }

/* ========= Detail cards ========= */
.detail-block{
  border:1px solid var(--line); border-radius:12px;
  padding:1rem 1.1rem; margin-bottom:1rem; background:#fff;
  scroll-margin-top:12px;
}
.detail-head{
  display:flex; flex-direction:column; gap:.25rem;
  margin-bottom:.5rem; border-left:4px solid var(--brand-red);
  padding-left:.6rem;
}
.detail-head--keynote{ border-left-color:var(--brand-red-cta); }
.detail-head h3{ margin:0; font-size:1.08rem; }
.detail-head h3 span{ font-weight:800; color:var(--brand-red); }
.detail-head small{ color:var(--muted); }

/* :target highlight */
.detail-block:target{ box-shadow:0 0 0 3px rgba(195,32,32,.12) inset; border-color:var(--brand-red-cta); }
.detail-block:target .detail-head{ border-left-color:var(--brand-red-cta); }

/* ========= Papers & Posters ========= */
.paper-list{
  list-style:none; padding-left:0; counter-reset:papers;
  margin:.4rem 0 .25rem;
}
.paper-item{
  position:relative;
  margin:.35rem 0;
  padding:.45rem .70rem .40rem 2rem;  /* room for numbers */
  transition: background-color .15s ease, box-shadow .15s ease;
}
.paper-item::before{
  counter-increment:papers;
  content:counter(papers) ".";
  position:absolute; left:.35rem; top:.15rem;
  font-weight:800; color:var(--brand-red);
}
.paper-item h4{ margin:0 0 .12rem; font-size:1rem; line-height:1.35; }
.paper-item .authors{ margin:0; color:var(--muted); line-height:1.35; }
.paper-item.hit{ outline:2px solid var(--brand-red-cta); background:var(--bg-soft); border-radius:8px; }

/* Standard paper hover (soft brand red) */
.paper-item:not(.poster--mc):not(.poster--dc):hover,
.paper-item:not(.poster--mc):not(.poster--dc):focus-within{
  background:var(--bg-soft);
}

/* Posters (MC/DC) — left accent + specific hover + number offset */
.poster--mc{ border-left:4px solid var(--mc-blue); padding-left:2.6rem; }
.poster--dc{ border-left:4px solid var(--dc-green); padding-left:2.6rem; }
.poster--mc::before, .poster--dc::before{ left:.60rem; }
.poster--mc:hover, .poster--mc:focus-within{ background:var(--mc-blue-soft); }
.poster--dc:hover, .poster--dc:focus-within{ background:var(--dc-green-soft); }

/* Optional chips before poster titles */
.tag{
  display:inline-block; font-size:.75rem; font-weight:800; line-height:1;
  padding:.22rem .45rem; border-radius:999px; vertical-align:middle;
  margin-right:.45rem; letter-spacing:.02em; white-space:nowrap;
}
.tag--mc{ background:var(--mc-blue); color:#fff; }
.tag--dc{ background:var(--dc-green); color:#fff; }

/* Tiny legend row under poster headings */
.poster-legend{
  margin:.15rem 0 .35rem; color:var(--muted); font-size:.92rem;
  display:flex; gap:1rem; align-items:center; flex-wrap:wrap;
}

/* ========= Keynote presenters ========= */
.keynote-card{ margin-top:.5rem; }
.talk-title{ margin:.15rem 0 .6rem; font-size:1.03rem; }
.presenters{ list-style:none; margin:0; padding:0; display:flex; gap:.8rem; flex-wrap:wrap; }
.presenter{
  display:flex; gap:.65rem; align-items:center; background:#fff;
  border:1px solid var(--line); border-radius:10px; padding:.45rem .6rem; width:100%;
}
.avatar{ width:64px; height:64px; border-radius:50%; object-fit:cover; }
.presenter-meta{ display:flex; align-items:center; gap:.35rem; flex-wrap:wrap; }
.presenter-meta .ext{ font-weight:800; color:var(--brand-red); text-decoration:none; line-height:1; }
.presenter-meta .ext:hover{ text-decoration:underline; }
.affil{ color:var(--muted); }
.badge-time{
  margin-left:auto; background:var(--bg-soft); border:1px solid var(--line);
  border-radius:9999px; padding:.2rem .55rem; font-size:.82rem;
  color:var(--brand-red); white-space:nowrap;
}

/* ========= At-a-glance table (homepage): track-specific poster cells ========= */
.nm25-glance .cell--poster--mc{
  background:linear-gradient(180deg, var(--mc-blue-soft), #fff);
}
.nm25-glance .cell--poster--dc{
  background:linear-gradient(180deg, var(--dc-green-soft), #fff);
}
.nm25-glance .cell--poster--mc a,
.nm25-glance .cell--poster--dc a{ font-weight:800; }

/* ========= Custom scrollbars ========= */
.program-main__glance::-webkit-scrollbar,
.program-main__details::-webkit-scrollbar{ width:10px; }
.program-main__glance::-webkit-scrollbar-track,
.program-main__details::-webkit-scrollbar-track{ background:#f8eded; border-radius:8px; }
.program-main__glance::-webkit-scrollbar-thumb,
.program-main__details::-webkit-scrollbar-thumb{
  background:#e6b1b1; border-radius:8px; border:2px solid #f8eded;
}
.program-main__glance::-webkit-scrollbar-thumb:hover,
.program-main__details::-webkit-scrollbar-thumb:hover{ background:var(--brand-red-cta); }
.program-main__glance, .program-main__details{
  scrollbar-width:thin; scrollbar-color:#e6b1b1 #f8eded;
}

/* ========= Responsive ========= */
@media (max-width:980px){
  .program-main__layout{ grid-template-columns:1fr; gap:1.5rem; }
  .program-main__glance,
  .program-main__details{ position:static; max-height:none; overflow:visible; padding-right:0; }
}

/* ========= Optional: header hero (if present on the page) ========= */
.header{ position:relative; block-size:40vh; min-block-size:280px; max-block-size:520px; overflow:hidden; }
.header__image{ position:absolute; inset:0; }
.header__image img{
  inline-size:100%; block-size:100%; object-fit:cover; object-position:50% 28%; display:block;
}
.header__content{
  position:relative; z-index:1; inline-size:100%; block-size:100%;
  display:grid; place-content:center; padding:1.5rem;
}

.session-chair {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}
.session-chair strong {
  color: var(--brand-red);
  font-weight: 600;
}

/* ===== Awards section (polished) ===== */
.awards-intro{ display:flex; justify-content:center; }
.awards-intro p{
  color:var(--ink); max-width:1000px; text-align:center; line-height:1.5;
  margin:0 auto 1rem;
}
.awards-intro .ext{ color:var(--brand-red); font-weight:800; text-decoration:none; }
.awards-intro .ext:hover{ text-decoration:underline; }

.award-cards{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:1rem; margin-top:1rem;
}
@media (max-width:1200px){ .award-cards{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width:640px){ .award-cards{ grid-template-columns: 1fr; } }

.award-card{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:1rem;
  display:flex; flex-direction:column; gap:.65rem;
}

.award-head{
  border-left:4px solid var(--brand-red);
  padding-left:.6rem;
}
.award-title{
  margin:.1rem 0 .25rem;
  font-size:1.05rem; color:var(--brand-red); line-height:1.25;
}
.award-meta{
  margin:0; color:var(--muted); line-height:1.35;
}
.award-meta .label{ font-weight:700; color:var(--ink); }
.award-meta .value{ color:var(--muted); }

.award-thumb-link{
  display:block; text-decoration:none; margin-top:.25rem;
}
.award-thumb{
  display:block; width:100%; height:220px;
  object-fit:contain; /* show full certificate nicely */
  background:var(--bg-soft);
  border:1px solid var(--line); border-radius:10px; padding:.5rem;
  box-shadow:0 1px 2px rgba(0,0,0,.03);
}

/* vertically balance content if titles wrap */
.award-card { min-height: 420px; }
@media (max-width:640px){ .award-card { min-height: 0; } }

.slides-note{
  margin:.25rem 0 .5rem;
  color:var(--muted);
  font-style:italic;
}
.slides-note a{ color:var(--brand-red); font-weight:700; text-decoration:none; }
.slides-note a:hover{ text-decoration:underline; }