/* The video tours drawn by javascripts/tour.js.

   The stage is a fixed 1280x720 canvas scaled to fit its box, so sizes inside .tour-stage are in video pixels, not
   page pixels. The notebook in it looks like JupyterLab, light or dark with the page, and its colours are the
   guides': AWS orange for the selected cell, near-black title cards, highlighter amber for what a caption wants noticed.
   The dark notebook's background is the dark screenshots' own (#111), so a report sits in it without a seam. */

.aa-tour { margin: 1.2em 0 1.6em; }
.aa-tour .tour-screen {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer;
  border-radius: 10px; background: #16191f; box-shadow: var(--aa-float, 0 16px 40px rgba(0, 0, 0, .2));
}
.aa-tour .tour-screen::after {
  content: "▶"; position: absolute; right: 6%; bottom: 9%; width: clamp(48px, 9%, 76px); aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center; padding-left: 6px; box-sizing: border-box;
  border-radius: 50%; background: rgba(255, 255, 255, .94); color: #16191f; font-size: 28px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.aa-tour.tour-waiting .tour-screen::after { opacity: 1; }
.aa-tour.tour-waiting .tour-screen:hover::after { transform: scale(1.06); }

.aa-tour .tour-controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.aa-tour .tour-play {
  width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--aa-accent, #c45500); color: #fff; font-size: 13px;
}
.aa-tour .tour-timeline { flex: 1; display: flex; gap: 3px; height: 8px; cursor: pointer; }
.aa-tour .tour-seg { position: relative; overflow: hidden; border-radius: 4px; background: var(--aa-line, #e4e4e1); }
.aa-tour .tour-seg i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--aa-accent, #c45500); }
.aa-tour .tour-time { font: .72rem var(--md-code-font-family, monospace); color: var(--aa-muted, #5b5f66); min-width: 7.5em; text-align: right; }
.aa-tour .tour-chapters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.aa-tour .tour-chapters button {
  border: 1px solid var(--aa-line, #e4e4e1); border-radius: 999px; padding: 3px 11px; cursor: pointer;
  background: var(--aa-surface, #fff); color: var(--aa-muted, #5b5f66); font: .68rem var(--md-text-font-family, sans-serif);
}
.aa-tour .tour-chapters button.on { border-color: var(--aa-accent, #c45500); color: var(--aa-accent, #c45500); font-weight: 600; }
.aa-tour .tour-links { margin: 8px 0 0; font-size: .72rem; color: var(--aa-muted, #5b5f66); }

.tour-stage {
  position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden;
  background: #16191f; color: #1f2430; user-select: none;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Arial, sans-serif;
}
.tour-stage > * { position: absolute; inset: 0; }

.tour-stage .tour-window { background: #ffffff; }
.tour-stage .tour-chrome {
  position: absolute; left: 0; right: 0; top: 0; height: 40px; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; background: #efefed; border-bottom: 1px solid #dcdcd8; font-size: 14px; color: #4f5359;
}
.tour-stage .tour-logo { width: 18px; height: 18px; border-radius: 4px; background: #f37726; box-shadow: inset 0 0 0 4px #efefed, inset 0 0 0 9px #f37726; }
.tour-stage .tour-tab { background: #ffffff; padding: 6px 14px; border-radius: 8px 8px 0 0; border: 1px solid #dcdcd8; border-bottom: 0; margin-top: 7px; font-weight: 500; }
.tour-stage .tour-chip { margin-left: auto; display: flex; align-items: center; gap: 12px; font: 600 13px "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; color: #4f5359; }
.tour-stage .tour-dots { display: flex; gap: 5px; }
.tour-stage .tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d6d6d2; }
.tour-stage .tour-dots i.done { background: #f5c27a; }
.tour-stage .tour-dots i.on { background: #ec7211; box-shadow: 0 0 0 3px rgba(236, 114, 17, .18); }
.tour-stage .tour-kernel { display: flex; align-items: center; gap: 7px; margin-left: 18px; font-size: 13px; color: #6c7077; }
.tour-stage .tour-kernel i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #8a92a6; box-sizing: border-box; }
.tour-stage .tour-kernel.busy i { background: #ec7211; border-color: #ec7211; }

.tour-stage .tour-body { position: absolute; inset: 0; z-index: 1; }
.tour-stage .tour-chrome, .tour-stage .tour-caption { z-index: 2; }

.tour-stage .tour-nb { position: absolute; top: 40px; left: 0; right: 0; padding: 24px 40px 0 0; }
.tour-stage .tour-cell { position: relative; display: flex; }
.tour-stage .tour-cell::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 4px; border-radius: 2px; background: #ec7211; }
.tour-stage .tour-prompt { width: 90px; flex: none; padding: 12px 14px 0 0; text-align: right; font: 15px "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; color: #8a92a6; }
.tour-stage .tour-running .tour-prompt { color: #ec7211; }
.tour-stage .tour-code {
  flex: 1; min-width: 0; padding: 10px 16px; border: 1px solid #e2e2de; border-radius: 8px; background: #f6f6f5;
  font: 17px/1.6 "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: #1f2430;
}
.tour-stage .kw { color: #7c3aed; font-weight: 600; }
.tour-stage .st { color: #0a7d32; }
.tour-stage .nu { color: #b45309; }
.tour-stage .cm { color: #8a92a6; font-style: italic; }
.tour-stage .fn { color: #26338f; }
.tour-stage .tour-keys {
  position: absolute; right: 14px; bottom: 9px; display: flex; align-items: center; gap: 6px; opacity: 0; transform-origin: 100% 100%;
  font: 600 13px "IBM Plex Sans", system-ui, sans-serif; color: #5b5f66;
}
.tour-stage .tour-keys kbd {
  padding: 3px 9px; border-radius: 6px; border: 1px solid #cdcdc8; border-bottom-width: 3px; background: #ffffff;
  font: 600 13px "IBM Plex Mono", ui-monospace, monospace; color: #16191f;
}
.tour-stage .tour-busy { position: absolute; left: 90px; right: 0; bottom: -7px; height: 3px; overflow: hidden; border-radius: 2px; opacity: 0; background: rgba(236, 114, 17, .12); }
.tour-stage .tour-busy i { display: block; width: 32%; height: 100%; border-radius: 2px; background: #ec7211; }
.tour-stage .tour-took { position: absolute; right: 12px; bottom: -24px; font: 13px "IBM Plex Mono", ui-monospace, monospace; color: #15803d; opacity: 0; }
.tour-stage .tour-caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: text-bottom; background: #1f2430; }

.tour-stage .tour-out { position: absolute; left: 90px; right: 40px; bottom: 0; top: 140px; overflow: hidden; }
.tour-stage .tour-out > * { position: absolute; left: 0; top: 0; width: 100%; }
.tour-stage .tour-out img { max-width: none; height: auto; }
.tour-stage .tour-text { font: 16px/1.65 "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; padding: 8px 16px; color: #374151; }
.tour-stage .tour-text .bar { color: #d9d9d5; letter-spacing: -1px; }
.tour-stage .tour-text .bar .full { color: #ec7211; }
.tour-stage .tour-text .ok { color: #15803d; font-weight: 700; }

.tour-stage .tour-caption {
  position: absolute; left: 50%; top: auto; bottom: 22px; transform: translateX(-50%); width: max-content; max-width: 1080px;
  padding: 12px 24px; border-radius: 8px; background: rgba(22, 25, 31, .94); color: #f3f5fb;
  font-size: 23px; line-height: 1.4; font-weight: 500; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.tour-stage .tour-caption b { color: #fce7a2; font-weight: 600; }
.tour-stage .tour-caption code { font: 600 .86em "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; color: #ffb84d; background: none; padding: 0; }

.tour-stage .tour-card {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 110px; color: #f3f5fb;
  background: radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.4px) 0 0 / 22px 22px, #16191f;
}
.tour-stage .tour-eyebrow { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; font: 600 24px "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; color: #ff9900; }
.tour-stage .tour-eyebrow img { width: 44px; height: 44px; border-radius: 8px; }
.tour-stage .tour-card h1 { font: 700 60px/1.08 "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif; letter-spacing: -.02em; margin: 0 0 22px; max-width: 1000px; color: #ffffff; }
.tour-stage .tour-card h1 mark { background: none; color: #fce7a2; }
.tour-stage .tour-card h1 .w { display: inline-block; }
.tour-stage .tour-card .tour-ahead { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 10px; max-width: 1060px; }
.tour-stage .tour-card .tour-ahead li {
  margin: 0;
  display: flex; align-items: center; gap: 9px; padding: 7px 15px 7px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: 19px; color: #e7eaf4;
}
.tour-stage .tour-ahead b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #ff9900; color: #16191f; font: 600 14px "IBM Plex Mono", monospace; }
.tour-stage .tour-card p { font-size: 27px; line-height: 1.45; color: #b9bbc0; margin: 0; max-width: 980px; }
.tour-stage .tour-card .tour-calls { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 48px; font: 23px "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; color: #e7eaf4; }
.tour-stage .tour-card .tour-calls .fn { color: #c9cfff; }
.tour-stage .tour-card .tour-calls .st { color: #a6e3b4; }
.tour-stage .tour-card .tour-calls .nu { color: #fcd38d; }
.tour-stage .tour-card .tour-calls .kw { color: #d6c3ff; }
.tour-stage .tour-card .tour-calls li { margin: 0; }
.tour-stage .tour-small { font: 20px "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; margin-top: 44px !important; color: #8b8d93 !important; }

/* Dark: the same notebook in JupyterLab Dark's colours, around the -dark screenshots. */
.tour-stage.dark .tour-window { background: #111111; }
.tour-stage.dark .tour-chrome { background: #1c1c1c; border-bottom-color: #2c2c2c; color: #a3a3a3; }
.tour-stage.dark .tour-logo { box-shadow: inset 0 0 0 4px #1c1c1c, inset 0 0 0 9px #f37726; }
.tour-stage.dark .tour-tab { background: #111111; border-color: #2c2c2c; }
.tour-stage.dark .tour-chip { color: #a3a3a3; }
.tour-stage.dark .tour-dots i { background: #3a3a3a; }
.tour-stage.dark .tour-dots i.done { background: #8a5a1c; }
.tour-stage.dark .tour-dots i.on { background: #ff9900; box-shadow: 0 0 0 3px rgba(255, 153, 0, .2); }
.tour-stage.dark .tour-kernel { color: #9a9a9a; }
.tour-stage.dark .tour-kernel i { border-color: #8a8a8a; }
.tour-stage.dark .tour-kernel.busy i { background: #ff9900; border-color: #ff9900; }
.tour-stage.dark .tour-keys { color: #a3a3a3; }
.tour-stage.dark .tour-keys kbd { background: #262626; border-color: #4a4a4a; color: #e6e6e6; }
.tour-stage.dark .tour-busy { background: rgba(255, 153, 0, .15); }
.tour-stage.dark .tour-busy i { background: #ff9900; }
.tour-stage.dark .tour-took { color: #7cc28a; }
.tour-stage.dark .tour-text .bar { color: #333333; }
.tour-stage.dark .tour-text .bar .full { color: #ff9900; }
.tour-stage.dark .tour-cell::before { background: #ff9900; }
.tour-stage.dark .tour-running .tour-prompt { color: #ff9900; }
.tour-stage.dark .tour-code { background: #1c1c1c; border-color: #333333; color: #e6e6e6; }
.tour-stage.dark .kw { color: #c4a5ff; }
.tour-stage.dark .st { color: #7cc28a; }
.tour-stage.dark .nu { color: #f0b46a; }
.tour-stage.dark .cm { color: #8a8a8a; }
.tour-stage.dark .fn { color: #a9b4ff; }
.tour-stage.dark .tour-caret { background: #e6e6e6; }
.tour-stage.dark .tour-prompt { color: #7a7a7a; }
.tour-stage.dark .tour-text { color: #d4d4d4; }
.tour-stage.dark .tour-text .ok { color: #7cc28a; }
.tour-stage.dark .tour-caption { background: rgba(245, 246, 250, .95); color: #16191f; }
.tour-stage.dark .tour-caption b { color: #16191f; background: #fce7a2; padding: 0 4px; border-radius: 3px; }
.tour-stage.dark .tour-caption code { color: #b84f00; }

/* Clips: a screenshot's own short video (tour.js's initClips), shown in the picture's place and framed like it, with
   the selected cell's bar. With "reduce motion" the picture stays, an orange ▶ Watch it run pill starts its caption,
   and a click plays the clip there with a ✕ on its top right, fading back to the picture at the end. */
.md-typeset .aa-clip-play {
  display: inline-flex; align-items: center; gap: .35rem; margin: 0 .55rem .2rem 0; padding: .3rem .75rem .3rem .55rem;
  border: none; border-radius: 999px; cursor: pointer; vertical-align: .05rem;
  font: 600 .64rem/1 var(--md-text-font-family, sans-serif); color: var(--aa-on-orange, #16191f);
  background: var(--aa-orange, #ff9900); box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  transition: transform .2s var(--aa-ease, ease), box-shadow .2s;
}
.md-typeset .aa-clip-play span { font-size: .55rem; }
.md-typeset .aa-clip-play i { font-style: normal; font-weight: 500; opacity: .7; }
.md-typeset .aa-clip-play:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .24); }
.md-typeset figure.aa-clip-open .aa-clip-play { visibility: hidden; }
.md-typeset .aa-clip-play:focus-visible { outline: 2px solid var(--aa-accent, #c45500); outline-offset: 3px; }
.md-typeset figure > p.aa-clip-picture[hidden] { display: none; }
.md-typeset .aa-tour.aa-clip { position: relative; margin: 0; transition: opacity .25s; }
.md-typeset .aa-clip .tour-screen { border-left: 4px solid var(--aa-accent, #c45500); border-radius: 6px 14px 14px 6px; }
.md-typeset .aa-clip.aa-clip-leaving { opacity: 0; }
.md-typeset .aa-clip-close {
  position: absolute; top: .6rem; right: .6rem; z-index: 2; display: grid; place-items: center; width: 1.7rem;
  height: 1.7rem; margin: 0; padding: 0; border: none; border-radius: 50%; cursor: pointer; font-size: .75rem;
  color: #fff; background: rgba(0, 0, 0, .55); transition: background-color .15s, transform .2s;
}
.md-typeset .aa-clip-close:hover { background: rgba(0, 0, 0, .75); transform: rotate(90deg); }
.md-typeset .aa-clip-close:focus-visible { outline: 2px solid var(--aa-orange, #ff9900); outline-offset: 2px; }
@media print { .md-typeset .aa-clip-play { display: none; } }
