/* Live now: the "Live · 7" control in the header and the panel it opens
   (live.js). After the app's Live now page, dark. The panel follows the demo
   modal (demo.css): a native <dialog> opened with showModal(), the same
   sheet, backdrop, close button, motion and scroll lock, so the two read as
   one system.

   Contrast: "Live" white; the separator and count ink-400 (7.9:1 on ink-950).
   The LIVE tag is a white label on signal-600 (5.45:1). The caption is
   ink-100 on a 78% ink-950 band. The dot is signal-500, never a label. */

/* --- the control ------------------------------------------------------- */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-button);
  font: 500 16px/1 var(--font-sans);
  color: var(--white);
  background: none;
  white-space: nowrap;
  text-underline-offset: 6px;
  cursor: pointer;
}
.live-pill[hidden] { display: none; }
.live-pill:hover .live-word { text-decoration: underline; text-decoration-thickness: 1px; }
.live-sep,
.live-n { color: var(--ink-400); font-variant-numeric: tabular-nums; }
.live-sep { margin: 0 -4px 0 -2px; }

.live-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--signal-500);
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: var(--signal-500);
  animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}

/* The phone menu's row: the same control at the menu's size. */
.m-live .live-pill {
  justify-content: flex-start;
  gap: 10px;
  min-height: 60px;
  padding: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.m-live .live-dot { width: 10px; height: 10px; }

@media (max-width: 1119px) {
  .nav-end .live-pill { padding: 0 8px; font-size: 15px; }
}
/* Too narrow for the control beside "Book a demo": it moves into the menu. */
@media (max-width: 479px) {
  .nav-end .live-pill { display: none; }
}
@media (min-width: 480px) {
  .m-live { display: none; }
}

/* --- the panel ---------------------------------------------------------
   Nearly the whole window (Michael, December 3, 2026): inset 16 to 24px
   from every edge, on desktop and phone. The title on top, the closing bar
   at the foot, and the sittings in the stage between, sized by live.js
   (`fit`) so the pictures are as large as the stage allows. */
.live {
  --live-pad: clamp(16px, 2.4vw, 32px);
  --live-inset: clamp(16px, 1.8vw, 24px);
  width: calc(100dvw - 2 * var(--live-inset));
  height: calc(100dvh - 2 * var(--live-inset));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
  color: var(--ink-100);
  background-color: var(--ink-900);
  color-scheme: dark;
  font-family: var(--font-sans);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 150ms ease-in, transform 150ms ease-in, display 150ms allow-discrete, overlay 150ms allow-discrete;
}
.live[open] {
  display: flex;
  opacity: 1;
  transform: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), display 180ms allow-discrete, overlay 180ms allow-discrete;
}
@starting-style { .live[open] { opacity: 0; transform: translateY(8px); } }
.live::backdrop {
  background-color: rgba(13, 13, 13, 0.8);
  opacity: 0;
  transition: opacity 150ms ease-in, display 150ms allow-discrete, overlay 150ms allow-discrete;
}
.live[open]::backdrop { opacity: 1; }
@starting-style { .live[open]::backdrop { opacity: 0; } }

html.live-open { overflow: hidden; scrollbar-gutter: stable; }

.live-sheet {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.live-title {
  flex: none;
  margin: 0;
  padding: 22px calc(var(--live-pad) + 48px) 0 var(--live-pad);
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--white);
}
.live .live-title:focus-visible { outline: none; }

.live-stage {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 20px var(--live-pad) 0;
  overflow: hidden;
  overscroll-behavior: contain;
}
.live-stage.is-scrolling { align-items: flex-start; overflow-y: auto; }

/* Columns and tile width come from live.js (--cols, --tile). */
.live-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), var(--tile, minmax(0, 1fr)));
  justify-content: center;
  align-content: center;
  gap: 20px;
}
.live-stage.is-scrolling .live-grid { width: 100%; padding-bottom: 4px; }
.live-grid[hidden] { display: none; }

/* --- a session --------------------------------------------------------- */
.live-card {
  display: block;
  width: var(--tile, 100%);
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  cursor: pointer;
}
.live-card:focus-visible { outline: 2px solid var(--signal-500); outline-offset: 4px; }
.live-still {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--ink-800);
  background-image: var(--spotlight-teal);
}
.live-still::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--ink-700);
  pointer-events: none;
  transition: box-shadow 150ms ease;
}
.live-card:hover .live-still::after { box-shadow: inset 0 0 0 1px var(--ink-400); }
.live-still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.live-place {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 16px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-400);
  text-align: center;
}
/* The picture covers the placeholder only once it is moving, so a stream
   that is slow or fails leaves the placeholder in view. */
