/* ============================================================
   Gantry web — Meetings                 #/congresses · #/congress/:id
   Layout + motion for surfaces/web/congress.jsx. Tokens only.
   ============================================================ */

.cg-cg-page { display: flex; flex-direction: column; gap: 16px; }
.cg-cg-muted { font-size: 10.5px; color: var(--fg-4); }
.cg-cg-wait {
  font-family: var(--font-serif); font-size: 14px; color: var(--fg-3);
}

/* ---------- Header ---------- */
.cg-cg-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.cg-cg-h1 {
  margin: 6px 0 0;
  font-family: var(--font-serif); font-weight: 400;
  font-size: 34px; line-height: 1.08; letter-spacing: -0.01em;
  color: var(--fg); max-width: 22ch;
}
.cg-cg-lede {
  margin: 8px 0 0; max-width: 54ch;
  font-size: 13px; line-height: 1.5; color: var(--fg-2);
}
.cg-cg-head-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  min-width: 260px;
}
.cg-cg-head-right .cg-input { width: 260px; }
.cg-cg-total { font-size: 10.5px; color: var(--fg-4); }

.cg-cg-meta {
  margin-top: 10px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.cg-cg-topics { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cg-cg-site {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--brand-text); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s var(--ease);
}
.cg-cg-site:hover { border-bottom-color: currentColor; }

.cg-cg-counts { display: flex; align-items: flex-end; gap: 30px; }
.cg-cg-count {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  text-align: right;
  animation: cg-cg-rise .5s var(--ease) both;
}
.cg-cg-count:nth-child(2) { animation-delay: 70ms; }
.cg-cg-count-n { font-size: 30px; line-height: 1; }
.cg-cg-count-l {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: var(--fg-3);
}
@keyframes cg-cg-rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Browse timeline ---------- */
.cg-cg-timeline-card { padding: 16px 18px 18px; overflow: hidden; }
.cg-cg-years {
  position: relative; display: flex; align-items: baseline;
  font-size: 10px; color: var(--fg-4);
  padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.cg-cg-lane-label { width: 190px; flex: none; }
.cg-cg-year-lo { flex: none; }
.cg-cg-year-hi { margin-left: auto; }

.cg-cg-lanes { list-style: none; margin: 0; padding: 0; }
.cg-cg-lane {
  display: flex; align-items: center; gap: 0;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  /* Lanes arrive top-down so the timeline reads as being drawn rather than
     appearing whole. */
  animation: cg-cg-lane-in .45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.cg-cg-lane:last-child { border-bottom: 0; }
@keyframes cg-cg-lane-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}
.cg-cg-lane .cg-cg-lane-label {
  display: flex; flex-direction: column; gap: 1px; padding-right: 16px;
  min-width: 0;
}
.cg-cg-lane-name { font-size: 13px; font-weight: 600; color: var(--fg); }
.cg-cg-lane-society {
  font-size: 10px; color: var(--fg-4);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cg-cg-lane-track {
  position: relative; flex: 1 1 auto; height: 34px; min-width: 0;
}
.cg-cg-lane-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--line);
}
.cg-cg-dot {
  position: absolute; top: 50%; transform: translateY(-50%);
  padding: 0; border: 0; cursor: pointer;
  border-radius: var(--r-pill);
  background: var(--brand); opacity: .82;
  transition: opacity .15s var(--ease), transform .15s var(--ease);
}
.cg-cg-dot:hover, .cg-cg-dot:focus-visible {
  opacity: 1; transform: translateY(-50%) scale(1.18);
}
.cg-cg-dot:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cg-cg-dot-year {
  position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%); margin-top: 3px;
  font-size: 9px; color: var(--fg-4); white-space: nowrap;
  opacity: 0; transition: opacity .15s var(--ease);
  pointer-events: none;
}
.cg-cg-dot:hover .cg-cg-dot-year, .cg-cg-dot:focus-visible .cg-cg-dot-year {
  opacity: 1;
}

