/* MMU encore replay room. Brand tokens from the MMU checkout build; layout and components from the
   Praxis on-demand replay page template (header bar, title block, video stage + tabbed side panel).
   Orange is for calls to action only. Mobile first; desktop from 1024px (DESKTOP_MIN in src/replay-ui.js). */
:root {
  --navy: #0e1822;
  --navy-2: #172636;
  --ink: #14202b;
  --body: #4b5866;
  --cream: #efeee9;
  --card: #f7f6f3;
  --paper: #ffffff;
  --line: #d8d6ce;
  --orange: #fd7c1f;
  --orange-hi: #ff9142;
  --sky: #63b3ed;
  --steel: #7fa9cc;
  --label: #6b7684;
  --navyline: #22344a;
  --accent: #1b4b73;
  --accent-soft: #dfe9f2;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -24px rgba(14, 24, 34, 0.55);
  --shadow-soft: 0 10px 30px -22px rgba(14, 24, 34, 0.45);
  --gutter: 16px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  padding-bottom: var(--bar-actual, 76px);
  overflow-x: hidden;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
}
.skip:focus {
  left: 8px;
  top: 8px;
}
.fatal {
  padding: 48px var(--gutter);
}

/* ---------- header bar + notice ---------- */
.site-header {
  background: var(--navy);
  color: #fbfaf7;
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--navyline);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.2;
  min-width: 0;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  color: #fff;
}
.brand-room {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}
.header-link {
  font-size: 14px;
  color: #cbd5e0;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.header-link:hover {
  color: #fff;
  text-decoration: underline;
}
.btn.header-cta {
  display: none;
}
.notice {
  background: #e4e2db;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--body);
}
.notice-inner {
  display: block;
  padding-top: 9px;
  padding-bottom: 9px;
}

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 13px/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn-primary {
  background: var(--orange);
  color: var(--navy);
}
.btn-primary:hover {
  background: var(--orange-hi);
}
.btn-secondary {
  background: var(--navy);
  color: #fbfaf7;
}
.btn-secondary:hover {
  background: var(--navy-2);
}
.btn.is-unset {
  flex-direction: column;
  gap: 2px;
  background: transparent;
  color: var(--body);
  border: 1px dashed var(--label);
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  cursor: not-allowed;
}
.unset-note {
  font: 500 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0;
  text-transform: none;
  color: var(--label);
}
.chip {
  display: inline-flex;
  align-items: center;
  font: 600 12px/1 var(--sans);
  padding: 6px 10px;
  border-radius: 999px;
  background: #e4e2db;
  color: var(--ink);
  white-space: nowrap;
}
.chip--done {
  background: var(--accent-soft);
  color: var(--accent);
}
.chip--resume,
.chip--entry {
  background: var(--navy);
  color: #fbfaf7;
}
.chip--locked {
  background: #e4e2db;
  color: var(--body);
}
.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font: 600 12px/1.3 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow .chip {
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- title block (eyebrow, H1 with accent, meta, chat toggle) ---------- */
.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 0 20px;
}
.head-text {
  min-width: 0;
  max-width: 820px;
}
.accent {
  font-style: italic;
  color: var(--accent);
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  color: var(--body);
  font-size: 14px;
}
.chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}
.chat-toggle:hover {
  border-color: var(--ink);
}
.chat-toggle[aria-expanded="false"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.chat-toggle-icon {
  width: 16px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 5px 5px 5px 1px;
}
.unread {
  font: 600 11px/1 var(--sans);
  font-style: normal;
  letter-spacing: 0;
  background: var(--sky);
  color: var(--navy);
  border-radius: 99px;
  padding: 3px 7px;
}

/* ---------- cards ---------- */
.card-row {
  display: grid;
  gap: 16px;
  margin: 28px 0 40px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.card-text {
  color: var(--body);
  max-width: 60ch;
}
.card--vip {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: var(--shadow);
}
.card--vip .eyebrow {
  color: var(--steel);
}
.card--vip .card-text {
  color: #e8ecf1;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
}
.card--vip .btn-secondary {
  background: var(--orange);
  color: var(--navy);
}
.card--vip .btn-secondary:hover {
  background: var(--orange-hi);
}
.card--vip .btn.is-unset {
  color: #cbd5e0;
}

/* ---------- hub ---------- */
.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.hero-sub {
  display: block;
  font-weight: 400;
  margin-top: 6px;
}
.lede {
  margin-top: 18px;
  font-size: 17px;
  color: var(--body);
  max-width: 64ch;
}
.sessions {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.session {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.session--entry {
  border: 2px solid var(--navy);
  box-shadow: var(--shadow);
}
.session--locked {
  background: var(--card);
  box-shadow: none;
}
.session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.session-title {
  font-size: 26px;
}
.session-title a {
  text-decoration: none;
}
.session-title a:hover {
  text-decoration: underline;
}
.session-blurb {
  color: var(--body);
}
.session-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.session-when {
  font-size: 13px;
  color: var(--label);
}
.session-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: auto;
  padding-top: 4px;
}
.cal-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-underline-offset: 3px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.countdown {
  font-family: var(--serif);
  font-size: 20px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.countdown-label {
  font: 600 12px var(--sans);
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.countdown-value {
  font-variant-numeric: tabular-nums;
}

/* ---------- day page: two columns (stage + side panel) ---------- */
.day-title {
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.12;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.left {
  min-width: 0;
}
.stage {
  --pos: 0%;
  --reach: 0%;
  min-width: 0;
}
.player-box {
  position: relative;
}
.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.player-placeholder {
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--steel);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 12px;
  color: #cbd5e0;
}
.ph-title {
  font: 600 13px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}
.ph-body {
  font-size: 13px;
  max-width: 44ch;
}
/* play cover over the video */
.cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 30% 20%, #2a4560, var(--navy) 72%);
}
.cover-in {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 20px;
}
.cover-play {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 0;
  background: #fbfaf7;
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.cover-play::after {
  content: "";
  position: absolute;
  left: 33px;
  top: 26px;
  border-left: 26px solid var(--navy);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
}
.cover-title {
  font: 600 clamp(20px, 3vw, 30px) / 1.2 var(--serif);
  color: #fff;
}
.cover-alt {
  min-height: 40px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font: 600 13px var(--sans);
}
.cover-alt:hover {
  border-color: #fff;
}
.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 2px 0;
}
.ctl-play {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.ctl-icon {
  width: 0;
  height: 0;
  border-left: 13px solid currentColor;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}
.ctl-play.is-playing .ctl-icon {
  width: 12px;
  height: 14px;
  border: 0;
  margin: 0;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}
.scrub-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.ctl-time {
  flex: none;
  font: 500 13px var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--body);
}
/* own scrubber: played / reachable / locked */
.scrubber {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.scrubber::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--accent) 0 var(--pos),
    var(--steel) var(--pos) var(--reach),
    var(--line) var(--reach) 100%
  );
}
.scrubber::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--accent) 0 var(--pos),
    var(--steel) var(--pos) var(--reach),
    var(--line) var(--reach) 100%
  );
}
.scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--navy);
}
.scrubber::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid #fff;
}
.lock-note {
  font-size: 13px;
  color: var(--body);
  min-height: 1.4em;
  opacity: 0;
}
.lock-note.is-on {
  opacity: 1;
}
.cert-slot:empty {
  display: none;
}
.cert-slot {
  margin-top: 10px;
}
.rewatch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.locked-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 640px;
}
.locked-panel .countdown {
  font-size: 30px;
}
.locked-when {
  color: var(--body);
}

