/* The Switchboard tour: the guide panel, the welcome card and the step spotlight.
   Colours and sizes come from the page's own tokens (--surface, --line, --jev, --brand ...). */

/* While the tour plays, the guide replaces the "read-only" note. */
.guide { display: none; }
.tour-live .guide { display: block; }
/* The subtitle bar floats over the bottom of the page, centred. The graph's dotted grid and the chat's
   background both run all the way down underneath it, so there is no seam; only their content
   (the graph, the thread) stops above it. --guide-space is the bar's height plus its margins, set by
   tour.js, so everything stays clear of it at any size. The dark-mode toggle stays in the bottom-left
   corner of the grid, beside the bar. */
:root { --guide-space: 0px; }
.tour-live .composer { display: none; }
.guide { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(900px, calc(100% - 220px)); margin: 0; z-index: 60; }
.tour-live .graph-scroll { inset: 0 0 var(--guide-space) 0; }
.tour-live .thread { padding-bottom: calc(var(--guide-space) + 6px); }
.tour-live .zoom { bottom: calc(var(--guide-space) + 12px); }

.guide {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: calc(18px * var(--u));
  padding: 10px 14px 9px;
  box-shadow: 0 calc(10px * var(--u)) calc(30px * var(--u)) calc(-18px * var(--u)) color-mix(in srgb, var(--text) 30%, transparent);
}
.g-top { display: flex; align-items: baseline; gap: 10px; font: 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.g-title { color: var(--jev); }
.g-note { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--hitl); }
.g-say {
  /* One size for every step, following the window width (not the page's --u, which changes at
     several breakpoints and made the text jump). The box holds three lines, the longest caption,
     so the panel keeps the same height from step to step. */
  margin: 4px 0 8px; font-size: clamp(12.5px, 0.35vw + 8px, 14.5px); line-height: 1.5; color: var(--text);
  min-height: 4.5em; text-wrap: pretty;
  display: flex; align-items: center;   /* a short caption sits in the middle of the box */
}
@media (max-width: 1320px) { .g-say { min-height: 6em; } }   /* a narrow pane wraps the longest caption to four lines */

.g-bar { display: flex; align-items: center; gap: calc(14px * var(--u)); }
.g-ticks { flex: 1; display: flex; gap: 3px; margin: 0; padding: 0; list-style: none; }
.g-ticks li { flex: 1; height: 3px; border-radius: 3px; background: var(--line-strong); cursor: pointer; transition: background .2s, transform .15s; }
.g-ticks li:hover { transform: scaleY(1.6); }
.g-ticks li.done { background: color-mix(in srgb, var(--jev) 55%, var(--surface)); }
.g-ticks li.now { background: var(--jev); }

.g-btns { display: flex; align-items: center; gap: calc(6px * var(--u)); }
.g-btns button {
  width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); transition: color .15s, border-color .15s, background .15s;
}
.g-btns button:hover { color: var(--jev); border-color: color-mix(in srgb, var(--jev) 40%, var(--surface)); background: var(--jev-s); }
.g-btns button:focus-visible { outline: 2px solid var(--jev); outline-offset: 2px; }
.g-btns svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-btns .g-main { width: 32px; height: 32px; border: 0; background: var(--brand); color: var(--on-brand); }
.g-btns .g-main:hover { background: var(--brand); color: var(--on-brand); opacity: .9; }
#g-play .i-play { fill: currentColor; stroke: none; }
#g-play .i-pause, #g-play .i-replay { display: none; }
#g-play[data-state="pause"] .i-play, #g-play[data-state="replay"] .i-play { display: none; }
#g-play[data-state="pause"] .i-pause { display: block; }
#g-play[data-state="replay"] .i-replay { display: block; }
#g-mute .i-off { display: none; }
#g-mute[data-on="0"] .i-on { display: none; }
#g-mute[data-on="0"] .i-off { display: block; }
.guide.g-done { border-color: color-mix(in srgb, var(--jev) 45%, var(--line-strong)); }

/* The highlight: one thin ring, a faint tint, no dimming and no glow. It is a plain element laid
   over the page, so every browser draws it the same way. */
.tour-ring {
  position: fixed; z-index: 41; pointer-events: none; border-radius: 14px;
  border: 2px solid var(--jev); background: color-mix(in srgb, var(--jev) 7%, transparent);
}
.tour-ring[hidden] { display: none; }

/* The card the page opens on. */
.welcome { margin: 8vh auto 0; max-width: 34em; padding: 0 calc(20px * var(--u)); text-align: center; }
.welcome .w-mark svg { width: calc(52px * var(--u)); height: calc(52px * var(--u)); color: var(--text); overflow: visible; }
.welcome h1 { margin: calc(14px * var(--u)) 0 calc(8px * var(--u)); font: 700 max(26px, calc(40px * var(--u)))/1.1 var(--sans); letter-spacing: -.03em; }
.welcome .w-line { margin: 0 0 calc(10px * var(--u)); font-size: max(14px, calc(17px * var(--u))); color: var(--text); line-height: 1.45; }
.welcome .w-sub { margin: 0 0 calc(22px * var(--u)); font-size: max(12px, calc(14px * var(--u))); color: var(--muted); line-height: 1.55; }
.welcome .w-start {
  font: inherit; font-weight: 600; font-size: max(13px, calc(15px * var(--u))); cursor: pointer; border: 0;
  padding: calc(12px * var(--u)) calc(26px * var(--u)); border-radius: calc(14px * var(--u)); background: var(--brand); color: var(--on-brand); transition: opacity .15s, scale .1s;
}
.welcome .w-start:hover { opacity: .9; scale: 1.03; }
.welcome .w-start:focus-visible { outline: 2px solid var(--jev); outline-offset: 3px; }
.welcome .w-meta { margin: calc(12px * var(--u)) 0 0; font: max(10px, calc(12px * var(--u))) var(--mono); color: var(--subtle); }
.welcome .w-cuts { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(12px * var(--u)); }
.welcome .w-start small { display: block; margin-top: 2px; font-weight: 400; font-size: .78em; opacity: .75; }
.welcome .w-start.alt { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.welcome .w-start.alt:hover { border-color: var(--jev); color: var(--jev); opacity: 1; }
.welcome .w-start.playing { cursor: default; }

@media (max-width: 900px) {
  .guide { width: calc(100% - 24px); }
  .tour-live #theme { bottom: calc(var(--guide-space) + 12px); }
  .g-say { font-size: 13px; min-height: 6em; }
  .g-bar { flex-wrap: wrap; row-gap: 8px; }
  .g-ticks { flex: 1 1 100%; order: 2; }
  .g-btns { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .g-ticks li, .welcome .w-start { transition: none; } }