.live-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #000;
  opacity: 0;
  transition: opacity 200ms ease;
}
.live-still.is-playing .live-video { opacity: 1; }
/* Reduced motion: nothing plays by itself; the mark says it can. */
.live-play { display: none; }
@media (prefers-reduced-motion: reduce) {
  .live-grid .live-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 48px;
    height: 48px;
    margin: -36px 0 0 -24px;
    border-radius: 50%;
    background-color: rgba(13, 13, 13, 0.72);
  }
  .live-grid .live-still:has(.live-play) .live-place { padding: 64px 16px 0; }
  .live-grid .live-play::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 19px;
    border-style: solid;
    border-width: 9px 0 9px 14px;
    border-color: transparent transparent transparent var(--white);
  }
}
.live-tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.live-tag,
.live-time {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  color: var(--white);
}
.live-tag {
  gap: 5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background-color: var(--signal-600);
}
.live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background-color: var(--white); }
.live-time {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  background-color: rgba(13, 13, 13, 0.72);
}
.live-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 7px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-100);
  background-color: rgba(13, 13, 13, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The name and the place: one line each, 52px together (LABEL in live.js). */
.live-name {
  display: block;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-where {
  display: block;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- one sitting, large ------------------------------------------------ */
.live-big {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.live-big[hidden] { display: none; }
.live-big-head {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px 20px;
  margin-bottom: 14px;
}
.live-back {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px 0 8px;
  border: var(--hairline);
  border-radius: var(--radius-button);
  font: 500 15px/1 var(--font-sans);
  color: var(--ink-100);
  background: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.live-back:hover { background-color: var(--ink-800); border-color: var(--ink-600); }
.live-back:focus-visible { outline: 2px solid var(--signal-500); outline-offset: 2px; }
.live-back svg { width: 20px; height: 20px; display: block; }
.live-big-label { min-width: 0; }
.live-big-name {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-big-where { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-400); }
.live-big-frame {
  display: grid;
  flex: 1;
  min-height: 0;
  place-items: center;
}
.live-big-still { width: 100%; }
/* Large, the player shows at once: its own controls are the play control. */
.live-big-still .live-video { object-fit: contain; opacity: 1; }
.live-big-still .live-place { font-size: 20px; }
/* Above the player's own controls, as broadcast captions sit. */
.live-big-still .live-cap {
  left: 50%;
  right: auto;
  bottom: 64px;
  max-width: min(760px, calc(100% - 32px));
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 16px;
  white-space: normal;
  transform: translateX(-50%);
}

.live-empty { margin: 0; padding: 12px 0 40px; font-size: 17px; color: var(--ink-200); }
.live-empty[hidden],
.live-foot[hidden] { display: none; }
/* The closing bar (Michael, December 3, 2026): what the visitor is looking
   at, and the one action. A raised band with a hairline, the live dot
   pulsing beside the line, Book a demo on the right; it stacks on phones.
   ink-100 on ink-800 is 15.2:1. */
.live-foot {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 20px var(--live-pad) var(--live-pad);
  padding: 14px 16px 14px 20px;
  border: var(--hairline);
  border-radius: var(--radius-md, 10px);
  background-color: var(--ink-800);
}
.live-foot-text {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink-100);
}
.live-foot-text .live-dot { margin-top: 0.5em; } /* level with the first line */
.live-foot-cta { flex: none; border: 0; cursor: pointer; }
.live-foot-cta:focus-visible { outline: 2px solid var(--signal-500); outline-offset: 2px; }

/* --- phone ------------------------------------------------------------- */
@media (max-width: 599px) {
  .live-title { padding-top: 18px; font-size: 24px; }
  .live-stage { padding-top: 16px; }
  .live-grid { gap: 16px; }
  .live-big-head { flex-direction: column; align-items: flex-start; }
  .live-big-frame { align-items: start; }
  /* Too small a picture for a floating caption: the tiles' band instead. */
  .live-big-still .live-cap { left: 0; right: 0; bottom: 0; max-width: none; padding: 7px 12px; border-radius: 0; font-size: 14px; white-space: nowrap; transform: none; }
  .live-foot { flex-direction: column; align-items: stretch; margin-top: 16px; margin-bottom: calc(var(--live-pad) + env(safe-area-inset-bottom)); padding: 14px; }
  .live-foot-text { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot::after { animation: none; opacity: 0; }
  .live, .live[open], .live::backdrop, .live[open]::backdrop { transition: none; transform: none; }
  .live-video { transition: none; }
}
