/* A guided workspace around the real Decode example app. */
:root {
  color-scheme: light;
  --tour-page: #f5f7fc;
  --tour-panel: #fff;
  --tour-text: #09152b;
  --tour-muted: #526078;
  --tour-line: #3d5aa92b;
  --tour-soft: #edf2fc;
  --tour-blue: #3d5aa9;
  --tour-lime: #acec00;
  --tour-shadow: 0 10px 35px -20px #09152b29;
  font-family: Manrope, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --tour-page: #16151a;
  --tour-panel: #1e1e28;
  --tour-text: #f5f7fc;
  --tour-muted: #b9c3d7;
  --tour-line: #7892d040;
  --tour-soft: #25304a;
  --tour-blue: #a9bff6;
  --tour-shadow: 0 12px 38px -20px #00000080;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body.tour-page { margin: 0; min-height: 100vh; background: var(--tour-page); color: var(--tour-text); font-size: 16px; line-height: 1.6; }
.tour-page :is(h1, h2, p, figure) { margin: 0; }
.tour-page :is(button, input, select) { font: inherit; }
.tour-page button { cursor: pointer; }
.tour-page button:disabled { cursor: default; opacity: .45; }
.tour-page a { color: inherit; text-decoration: none; }
.tour-page :is(a, button) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tour-page :is(a, button):focus-visible { outline: 3px solid var(--tour-blue); outline-offset: 4px; }
.tour-page svg { display: block; flex-shrink: 0; }
.tour-page [hidden] { display: none !important; }
.tour-page ::selection { color: #09152b; background: #acec00; }
.tour-page .skip-link { position: fixed; z-index: 20; top: -100px; left: 20px; padding: 12px 20px; background: #acec00; color: #09152b; border-radius: 6px; font-weight: 800; }
.tour-page .skip-link:focus { top: 12px; }

.tour-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; padding: 17px 30px; border-bottom: 1px solid var(--tour-line); background: var(--tour-panel); }
.tour-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tour-brand svg { width: 29px; height: 29px; }
.tour-brand > span { font-size: 31px; line-height: 1; font-weight: 600; letter-spacing: -.065em; }
.tour-header-actions { display: flex; align-items: center; gap: 24px; }
.tour-home { padding-block: 10px; color: var(--tour-muted) !important; font-size: 14px; font-weight: 650; }
.tour-home:hover { color: var(--tour-blue) !important; text-decoration: underline; text-underline-offset: 4px; }
.tour-page .tour-booking { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 11px 18px; border: 1px solid #09152b; border-radius: 7px; background: #09152b; color: #fff; font-size: 14px; font-weight: 750; line-height: 1.45; text-align: center; transition: background .18s ease, border-color .18s ease; }
.tour-page .tour-booking:hover { background: #3d5aa9; border-color: #3d5aa9; }
html[data-theme="dark"] .tour-header .tour-booking { background: #acec00; border-color: #acec00; color: #09152b; }

.tour-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: start; gap: 24px; width: calc(100% - 48px); max-width: 2000px; margin: 24px auto; }
.tour-guide { min-width: 0; padding: 24px; border: 1px solid var(--tour-line); border-radius: 14px; background: var(--tour-panel); box-shadow: var(--tour-shadow); }
.tour-eyebrow { color: var(--tour-blue); font-size: 14px; font-weight: 800; line-height: 1.5; letter-spacing: .075em; text-transform: uppercase; }
.tour-steps { display: grid; gap: 6px; margin-top: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--tour-line); }
.tour-steps > button { display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 46px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--tour-muted); font-size: 14px; font-weight: 650; line-height: 1.45; text-align: left; transition: color .18s ease, background .18s ease, border-color .18s ease; }
.tour-step-number { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid var(--tour-line); border-radius: 50%; color: var(--tour-muted); font-size: 14px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.tour-steps > button:hover { background: var(--tour-soft); color: var(--tour-text); }
.tour-steps > button.is-complete .tour-step-number { border-color: var(--tour-blue); color: var(--tour-blue); background: var(--tour-soft); }
.tour-steps > button[aria-current="step"] { border-color: #09152b; background: #09152b; color: #fff; }
.tour-steps > button[aria-current="step"] .tour-step-number { border-color: #acec00; background: #acec00; color: #09152b; }
.tour-story { margin-top: 24px; }
#tour-step-count { margin-bottom: 9px; color: var(--tour-blue); font-size: 14px; line-height: 1.5; font-weight: 750; }
#tour-title { font-size: clamp(25px, 2.1vw, 32px); font-weight: 800; line-height: 1.18; letter-spacing: -.045em; text-wrap: balance; }
#tour-description { margin-top: 15px; color: var(--tour-muted); font-size: 16px; line-height: 1.7; }
.tour-task { margin-top: 22px; padding: 16px 17px; border: 1px solid var(--tour-line); border-left: 3px solid var(--tour-blue); border-radius: 7px; background: var(--tour-soft); }
.tour-task > span { display: block; margin-bottom: 6px; color: var(--tour-blue); font-size: 14px; font-weight: 800; line-height: 1.5; }
#tour-task-text { color: var(--tour-text); font-size: 16px; line-height: 1.65; }
#tour-feedback { margin-top: 14px; color: var(--tour-muted); font-size: 14px; line-height: 1.65; }
#tour-feedback:empty { display: none; }
#tour-feedback.is-complete { padding: 11px 13px; border: 1px solid #6a8c254d; border-radius: 6px; background: #acec0019; color: #3e5714; font-weight: 650; }
html[data-theme="dark"] #tour-feedback.is-complete { border-color: #acec0042; color: #c3e687; }
.tour-progressnav { display: flex; align-items: stretch; gap: 10px; margin-top: 24px; }
.tour-progressnav > button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 11px 16px; border: 1px solid var(--tour-line); border-radius: 7px; background: var(--tour-panel); color: var(--tour-text); font-size: 15px; font-weight: 750; line-height: 1.4; transition: background .18s ease, border-color .18s ease; }
#tour-prev { flex: 0 1 auto; }
#tour-next { flex: 1 1 auto; border-color: #09152b; background: #09152b; color: #fff; }
#tour-next:hover:not(:disabled) { border-color: #3d5aa9; background: #3d5aa9; }
#tour-prev:hover:not(:disabled) { background: var(--tour-soft); border-color: var(--tour-blue); }
html[data-theme="dark"] #tour-next { background: #acec00; border-color: #acec00; color: #09152b; }
html[data-theme="dark"] #tour-next:hover:not(:disabled) { background: #bafa12; border-color: #bafa12; }
#tour-mode { display: block; min-height: 44px; margin: 9px auto 0; padding: 10px 2px; border: 0; background: transparent; color: var(--tour-blue); font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
#tour-mode:hover { text-decoration-thickness: 2px; }
.tour-disclosure { margin-top: 16px !important; padding-top: 17px; border-top: 1px solid var(--tour-line); color: var(--tour-muted); font-size: 14px; line-height: 1.65; }

.tour-workbench { position: sticky; top: 20px; display: grid; grid-template-rows: auto minmax(620px, 1fr) auto; min-width: 0; min-height: max(820px, calc(100vh - 128px)); min-height: max(820px, calc(100dvh - 128px)); overflow: hidden; border: 1px solid #4a609557; border-radius: 14px; background: #16151a; color: #fff; box-shadow: 0 18px 55px -24px #09152b55, 0 0 36px -20px #3d5aa94d; }
.tour-workbench-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; min-height: 64px; padding: 10px 18px; border-bottom: 1px solid #ffffff12; background: #1d1e28; }
.tour-channel { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: #f2f5fb; font-size: 14px; font-weight: 700; line-height: 1.5; }
.tour-channel > :is(b, .tour-channel-avatar, span[aria-hidden="true"]) { display: inline-grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border: 1px solid #738bc080; border-radius: 50%; background: #3d5aa9; color: #fff; font-size: 14px; font-weight: 750; }
.tour-channel > div { min-width: 0; }
.tour-channel strong { display: block; font-size: 14px; font-weight: 750; line-height: 1.4; }
.tour-channel small { display: block; margin-top: 2px; color: #abb9d1; font-size: 14px; font-weight: 450; line-height: 1.4; }
.tour-workbench-tools { display: flex; justify-content: flex-end; align-items: center; gap: 9px; flex-shrink: 0; max-width: 100%; }
.tour-workbench-tools > button { min-height: 40px; padding: 8px 11px; border: 1px solid #8098cb42; border-radius: 6px; background: #ffffff05; color: #c4cee1; font-size: 14px; font-weight: 650; line-height: 1.4; }
.tour-workbench-tools > button:hover { border-color: #8ba6e1; background: #3d5aa933; color: #fff; }
.tour-workbench :is(a, button):focus-visible { outline-color: #acec00; }
.tour-app-stage { position: relative; min-width: 0; min-height: 620px; isolation: isolate; background: #16151a; }
#tour-app { display: block; width: 100%; height: 100%; min-height: 620px; border: 0; background: #16151a; }
#tour-loading, #tour-error, #tour-finish { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center; gap: 18px; overflow: auto; padding: 40px; background: radial-gradient(ellipse at 50% 30%, #3d5aa91f, transparent 70%), #16151a; color: #d8e0ee; text-align: center; }
#tour-loading { font-size: 16px; line-height: 1.65; }
#tour-loading svg { width: 32px; height: 32px; color: #acec00; }
.tour-loading-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 1px solid #6789d18c; border-radius: 12px; background: #3d5aa940; }
.tour-loading-mark::before { content: ""; width: 19px; height: 19px; border: 2px solid #acec00; border-radius: 4px; }
#tour-error { z-index: 3; }
#tour-error :is(h2, h3) { max-width: 540px; margin: 0; color: #fff; font-size: 28px; font-weight: 800; line-height: 1.25; letter-spacing: -.04em; }
#tour-error p { max-width: 540px; font-size: 16px; line-height: 1.7; }
#tour-error a:not(.tour-booking) { color: #b9cdfb; text-decoration: underline; text-underline-offset: 4px; }
#tour-retry { min-height: 46px; padding: 11px 22px; border: 1px solid #acec00; border-radius: 7px; background: #acec00; color: #09152b; font-size: 16px; font-weight: 800; line-height: 1.5; }
#tour-finish { z-index: 4; gap: 22px; padding: 48px; background: radial-gradient(ellipse at 50% 20%, #3d5aa94d, transparent 72%), #09152b; }
#tour-finish h2 { max-width: 680px; color: #fff; font-size: clamp(32px, 3.5vw, 48px); font-weight: 800; line-height: 1.15; letter-spacing: -.045em; text-wrap: balance; }
#tour-finish p { max-width: 580px; color: #c5d0e5; font-size: 18px; line-height: 1.75; }
.tour-finish-mark { display: inline-grid; place-items: center; width: 58px; height: 58px; border: 1px solid #acec0073; border-radius: 50%; background: #acec001a; color: #acec00; font-size: 29px; font-weight: 750; line-height: 1; }
#tour-finish .tour-eyebrow { color: #acec00; font-size: 14px; line-height: 1.5; }
#tour-finish .tour-finish-note { max-width: 490px; font-size: 14px; line-height: 1.7; }
#tour-finish .tour-booking { min-height: 50px; padding: 14px 22px; border-color: #acec00; background: #acec00; color: #09152b; font-size: 16px; }
#tour-finish .tour-booking:hover { background: #bafa12; border-color: #bafa12; }
.tour-finish-actions, #tour-finish > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
#tour-restart, #tour-explore { min-height: 44px; padding: 10px 17px; border: 1px solid #8fa9df66; border-radius: 7px; background: transparent; color: #e3ebfb; font-size: 14px; font-weight: 700; line-height: 1.5; }
#tour-restart:hover, #tour-explore:hover { border-color: #adc3ee; background: #ffffff0a; }
.tour-workbench-footer { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-width: 0; padding: 20px 24px; border-top: 1px solid #7188c2; background: #3d5aa9; color: #fff; }
.tour-banner-copy { min-width: 0; }
.tour-banner-copy strong { display: block; color: #fff; font-size: 20px; font-weight: 800; line-height: 1.3; letter-spacing: -.025em; text-wrap: balance; }
.tour-banner-copy p { max-width: 640px; margin-top: 5px; color: #fff; font-size: 14px; line-height: 1.6; }
.tour-banner-copy small { display: block; margin-top: 7px; color: #e7edff; font-size: 12px; line-height: 1.5; }
.tour-workbench-footer .tour-booking { flex-shrink: 0; min-height: 46px; padding: 12px 18px; border: 1px solid #fff; background: #fff; color: #09152b; text-decoration: none; }
.tour-workbench-footer .tour-booking:hover { border-color: #e7edff; background: #e7edff; color: #09152b; }
.tour-workbench-footer .tour-booking:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* Keep the guided actions in view while longer step instructions scroll independently. */
@media (min-width: 1001px) {
  .tour-guide {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: calc(100vh - 130px);
    height: calc(100dvh - 130px);
    max-height: calc(100vh - 130px);
    max-height: calc(100dvh - 130px);
    padding: 20px;
  }
  .tour-guide > :not(.tour-story) { flex-shrink: 0; }
  .tour-guide > .tour-eyebrow { letter-spacing: .045em; }
  .tour-steps {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    margin-top: 12px;
    padding-bottom: 13px;
  }
  .tour-steps > button { position: relative; justify-content: center; gap: 0; min-height: 44px; padding: 4px 1px; }
  .tour-steps > button > span:not(.tour-step-number) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .tour-story {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-top: 18px;
    margin-right: -7px;
    padding-right: 7px;
    scrollbar-width: thin;
    scrollbar-color: #3d5aa969 transparent;
  }
  #tour-step-count { margin-bottom: 7px; }
  #tour-description { margin-top: 12px; line-height: 1.65; }
  .tour-task { margin-top: 16px; padding: 13px 14px; }
  .tour-task > span { margin-bottom: 4px; }
  #tour-feedback { margin-top: 12px; }
  #tour-feedback.is-complete { padding: 10px 12px; }
  .tour-progressnav { gap: 8px; margin-top: 16px; }
  .tour-progressnav > button { min-height: 46px; padding: 10px 12px; font-size: 14px; }
  #tour-prev { flex: 0 0 auto; white-space: nowrap; }
  #tour-mode { margin-top: 3px; }
  .tour-disclosure { margin-top: 8px !important; padding-top: 12px; font-size: 14px; line-height: 1.5; }
}

@media (max-width: 1250px) and (min-width: 1001px) {
  .tour-layout { grid-template-columns: 288px minmax(0, 1fr); gap: 18px; width: calc(100% - 36px); margin-block: 18px; }
  .tour-guide { padding: 20px; }
  .tour-workbench-header { align-items: flex-start; flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
  .tour-workbench-tools { margin-left: auto; }
  .tour-workbench-footer { flex-wrap: wrap; gap: 14px; }
}
@media (max-width: 1000px) {
  .tour-header { padding-inline: 24px; }
  .tour-layout { display: block; width: calc(100% - 40px); margin: 20px auto; }
  .tour-guide { display: flex; flex-direction: column; min-height: 0; height: min(560px, calc(100vh - 160px)); height: min(560px, calc(100dvh - 160px)); max-height: 560px; padding: 22px 24px; }
  .tour-guide > :not(.tour-story) { flex-shrink: 0; }
  .tour-steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-top: 12px; padding-bottom: 12px; }
  .tour-steps > button { position: relative; justify-content: center; gap: 0; min-height: 44px; padding: 4px 1px; }
  .tour-steps > button > span:not(.tour-step-number) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  .tour-story { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-top: 12px; margin-right: -6px; padding-right: 6px; scrollbar-width: thin; scrollbar-color: #3d5aa969 transparent; }
  #tour-title { font-size: 29px; }
  #tour-description { max-width: 780px; margin-top: 10px; }
  .tour-task { margin-top: 13px; padding: 12px 16px; }
  .tour-task > span { margin-bottom: 3px; }
  .tour-progressnav { max-width: none; gap: 8px; margin-top: 14px; }
  .tour-progressnav > button { min-height: 46px; padding: 10px 12px; font-size: 14px; }
  #tour-prev { flex: 0 0 auto; white-space: nowrap; }
  #tour-mode { align-self: center; margin: 3px 0 0; }
  .tour-disclosure { display: none; }
  .tour-workbench { position: relative; top: auto; height: auto; min-height: 0; margin-top: 20px; grid-template-rows: auto 700px auto; }
  .tour-app-stage, #tour-app { min-height: 700px; }
}
@media (max-width: 650px) {
  .tour-header { align-items: flex-start; gap: 12px; padding: 18px; }
  .tour-brand { gap: 8px; padding-top: 5px; }
  .tour-brand svg { width: 25px; height: 25px; }
  .tour-brand > span { font-size: 28px; }
  .tour-header-actions { flex-direction: column; align-items: flex-end; gap: 4px; }
  .tour-header .tour-booking { max-width: 190px; padding: 9px 12px; }
  .tour-home { padding: 5px 0; }
  .tour-layout { width: calc(100% - 24px); margin-block: 12px; }
  .tour-guide { height: min(490px, calc(100vh - 180px)); height: min(490px, calc(100dvh - 180px)); max-height: 490px; padding: 20px 18px; border-radius: 12px; }
  #tour-title { font-size: 27px; }
  #tour-description, #tour-task-text { font-size: 16px; }
  .tour-progressnav { max-width: none; }
  #tour-mode { margin: 3px auto 0; }
  .tour-workbench { margin-top: 14px; border-radius: 12px; }
  .tour-workbench-header { flex-wrap: wrap; align-items: flex-start; padding: 13px; gap: 10px; }
  .tour-workbench-tools { flex-wrap: wrap; margin-left: auto; }
  .tour-workbench-tools > button { min-height: 44px; }
  .tour-workbench-footer { flex-direction: column; align-items: stretch; gap: 16px; padding: 21px 18px; }
  .tour-banner-copy strong { font-size: 20px; }
  .tour-workbench-footer .tour-booking { align-self: flex-start; min-height: 48px; }
  #tour-loading, #tour-error, #tour-finish { padding: 30px 22px; }
  #tour-finish { gap: 21px; }
  #tour-finish h2 { font-size: 32px; }
  #tour-finish p { font-size: 16px; }
}
@media (max-width: 380px) {
  .tour-header { flex-wrap: wrap; }
  .tour-header-actions { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; gap: 14px; }
  .tour-header .tour-booking { max-width: 175px; }
  .tour-guide { padding-inline: 16px; }
  .tour-progressnav > button { padding-inline: 13px; }
}
/* The final step becomes a focused invitation, with its own natural content height. */
.is-finished .tour-workbench { grid-template-rows: minmax(0, 1fr); min-height: min(720px, calc(100vh - 130px)); min-height: min(720px, calc(100dvh - 130px)); }
.is-finished :is(.tour-workbench-header, .tour-workbench-footer) { display: none; }
.is-finished .tour-app-stage { display: grid; min-height: 0; }
.is-finished #tour-finish { position: relative; inset: auto; min-height: 620px; overflow: visible; padding: clamp(30px, 4vw, 56px); }
.is-finished #tour-finish .tour-booking { min-height: 54px; padding-inline: 28px; }
.is-finished #tour-finish > div { margin-top: 8px; }
@media (max-width: 1000px) {
  .is-finished .tour-guide { height: auto; max-height: none; }
  .is-finished .tour-story { flex: 0 1 auto; overflow: visible; }
  .is-finished .tour-workbench { min-height: 0; grid-template-rows: auto; }
  .is-finished #tour-finish { min-height: 0; padding: 42px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tour-page *, .tour-page *::before, .tour-page *::after { transition: none !important; animation: none !important; }
}

/* Homepage embed sizes itself from content, never from its parent iframe height. */
html.is-embedded { min-width: 0; background: transparent; }
body.tour-page.is-embedded { min-height: 0; background: transparent; }
.is-embedded .tour-header { display: none; }
.is-embedded .tour-layout { width: calc(100% - 8px); max-width: none; margin: 4px auto; gap: 20px; }
.is-embedded .tour-guide { position: static; height: 1000px; min-height: 0; max-height: none; }
.is-embedded .tour-workbench { position: static; min-height: 1000px; height: auto; }
body.is-embedded:not(.is-finished) .tour-workbench { grid-template-rows: auto minmax(820px, 1fr) auto; }
body.is-embedded:not(.is-finished) :is(.tour-app-stage, #tour-app) { min-height: 820px; }
.is-embedded.is-finished .tour-guide { height: 620px; }
.is-embedded.is-finished .tour-workbench { min-height: 620px; }
@media (max-width: 1000px) {
  .is-embedded .tour-guide { height: auto; max-height: none; }
  .is-embedded .tour-story { flex: 0 1 auto; overflow: visible; }
  .is-embedded .tour-workbench { min-height: 0; }
  body.is-embedded:not(.is-finished) .tour-workbench { grid-template-rows: auto 820px auto; }
  .is-embedded.is-finished .tour-guide { height: auto; }
  .is-embedded.is-finished .tour-workbench { min-height: 0; grid-template-rows: auto; }
}
@media (max-width: 380px) {
  .is-embedded .tour-guide { padding-inline: 12px; }
  .is-embedded .tour-workbench-header { padding-inline: 10px; }
  .is-embedded .tour-workbench-tools { gap: 5px; }
}
