/* Teaching: next (the closing band). Owned by the "next" section agent, teaching-100x, 2026-09-28.
   "Sit in on one of my lectures" drawn literally: a teaching hall seen from above, rows of seats
   fanned around a stage. Every seat is one real recording (lectures, panels, case discussions from
   videos.json), the newest in the front row. Pointing at a seat seats you there: a sight line runs to
   the stage and the stage plate shows that recording. Seats holding the same lecture on other dates
   light up with it. Scoped under .tnext-*; the shared .next / .next__inner / .next h2 /
   .next__actions rules in site.css stay. */

.next[data-tnext] {
  --tn-travel: cubic-bezier(0.28, 0.11, 0.32, 1);
  --tn-settle: cubic-bezier(0.32, 0.72, 0, 1);
}
.next__inner:has(.tnext-hall:not([hidden])) { align-items: center; }

.tnext-lead { flex: 1 1 20rem; max-width: 27rem; display: grid; gap: 1.1rem; }
.tnext-lead .next__actions { margin-top: 0.35rem; align-items: center; gap: 0.6rem 1.4rem; }
.tnext-say { margin: 0; max-width: 34ch; font-size: 1.02rem; line-height: 1.45; color: var(--ink-2); }

.tnext-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--label);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-2);
  text-decoration: none;
  padding-block: 0.6rem;
  transition: color 0.2s;
}
.tnext-more svg { transition: translate 0.3s var(--tn-travel); }
.tnext-more:hover, .tnext-more:focus-visible { color: var(--accent); }
.tnext-more:hover svg, .tnext-more:focus-visible svg { translate: 3px 0; }

/* The hall */
.tnext-hall { flex: 1 1 26rem; max-width: 36rem; width: 100%; display: grid; justify-items: center; }
.tnext-seats {
  width: 100%;
  border-radius: 18px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.tnext-seats:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.tnext-svg { display: block; width: 100%; height: auto; overflow: visible; }

.tnext-floor { fill: var(--paper); stroke: var(--line); stroke-width: 1; }

.tnext-seat__in {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  opacity: 0;
  transition: transform 0.4s var(--tn-settle), opacity 0.5s var(--tn-travel);
}
.tnext-svg.is-in .tnext-seat__in { opacity: 1; }
.tnext-seat__pad { fill: rgba(10, 13, 18, 0.2); transition: fill 0.3s var(--tn-travel); }
.tnext-seat__back { fill: rgba(10, 13, 18, 0.34); transition: fill 0.3s var(--tn-travel); }
.tnext-seat.is-kin .tnext-seat__pad { fill: var(--lightbox-deep); }
.tnext-seat.is-kin .tnext-seat__back { fill: var(--accent); }
.tnext-seat.is-pick .tnext-seat__pad { fill: var(--accent); }
.tnext-seat.is-pick .tnext-seat__back { fill: var(--accent-deep); }

.tnext-sight {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 0.1 5;
  opacity: 0.75;
}
.tnext-year {
  font-family: var(--display);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums tabular-nums;
  fill: var(--ink);
}

/* The stage: the recording you are sitting in on */
.tnext-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 27rem);
  margin-top: -0.2rem;
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.6rem;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-1);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.4s var(--tn-travel), translate 0.45s var(--tn-settle);
}
.tnext-stage:hover, .tnext-stage:focus-visible { box-shadow: var(--shadow-2); translate: 0 -2px; }
.tnext-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.tnext-stage__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 11px;
  overflow: hidden;
  background: var(--lightbox);
}
.tnext-stage__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  filter: blur(6px);
  transform: scale(1.06);
  transition: opacity 0.45s var(--tn-travel), filter 0.5s var(--tn-travel), transform 0.7s var(--tn-settle);
}
.tnext-stage__img.is-on { opacity: 1; filter: none; transform: none; }
.tnext-stage:hover .tnext-stage__img.is-on, .tnext-stage:focus-visible .tnext-stage__img.is-on { transform: scale(1.05); }

.tnext-stage__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  display: grid;
  place-items: center;
  transition: transform 0.4s var(--tn-settle);
}
.tnext-stage__play::after { content: ''; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--ink); margin-left: 2px; }
.tnext-stage:hover .tnext-stage__play, .tnext-stage:focus-visible .tnext-stage__play { transform: scale(1.12); }

.tnext-stage__body { min-width: 0; display: grid; gap: 0.28rem; }
.tnext-stage__t, .tnext-stage__m, .tnext-stage__x {
  transition: opacity 0.22s var(--tn-travel), translate 0.4s var(--tn-settle), filter 0.35s var(--tn-travel);
}
.tnext-stage__t {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.04rem;
  line-height: 1.26;
  color: var(--ink);
}
.tnext-stage:hover .tnext-stage__t, .tnext-stage:focus-visible .tnext-stage__t { color: var(--accent); }
.tnext-stage__m { font-family: var(--label); font-weight: 500; font-size: 0.86rem; line-height: 1.35; color: var(--muted); transition-delay: 0.03s; }
.tnext-stage__x { font-family: var(--label); font-weight: 600; font-size: 0.86rem; line-height: 1.35; color: var(--accent); transition-delay: 0.06s; }
.tnext-stage__x:empty { display: none; }
.tnext-stage.is-swap .tnext-stage__t,
.tnext-stage.is-swap .tnext-stage__m,
.tnext-stage.is-swap .tnext-stage__x { opacity: 0; translate: 0 5px; filter: blur(3px); transition-delay: 0s; }

@media (max-width: 960px) {
  .tnext-lead, .tnext-hall { max-width: none; }
  .tnext-hall { max-width: 34rem; justify-self: center; margin-inline: auto; }
}
@media (max-width: 600px) {
  .tnext-stage { grid-template-columns: 7rem minmax(0, 1fr); gap: 0.8rem; padding: 0.5rem; }
  .tnext-stage__t { font-size: 0.96rem; -webkit-line-clamp: 3; }
  .tnext-stage__m, .tnext-stage__x { font-size: 0.82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tnext-seat__in, .tnext-seat__pad, .tnext-seat__back, .tnext-stage, .tnext-stage__img,
  .tnext-stage__play, .tnext-stage__t, .tnext-stage__m, .tnext-stage__x, .tnext-more svg { transition: none !important; }
  .tnext-seat__in { opacity: 1; }
}
