/* "מאחורי הקלעים": blueprint mode, pins, guided sheet, after-payment flow */

/* blueprint grid sits between the page background and the content */
.bs-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease-out);
  background-image:
    linear-gradient(to right, rgba(29, 26, 43, .1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(29, 26, 43, .1) 1px, transparent 1px),
    linear-gradient(to right, rgba(29, 26, 43, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(29, 26, 43, .05) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
.bs-on .bs-grid { opacity: 1; }
main, .foot { position: relative; z-index: 1; }

/* the switch (header + small copies) */
.bs-toggle {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: 15px; color: var(--ink);
  background: transparent; border: 0; padding: 6px 2px; min-height: 44px; cursor: pointer; white-space: nowrap;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.bs-switch { position: relative; width: 38px; height: 22px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); flex: none; transition: background-color .2s ease; }
.bs-switch i { position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform .2s var(--ease-out); }
[aria-pressed="true"] .bs-switch { background: var(--lime); }
[aria-pressed="true"] .bs-switch i { transform: translateX(-16px); }
[dir="ltr"] [aria-pressed="true"] .bs-switch i { transform: translateX(16px); }
.bs-toggle:focus-visible, .made:focus-visible, .bs-here:focus-visible, .bs-pin:focus-visible, .bs-sheet button:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* hero: the page says it was built in the course's language */
.made {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 560px; margin: -8px 0 26px; padding: 10px 14px;
  font: inherit; font-size: 16px; font-weight: 600; line-height: 1.4; text-align: start; color: var(--ink);
  background: var(--paper); border: 2px dashed var(--ink); border-radius: 14px; cursor: pointer; touch-action: manipulation;
}
.made u { text-decoration: none; font-weight: 800; border-bottom: 2px solid var(--coral); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .made { transition: border-color .2s ease, background-color .2s ease; }
  .made:hover { border-style: solid; background: #fff; }
}

/* every part that the tour points at */
.bs-host { position: relative; }
.bs-target { outline: 2px dashed transparent; outline-offset: 10px; transition: outline-color .3s ease; }
.bs-on .bs-target { outline-color: color-mix(in srgb, var(--coral) 75%, transparent); }
.bs-on .bs-target.bs-active { outline-style: solid; outline-width: 3px; outline-color: var(--coral); }

.bs-pin {
  position: absolute; z-index: 8; top: -17px; inset-inline-start: 12px;
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 4px; padding-inline-end: 12px;
  font: inherit; font-weight: 800; font-size: 14px; line-height: 1; white-space: nowrap; color: var(--cream);
  background: var(--ink); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 rgba(29, 26, 43, .25); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(6px) scale(.94);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), background-color .2s ease, color .2s ease, visibility 0s linear .25s;
}
.bs-pin b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--coral); color: var(--ink); font-size: 14px; }
.bs-on .bs-pin { opacity: 1; visibility: visible; transform: none; transition-delay: calc(var(--i) * 60ms), calc(var(--i) * 60ms), 0s, 0s, 0s; }
.bs-active > .bs-pin { background: var(--lime); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { button.bs-pin:hover { background: var(--lime); color: var(--ink); } }
.bina-fab .bs-pin { top: -30px; inset-inline-start: auto; inset-inline-end: 2px; cursor: inherit; }

/* the guided sheet */
.bs-sheet {
  position: fixed; z-index: 45; inset-inline: 10px; bottom: max(10px, env(safe-area-inset-bottom));
  max-height: min(64vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--ink); color: var(--cream); border-radius: 24px; padding: 14px 18px 12px;
  box-shadow: 0 22px 50px -18px rgba(29, 26, 43, .65);
  opacity: 0; transform: translateY(calc(100% + 24px)); transition: transform .32s var(--ease-out), opacity .2s ease;
}
.bs-sheet.open { opacity: 1; transform: none; }
.bs-sheet[hidden] { display: none; }
.bs-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bs-tag { font-weight: 800; font-size: 14px; background: var(--coral); color: var(--ink); border-radius: 999px; padding: 3px 12px 4px; white-space: nowrap; }
.bs-dots { display: flex; gap: 5px; margin-inline-start: auto; }
.bs-dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(251, 244, 230, .3); transition: width .25s var(--ease-out), background-color .25s ease; }
.bs-dots i.on { width: 18px; background: var(--lime); }
.bs-x { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 2px solid rgba(251, 244, 230, .5); background: transparent; color: var(--cream); font-size: 22px; line-height: 1; cursor: pointer; }
.bs-title { font-size: 24px; color: var(--cream); margin: 4px 0 6px; outline: none; }
.bs-text { font-size: 16px; line-height: 1.55; margin: 0 0 10px; color: rgba(251, 244, 230, .92); }
.bs-quote { margin: 0 0 8px; }
.bs-quote[hidden] { display: none; }
.bs-quote figcaption { font-size: 13px; font-weight: 700; color: rgba(251, 244, 230, .62); }
.bs-quote blockquote { margin: 2px 0 0; color: var(--lime); font-size: 25px; line-height: 1.2; }
.bs-nav { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.bs-nav [hidden] { display: none; }
.bs-prev { font: inherit; font-size: 15px; font-weight: 700; color: var(--cream); background: none; border: 0; padding: 8px 2px; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.bs-act { font: inherit; font-size: 15px; font-weight: 800; color: var(--cream); background: transparent; border: 2px solid rgba(251, 244, 230, .7); border-radius: 999px; padding: 6px 14px; min-height: 44px; cursor: pointer; }
.bs-next { margin-inline-start: auto; border-color: var(--lime); box-shadow: none; }
.bs-next:active { transform: scale(.97); box-shadow: none; }
@media (hover: hover) { .bs-next:hover { box-shadow: none; } }

.bs-sw { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -2px 0 12px; font-size: 13px; }
.bs-sw > span { display: inline-flex; align-items: center; gap: 6px; }
.bs-sw i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 2px solid var(--cream); }
.bs-sw b { font-weight: 800; font-size: 15px; }
.bs-sw .hand { font-size: 21px; font-weight: 400; color: var(--lime); }

/* while the tour runs, the bottom bar steps aside */
.bs-on .sticky { transform: translateY(140%) !important; }
.bina-fab { transition: transform .2s var(--ease-out), opacity .2s ease, translate .3s var(--ease-out); }
@media (max-width: 899px) {
  .bs-on .bina-fab { opacity: 0; pointer-events: none; }
  .bs-on[data-bs-step="1"] .bina-fab { opacity: 1; pointer-events: auto; translate: 0 calc(-1 * var(--bs-lift, 0px)); }
}

/* stations: "on this page" */
.bs-here {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 0; min-height: 40px;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); background: none; border: 0; cursor: pointer; text-align: start;
  touch-action: manipulation;
}
.bs-here b { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--coral); font-size: 14px; }
.bs-here span:not([aria-hidden]) { border-bottom: 2px dashed var(--coral); }
.bs-here span[aria-hidden] { display: inline-block; transition: transform .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .bs-here:hover span[aria-hidden] { transform: translateX(-4px); } }

