/* Tour styles must not replace the surrounding site's navigation or footer styles. */
.page-wrapper > .container.casepilot-demo-container { width: 100%; max-width: 1800px; padding: 24px; overflow: visible; }
.tour-shell {
  max-width: 1560px; margin: 0 auto; padding: 24px;
  background: var(--cp-bg); color: var(--cp-text); border-radius: 16px;
  font-family: "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
}
.tour-shell :where(a) { color: var(--cp-link); }
.tour-shell :where(a):focus-visible, .tour-shell summary:focus-visible { outline: 3px solid var(--cp-link); outline-offset: 4px; }
.tour-header, .tour-brand, .tour-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tour-brand { justify-content: flex-start; text-decoration: none; color: var(--cp-text); font-size: 20px; font-weight: 700; }
.tour-brand img { width: 220px; height: auto; border-radius: .625rem; }
.tour-download, .tour-controls a { padding: 10px 16px; border: 1px solid var(--cp-border-strong); border-radius: .625rem; text-decoration: none; }
.tour-disclosure { background: var(--cp-surface-soft); border: 1px solid var(--cp-border); padding: 12px 16px; border-radius: .625rem; }
.tour-kicker { color: var(--cp-text-muted); font-size: 13px; font-weight: 700; letter-spacing: .12em; margin-bottom: 4px; }
.tour-heading h1 { margin: 0; font-size: clamp(25px, 3vw, 36px); line-height: 1.2; }
.tour-heading > p:last-child { margin-top: 12px; color: var(--cp-text-soft); }
.tour-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2.8fr); gap: 24px; align-items: start; }
.tour-notes { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: 16px; padding: 20px; }
.tour-notes section + section { margin-top: 24px; }
.tour-notes h2 { font-size: 18px; margin: 0 0 8px; }
.tour-notes p { margin-top: 0; font-size: 15px; }
.tour-value { border-left: 4px solid var(--cp-accent); padding-left: 12px; }
.tour-speaker-notes { white-space: pre-line; padding-top: 12px; }
.tour-shell summary { cursor: pointer; font-weight: 600; }
.tour-stage { position: relative; line-height: 0; border: 1px solid var(--cp-border); border-radius: 16px; }
.tour-screen-wrap { position: relative; line-height: 0; }
.tour-reading-controls { padding: 12px 16px; line-height: 1.2; }
.tour-shell .tour-reading-next {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: var(--cp-surface); color: var(--cp-danger); border: 2px solid var(--cp-danger);
  border-radius: .625rem; font-weight: 800; text-decoration: none; transition: none;
}
.tour-screen { width: 100%; height: auto; display: block; border-radius: 16px; }
.tour-target { position: absolute; box-sizing: border-box; min-width: 24px; min-height: 24px; border: 3px solid var(--cp-danger); border-radius: .625rem; }
.tour-target:focus-visible { outline-color: var(--cp-danger); }
.tour-click-label { position: absolute; top: 0; right: 0; transform: translateY(calc(-100% - 8px)); display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: var(--cp-surface); color: var(--cp-danger); border: 2px solid var(--cp-danger);
  border-radius: .625rem; font-size: 16px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.tour-click-label > span { font-size: 24px; }
.tour-target-below .tour-click-label { top: auto; bottom: 0; transform: translateY(calc(100% + 8px)); }
.tour-target-right .tour-click-label { top: 50%; left: 100%; right: auto; transform: translate(12px, -50%); }
.tour-controls { margin: 24px 0; }
.tour-controls .tour-next { color: var(--cp-accent-fg); background: var(--cp-accent); border-color: var(--cp-accent); }
.tour-index { padding: 16px 20px; background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: .625rem; }
.tour-index ol { columns: 2; padding-left: 24px; }
.tour-index li { margin: 6px 0; break-inside: avoid; }
.tour-footer { margin-top: 24px; color: var(--cp-text-muted); font-size: 13px; }
.tour-skip { position: fixed; top: -100px; left: 16px; padding: 12px; background: var(--cp-surface); z-index: 1080; }
.tour-skip:focus { top: 12px; }
.tour-email-button {
  padding: 10px 16px; border: 1px solid var(--cp-accent); border-radius: .625rem;
  color: var(--cp-accent-fg); background: var(--cp-accent); font: inherit; cursor: pointer;
}
.tour-email-button:focus-visible { outline: 3px solid var(--cp-link); outline-offset: 4px; }
#tour-email {
  box-sizing: border-box; width: min(1000px, calc(100% - 32px)); max-height: calc(100vh - 48px);
  padding: 24px; overflow: auto; color: var(--cp-text); background: var(--cp-surface);
  border: 1px solid var(--cp-border-strong); border-radius: 16px;
  font-family: "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
}
#tour-email::backdrop { background: var(--cp-text); opacity: .6; }
.tour-email-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: -24px; padding: 8px 0; background: var(--cp-surface);
}
.tour-email-header h2 { margin: 0; font-size: 22px; }
@media (max-width: 760px) {
  .page-wrapper > .container.casepilot-demo-container { padding: 12px; }
  .tour-shell { padding: 16px; }
  .tour-header { flex-wrap: wrap; }
  .tour-brand { font-size: 16px; gap: 8px; flex-wrap: wrap; }
  .tour-brand img { width: 150px; }
  .tour-grid { grid-template-columns: 1fr; }
  .tour-stage { grid-row: 1; }
  .tour-click-label { font-size: 13px; padding: 4px 6px; }
  .tour-index ol { columns: 1; }
}
