/* Canonical tour player — STYLES (shared at runtime by every tour: tours/shared/tour-core.css).
   Single-flow (linear) by default; a manifest with `sections` switches on the hub rail. The
   coachmark, spotlight, hotspot, and beacon are identical in both modes — there is one player. */
@import url("https://fonts.googleapis.com/css2?family=Mulish:wght@400;600;700&display=swap");
:root {
  --accent: #533fd1;          /* DataHub product violet */
  --ink: #374066;             /* product text slate */
  --card-bg: rgba(255, 255, 255, 0.97);
  --card-text: #374066;
  --card-muted: #81879f;
  --card-border: #e9eaee;
  --rail-w: 360px;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; background: #002131; overflow: hidden;
  font-family: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { display: flex; }

/* ---------- hub rail (present only when the manifest has `sections`) ---------- */
#rail { width: var(--rail-w); min-width: var(--rail-w); height: 100%; overflow-y: auto;
  padding: 30px 26px; background: #fff; border-right: 1px solid var(--card-border); z-index: 5; }
#rail .logo { height: 24px; display: block; margin-bottom: 20px; }
#rail .kicker { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px; }
#rail h1 { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.2; margin-bottom: 10px; }
#rail .tagline { font-size: 13px; line-height: 1.55; color: var(--card-muted); margin-bottom: 24px; }
.sect-btn { display: block; width: 100%; text-align: left; font: inherit; color: inherit;
  background: #fff; border: 1px solid var(--card-border); border-radius: 12px; padding: 14px 16px;
  margin-bottom: 10px; cursor: pointer; transition: border-color .12s, background .12s, transform .12s; }
.sect-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.sect-btn.on { border-color: var(--accent); background: #f4f2fd; }
.sect-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sect-btn .row { display: flex; align-items: center; gap: 10px; }
.sect-btn .name { flex: 1; font-size: 16px; font-weight: 700; color: var(--ink); }
.sect-btn.done .name { color: var(--accent); }
.sect-btn .blurb { font-size: 12.5px; line-height: 1.5; color: var(--card-muted); margin-top: 6px; }
.sect-btn .check { color: var(--accent); font-size: 14px; display: none; }
.sect-btn.done .check { display: block; }

/* ---------- stage ---------- */
#stage-host { position: relative; flex: 1; height: 100%; }
#stage-wrap { position: absolute; inset: 0; display: grid; place-items: center; }
#stage { position: relative; transform-origin: top left; background: #fff;
  border-radius: 10px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
#content { position: absolute; inset: 0; transform-origin: 0 0; transition: transform .4s ease; }
#stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  opacity: 0; transition: opacity .28s ease; pointer-events: none; }
#stage iframe.active { opacity: 1; pointer-events: auto; }

/* boot / author-error notice */
#stage-note { position: absolute; inset: 0; display: none; place-items: center; text-align: center;
  padding: 40px; color: #cfe3ea; font-size: 14px; line-height: 1.6; z-index: 50; }
#stage-note.on { display: grid; }
#stage-note code { font-family: ui-monospace, Menlo, monospace; color: #ff9f8c; }

/* spotlight: darken everything but the cutout; never blocks the mouse */
#spot { position: absolute; border-radius: 8px; pointer-events: none; opacity: 0;
  transition: all .35s ease; box-shadow: 0 0 0 9999px rgba(0, 22, 33, 0.5); }
#spot.on { opacity: 1; }

/* advance hotspot: a pulsing ring the viewer clicks */
#hot { position: absolute; border: 2.5px solid var(--accent); border-radius: 8px;
  cursor: pointer; opacity: 0; background: rgba(83, 63, 209, 0.08); }
#hot.on { animation: ringin .3s ease-out 2.5s both, pulse 1.6s ease-out 2.8s infinite; }
@keyframes ringin { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(83, 63, 209, .45); }
  70%  { box-shadow: 0 0 0 14px rgba(83, 63, 209, 0); }
  100% { box-shadow: 0 0 0 0 rgba(83, 63, 209, 0); }
}

/* interaction beacon: a pulsing dot ("do something here" / "look here") */
#beacon { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  background: var(--accent); opacity: 0; pointer-events: none; z-index: 12;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
#beacon.on { opacity: 1; animation: beacon 1.5s ease-out infinite; }
@keyframes beacon {
  0%   { box-shadow: 0 0 0 0 rgba(83, 63, 209, .5), 0 2px 12px rgba(0, 0, 0, .35); }
  70%  { box-shadow: 0 0 0 34px rgba(83, 63, 209, 0), 0 2px 12px rgba(0, 0, 0, .35); }
  100% { box-shadow: 0 0 0 0 rgba(83, 63, 209, 0), 0 2px 12px rgba(0, 0, 0, .35); }
}

