.cx-tutorial[hidden] { display: none; }

.cx-tutorial {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 20, 45, .58);
  backdrop-filter: blur(4px);
}

.cx-tutorial-card {
  width: min(620px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid #d8dde7;
  border-radius: 22px;
  background: #fff;
  color: #071a38;
  box-shadow: 0 24px 70px rgba(5, 20, 45, .28);
}

.cx-tutorial-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 10px;
}

.cx-tutorial-kicker {
  margin: 0 0 5px;
  color: #9a6500;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.cx-tutorial-title { margin: 0; font-size: clamp(24px, 5vw, 34px); line-height: 1.08; }
.cx-tutorial-close { border: 0; background: transparent; color: #667085; font-size: 30px; line-height: 1; cursor: pointer; }
.cx-tutorial-body { padding: 8px 26px 18px; }
.cx-tutorial-step { display: none; text-align: center; }
.cx-tutorial-step.is-active { display: block; }
.cx-tutorial-step h3 { margin: 15px 0 8px; font-size: 23px; }
.cx-tutorial-step p { max-width: 480px; margin: 0 auto; color: #43506a; font-size: 16px; line-height: 1.5; }

.cx-demo {
  min-height: 150px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f8f7f2;
}

.cx-number-bank { display: grid; grid-template-columns: repeat(7, 42px); gap: 7px; }
.cx-number-bank span { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid #ccd5e2; border-radius: 9px; background: white; font-weight: 700; }
.cx-target-demo { width: min(260px, 72vw); }
.cx-target-circle { fill: #39b86f; stroke: #071a38; stroke-width: 3; }
.cx-target-line { fill: #eff8f2; stroke: #071a38; stroke-width: 2; }
.cx-target-number { font: 800 18px system-ui, sans-serif; fill: #071a38; text-anchor: middle; dominant-baseline: middle; }

.cx-readout { width: min(330px, 90%); padding: 18px 22px; border-radius: 14px; background: #fff1c8; text-align: left; }
.cx-readout small { display: block; color: #876000; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.cx-readout strong { display: block; margin: 5px 0 13px; font-size: 23px; }
.cx-readout strong:last-child { margin-bottom: 0; font-size: 36px; }
.cx-mode-demo { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cx-mode-demo span { padding: 9px 15px; border: 1px solid #cbd3df; border-radius: 9px; background: white; }
.cx-mode-demo .active { color: white; border-color: #071a38; background: #071a38; }

.cx-tutorial-foot { display: flex; align-items: center; gap: 12px; padding: 14px 26px 24px; border-top: 1px solid #e4e8ef; }
.cx-tutorial-dots { display: flex; gap: 6px; margin-right: auto; }
.cx-tutorial-dot { width: 8px; height: 8px; border-radius: 50%; background: #ccd3de; }
.cx-tutorial-dot.is-active { background: #0d67bd; }
.cx-tutorial-button { min-width: 64px; min-height: 40px; padding: 8px 15px; border: 1px solid #b9c5d6; border-radius: 9px; background: white; color: #071a38; font: inherit; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; white-space: nowrap; }
.cx-tutorial-button.primary { min-width: 76px; border-color: #0d67bd; background: #0d67bd; color: white; -webkit-text-fill-color: white; }
.cx-tutorial-button.primary:hover:not(:disabled),
.cx-tutorial-button.primary:focus,
.cx-tutorial-button.primary:active { border-color: #0d67bd; background: #0d67bd; color: white; -webkit-text-fill-color: white; }
.cx-replay { margin-top: 12px; padding: 8px 13px; border: 1px solid #aac0da; border-radius: 8px; background: #fff; color: #0b5dac; font: inherit; font-weight: 700; cursor: pointer; }
.cx-brand-line { display: flex; align-items: center; gap: 12px; }
.cx-edition-switch { display: inline-flex; overflow: hidden; flex: 0 0 auto; border: 1px solid #cbd3df; border-radius: 8px; background: white; font-size: 11px; }
.cx-edition-switch a, .cx-edition-switch strong { min-width: 31px; padding: 5px 7px; text-align: center; text-decoration: none; }
.cx-edition-switch strong { color: white; background: #071a38; }
.cx-edition-switch a { color: #526078; }

@media (max-width: 520px) {
  .cx-tutorial { padding: 10px; }
  .cx-tutorial-card { max-height: calc(100dvh - 20px); border-radius: 16px; }
  .cx-tutorial-head { padding: 19px 18px 8px; }
  .cx-tutorial-body { padding: 6px 18px 14px; }
  .cx-tutorial-foot { padding: 12px 18px 18px; gap: 8px; }
  .cx-tutorial-dots { min-width: 50px; }
  .cx-tutorial-button { min-width: 62px; padding-inline: 12px; }
  .cx-tutorial-button.primary { min-width: 72px; }
  .cx-number-bank { grid-template-columns: repeat(7, 34px); gap: 5px; }
  .cx-brand-line { align-items: flex-start; gap: 7px; }
}