/* ---------- side panel: tabs, chat replay, About ---------- */
.side {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 480px;
  min-width: 0;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.tabs button {
  flex: 1;
  min-height: 48px;
  padding: 12px 8px;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
  cursor: pointer;
}
.tabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--navy);
}
.tab-n {
  display: inline-block;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--cream);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--ink);
}
.panel {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.panel--scroll {
  overflow: auto;
  padding: 18px;
}
.chat-label {
  flex: none;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line);
  font: 500 12px/1.4 var(--sans);
  color: var(--label);
}
.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 18px;
  overscroll-behavior: contain;
}
.chat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.chat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-size: 13px;
}
.chat-name {
  font-weight: 600;
  color: var(--ink);
}
.chat-badge {
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--navy);
  color: #fff;
  border-radius: 4px;
  padding: 3px 5px;
}
.chat-time {
  color: var(--label);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chat-text {
  margin-top: 2px;
  color: var(--body);
  white-space: pre-wrap;
}
.chat-msg--host .chat-text,
.chat-msg--team .chat-text {
  background: var(--card);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
}
.chat-empty {
  position: absolute;
  inset: 44px 0 0;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  font-size: 14px;
  color: var(--label);
  pointer-events: none;
}
.jump {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  min-height: 36px;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 99px;
  padding: 8px 14px;
  font: 600 12px var(--sans);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.about-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.about-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.about-item.is-current {
  border-color: var(--navy);
  background: var(--card);
}
.about-day {
  font: 600 12px var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.about-text {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
}

/* ---------- chips used in the rewatch row ---------- */
.bar-label {
  font: 600 11px var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
}
.bar-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: 500 14px/1.2 var(--sans);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.bar-chip:hover {
  border-color: var(--ink);
}
.bar-chip--strong {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ---------- sticky bottom CTA bar (phones and tablets) ---------- */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--navy);
  border-top: 1px solid var(--navyline);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}
.bar-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-cta {
  flex: 1;
  min-width: 0;
}
.bottom-bar .btn.is-unset {
  color: #cbd5e0;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  font-size: 13px;
  color: var(--body);
}
.site-footer .wrap {
  display: grid;
  gap: 10px;
}
.site-footer p {
  max-width: 90ch;
}
.deadline {
  font-weight: 600;
  color: var(--ink);
}
.disclaimer.is-unset {
  border: 1px dashed var(--label);
  padding: 8px 10px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

/* ---------- wider screens ---------- */
@media (min-width: 720px) {
  .sessions {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-row {
    grid-template-columns: 1.4fr 1fr;
  }
  .side {
    height: 560px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 28px;
  }
  body {
    padding-bottom: 0;
  }
  .btn.header-cta {
    display: inline-flex;
  }
  .bottom-bar--mobile-only {
    display: none;
  }
  .head {
    padding: 36px 0 22px;
  }
  .hero {
    padding-top: 56px;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
  .layout.nochat {
    grid-template-columns: minmax(0, 1fr);
  }
  .side {
    position: sticky;
    top: 84px;
    height: min(640px, calc(100vh - 110px));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .chat-msg.is-new {
    animation: msg-in 0.3s ease both;
  }
  .lock-note {
    transition: opacity 200ms ease;
  }
  .btn,
  .bar-chip,
  .chat-toggle,
  .cover-alt {
    transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
  }
  .btn:hover {
    transform: translateY(-1px);
  }
  .cover-play {
    transition: transform 0.2s ease;
  }
  .cover-play:hover {
    transform: scale(1.06);
  }
}
@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