/* ---------- caption card (the one coachmark, both modes) ---------- */
#card { position: fixed; left: 28px; bottom: 28px; max-width: 560px; z-index: 30;
  display: flex; flex-direction: column; max-height: min(78vh, 560px);
  background: var(--card-bg); color: var(--card-text); border-radius: 14px;
  padding: 18px 20px 14px; backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(23, 20, 60, .28); border: 1px solid var(--card-border); }
#card .step { font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px; font-weight: 700; flex: 0 0 auto; }
#card .title { font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 6px;
  color: var(--ink); flex: 0 0 auto; display: none; }
#card .title.on { display: block; }
#card .text { font-size: 14.5px; line-height: 1.55; overflow-y: auto; flex: 1 1 auto; }
#card .nav { display: flex; gap: 8px; margin-top: 14px; align-items: center; flex-wrap: wrap; row-gap: 8px; flex: 0 0 auto; }
#card button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px;
  border-radius: 8px; border: 1px solid var(--card-border); background: #fff;
  color: var(--card-muted); cursor: pointer; white-space: nowrap; }
#card button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
#card button:disabled { opacity: .35; cursor: default; }
#card button:focus-visible, #card a.fin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#card a.fin { display: none; text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--card-border);
  color: var(--ink); background: #fff; white-space: nowrap; }
#card a.fin.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
#card a.fin.on { display: inline-block; }
#card .count { font-size: 11px; color: var(--card-muted); width: 100%; margin-top: 2px; }
#dots { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; max-width: 180px; justify-content: flex-end; row-gap: 4px; }
#dots i { width: 7px; height: 7px; border-radius: 50%; background: #d8d5ef; }
#dots i.on { background: var(--accent); }

/* form gate — optional, from manifest.gate */
#gate { position: fixed; inset: 0; z-index: 40; display: none; place-items: center;
  background: rgba(0, 22, 33, 0.7); backdrop-filter: blur(6px); }
#gate.on { display: grid; }
#gate .panel { width: min(420px, calc(100vw - 48px)); background: #fff;
  color: var(--ink); border-radius: 16px; padding: 26px 26px 22px;
  border: 1px solid var(--card-border); box-shadow: 0 18px 60px rgba(23,20,60,.35); }
#gate h2 { font-size: 19px; margin-bottom: 8px; }
#gate p { font-size: 13.5px; line-height: 1.5; color: var(--card-muted); margin-bottom: 16px; }
#gate input { width: 100%; font: inherit; font-size: 14px; padding: 10px 12px;
  border-radius: 9px; border: 1px solid #d0d2dd; background: #fff;
  color: var(--ink); outline: none; margin-bottom: 10px; }
#gate input:focus { border-color: var(--accent); }
#gate .names { display: flex; gap: 10px; }
#gate .names input { flex: 1; width: auto; min-width: 0; }
#gate button { width: 100%; font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 14px; border-radius: 9px; border: 0; background: var(--accent);
  color: #fff; cursor: pointer; }
#gate .err { color: #d23500; font-size: 12.5px; min-height: 16px; margin-top: 8px; }
#gate .fine { color: #b2aea7; font-size: 11.5px; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  #hot.on { animation: none; opacity: 1; }
  #beacon.on { animation: none; opacity: 1; box-shadow: 0 0 0 8px rgba(83, 63, 209, .3), 0 2px 12px rgba(0, 0, 0, .35); }
  #stage iframe, #spot, #content { transition: none; }
}

/* desktop-only notice */
#desktop-only { position: fixed; inset: 0; z-index: 60; display: none;
  flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(900px 600px at 50% 32%, #16294f 0%, #0b1226 58%, #002131 100%);
  padding: 32px; }
#desktop-only.on { display: flex; }
#desktop-only .glyph { font-size: 44px; margin-bottom: 20px; line-height: 1; }
#desktop-only .kicker { color: #3CBBEB; font-weight: 700; font-size: 12px; letter-spacing: 3px;
  text-transform: uppercase; margin-bottom: 14px; }
#desktop-only h2 { color: #fff; font-size: 23px; font-weight: 700; margin: 0 0 12px; line-height: 1.25; max-width: 420px; }
#desktop-only p { color: #9fb2d6; font-size: 15px; line-height: 1.55; margin: 0; max-width: 360px; }