/* ---------- Series trajectory ---------- */
.cg-cg-series-card { padding: 14px 18px 10px; }
.cg-cg-series-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 6px;
}
.cg-cg-series { display: block; width: 100%; height: 120px; overflow: visible; }
.cg-cg-series-line {
  fill: none; stroke: var(--brand); stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round; stroke-linecap: round;
  /* Drawn in on mount: the line IS the trajectory, so watching it extend
     left to right is the reading, not decoration. */
  stroke-dasharray: 2600; stroke-dashoffset: 2600;
  animation: cg-cg-draw 1.1s var(--ease) forwards;
}
@keyframes cg-cg-draw { to { stroke-dashoffset: 0; } }
.cg-cg-series-dot {
  fill: var(--bg); stroke: var(--brand); stroke-width: 1.5;
  vector-effect: non-scaling-stroke; cursor: pointer;
  opacity: 0; animation: cg-cg-fade .3s var(--ease) .9s forwards;
}
.cg-cg-series-dot[data-current="true"] { fill: var(--brand); cursor: default; }
@keyframes cg-cg-fade { to { opacity: 1; } }

/* ---------- Mixes ---------- */
.cg-cg-mixes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.cg-cg-mix-hint {
  margin: 6px 0 12px; font-size: 10.5px; color: var(--fg-4); line-height: 1.4;
}
.cg-cg-mix-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cg-cg-mix-row {
  display: grid; grid-template-columns: 1fr 96px 44px;
  align-items: center; gap: 10px;
  animation: cg-cg-rise .42s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.cg-cg-mix-label {
  font-size: 12px; color: var(--fg-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cg-cg-mix-bar {
  display: block; height: 6px; border-radius: var(--r-xs);
  background: var(--line); overflow: hidden;
}
.cg-cg-mix-fill {
  display: block; height: 100%; width: var(--w, 0%);
  background: var(--brand);
  animation: cg-cg-grow .6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms + 80ms);
}
.cg-cg-mix-fill[data-empty="true"] { background: var(--line-2); }
@keyframes cg-cg-grow { from { width: 0; } to { width: var(--w, 0%); } }
.cg-cg-mix-n { font-size: 11px; color: var(--fg-3); text-align: right; }

/* ---------- Roster ---------- */
.cg-cg-roster-card { overflow: hidden; }
.cg-cg-roster-card .cg-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; border-bottom: 1px solid var(--line);
}
.cg-cg-roster { list-style: none; margin: 0; padding: 0; }
.cg-cg-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 18px; border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .14s var(--ease);
  animation: cg-cg-rise .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}
.cg-cg-row:last-child { border-bottom: 0; }
.cg-cg-row:hover, .cg-cg-row:focus-visible { background: var(--bg-hover); }
.cg-cg-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.cg-cg-avatar { width: 30px; height: 30px; font-size: 11px; flex: none; }
.cg-cg-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.cg-cg-row-name {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--fg);
}
.cg-cg-row-sub { font-size: 10.5px; color: var(--fg-4); }
.cg-cg-row-abstracts { font-size: 10.5px; color: var(--fg-3); flex: none; }
.cg-cg-row-none { padding: 18px; font-size: 12px; color: var(--fg-4); }

.cg-cg-pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; border-top: 1px solid var(--line);
}
.cg-cg-pager-btns { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; }

@media (max-width: 760px) {
  .cg-cg-lane-label { width: 130px; }
  .cg-cg-row-abstracts { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cg-cg-count, .cg-cg-lane, .cg-cg-row, .cg-cg-mix-row, .cg-cg-mix-fill {
    animation: none;
  }
  .cg-cg-mix-fill { width: var(--w, 0%); }
  .cg-cg-series-line { animation: none; stroke-dashoffset: 0; }
  .cg-cg-series-dot { animation: none; opacity: 1; }
  .cg-cg-dot, .cg-cg-dot-year { transition: none; }
}