/* after payment */
.flow-head { max-width: 720px; }
.flow-card { margin-top: 26px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 24px; padding: 18px 20px 14px; box-shadow: 0 8px 0 var(--ink); }
.flow-status { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--muted); margin: 0 0 16px; }
.flow-status i { width: 9px; height: 9px; border-radius: 50%; background: #3fb950; box-shadow: 0 0 0 0 rgba(63, 185, 80, .5); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, .5); } 70%, 100% { box-shadow: 0 0 0 8px rgba(63, 185, 80, 0); } }
.flow-steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 20px; }
.flow-steps::before, .flow-steps::after { content: ""; position: absolute; inset-inline-start: 12px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; }
.flow-steps::before { background: repeating-linear-gradient(var(--ink) 0 8px, transparent 8px 14px); opacity: .25; }
.flow-steps::after { background: var(--coral); transform-origin: top; transform: scaleY(var(--flow, 0)); transition: transform .6s var(--ease-out); }
.flow-steps li { position: relative; padding-inline-start: 44px; display: grid; gap: 2px; transition: opacity .35s ease; }
.flow-steps li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; width: 27px; height: 27px; border-radius: 50%; z-index: 1;
  background: var(--paper); border: 3px solid var(--ink); transition: background-color .25s ease, transform .35s var(--ease-out);
}
.flow-steps li.lit::before { background: var(--lime); transform: scale(1.12); }
.js .flow-steps li:not(.lit) { opacity: .42; }
.flow-steps b { font-size: 20px; line-height: 1.3; }
.flow-steps span { font-size: 16px; color: var(--muted); line-height: 1.45; }
.flow-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; border-top: 2px dashed var(--line); padding-top: 10px; }
.flow-foot p { margin: 0; font-size: 14px; color: var(--muted); }
.flow-replay { font: inherit; font-size: 15px; font-weight: 800; color: var(--ink); background: none; border: 0; padding: 8px 2px; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; opacity: 0; transition: opacity .3s ease; }
.done .flow-replay, html:not(.js) .flow-replay { opacity: 1; }

@media (min-width: 900px) {
  .bs-sheet { inset-inline-end: auto; inset-inline-start: 24px; bottom: 24px; width: 420px; padding: 18px 22px 14px; }
  .bs-title { font-size: 27px; }
  .flow-card { padding: 26px 30px 18px; }
  .flow-steps { grid-template-columns: repeat(5, 1fr); gap: 18px; }
  .flow-steps::before, .flow-steps::after { inset-inline: 14px; top: 12px; bottom: auto; width: auto; height: 3px; }
  .flow-steps::before { background: repeating-linear-gradient(to left, var(--ink) 0 8px, transparent 8px 14px); }
  .flow-steps::after { transform-origin: right; transform: scaleX(var(--flow, 0)); }
  .flow-steps li { padding-inline-start: 0; padding-top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .bs-pin { transform: none; transition: opacity .2s ease, visibility 0s linear .2s; }
  .bs-on .bs-pin { transition-delay: 0s; }
  .bs-sheet { transform: none; transition: opacity .2s ease; }
  .flow-steps::after { transition: none; }
  .flow-status i { animation: none; }
  .bina-fab { transition: opacity .2s ease; }
}

.bs-on .made .bs-switch { background: var(--lime); }
.bs-on .made .bs-switch i { transform: translateX(-16px); }

.track > .bs-pin { inset-inline-start: auto; inset-inline-end: 0; }
@media (max-width: 899px) {
  .bs-sheet { padding: 12px 16px 8px; }
  .bs-title { font-size: 21px; margin-bottom: 4px; }
  .bs-text { font-size: 15px; line-height: 1.5; margin-bottom: 8px; }
  .bs-quote blockquote { font-size: 22px; }
  .bs-sw { margin-bottom: 8px; gap: 6px 10px; }
  /* on the first screen the chat button would cover the course facts */
  html:not(.past-hero) .bina-fab { opacity: 0; pointer-events: none; translate: 0 12px; }
}
