/* Skool Konect — motion layer: scroll entrances, scrollbar, cursor.
   Every hidden state is set from JS (motion.js). Without JS, or with
   reduced motion, nothing here hides content. */

/* ---------- Pre-paint guard (class set in <head>, removed by motion.js, 3s failsafe) ---------- */
html.mo-pre main, html.mo-pre .foot { opacity: 0; }

/* Elements mid-entrance: stop CSS transitions from smoothing every GSAP frame */
.mo-busy, .mo-busy * { transition: none !important; }

/* Split text */
.mo-w { display: inline-block; white-space: nowrap; }
.mo-c, .mo-wi { display: inline-block; will-change: transform; }
.mo-masking .mo-w { clip-path: inset(-0.35em -0.25em -0.2em -0.25em); }
.mo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Odometer chapter numbers */
.mo-odo { display: inline-block; height: 1.5em; line-height: 1.5em; overflow: hidden; vertical-align: top; }
.mo-odo > span { display: flex; flex-direction: column; }
.mo-odo i { font-style: normal; height: 1.5em; }

/* Depth for hinge entrances */
.mo .dont, .mo .pager { perspective: 1400px; }

/* Misuse grid: every box first reads "correct", then flips to "wrong" */
.mo .dont .box.mo-ok::after {
  background-color: #18A058;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}
.mo .dont .box.mo-flip::after { animation: moFlip .46s cubic-bezier(.23, 1, .32, 1) both; }
@keyframes moFlip {
  0%   { transform: scaleY(1);   background-color: #18A058; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
  40%  { transform: scaleY(0);   background-color: #18A058; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
  41%  { transform: scaleY(0);   background-color: #E5484D; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E"); }
  70%  { transform: scale(1.25); background-color: #E5484D; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E"); }
  100% { transform: scale(1);    background-color: #E5484D; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E"); }
}

/* Pattern generator: tile overlay that dissolves into the pattern */
.mo-tiles { position: absolute; z-index: 3; display: grid; pointer-events: none; overflow: hidden; border-radius: var(--r-sm); }
.mo-tiles i { display: block; background: var(--panel); margin: -0.5px; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #F3F5F8; box-shadow: inset 1px 0 0 #E1E5EC; }
::-webkit-scrollbar-thumb {
  background-color: #01152F;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 567 454'%3E%3Cpath fill='%2300EAE8' d='M329.261 19.5489L282.647 112.992H35.2734C15.7977 112.992 0 128.815 0 148.351V418.029C0 437.552 15.7849 453.388 35.2734 453.388H226.902L284.09 340.396H531.463C550.939 340.396 566.737 324.573 566.737 305.037V35.3595C566.737 15.8363 550.952 0 531.463 0H360.792C347.434 0 335.225 7.56606 329.248 19.5489H329.261ZM452.615 225.996H339.005L282.647 338.988H114.134V227.417H227.157L284.09 114.426H452.603V225.996H452.615Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 6px auto;
  border: 3px solid #F3F5F8; border-radius: 999px; min-height: 56px;
}
::-webkit-scrollbar-thumb:hover { background-color: #191CFF; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 567 454'%3E%3Cpath fill='%23D5FF2D' d='M329.261 19.5489L282.647 112.992H35.2734C15.7977 112.992 0 128.815 0 148.351V418.029C0 437.552 15.7849 453.388 35.2734 453.388H226.902L284.09 340.396H531.463C550.939 340.396 566.737 324.573 566.737 305.037V35.3595C566.737 15.8363 550.952 0 531.463 0H360.792C347.434 0 335.225 7.56606 329.248 19.5489H329.261ZM452.615 225.996H339.005L282.647 338.988H114.134V227.417H227.157L284.09 114.426H452.603V225.996H452.615Z'/%3E%3C/svg%3E"); border-width: 2px; }
::-webkit-scrollbar-thumb:active { background-color: #01152F; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 567 454'%3E%3Cpath fill='%23D5FF2D' d='M329.261 19.5489L282.647 112.992H35.2734C15.7977 112.992 0 128.815 0 148.351V418.029C0 437.552 15.7849 453.388 35.2734 453.388H226.902L284.09 340.396H531.463C550.939 340.396 566.737 324.573 566.737 305.037V35.3595C566.737 15.8363 550.952 0 531.463 0H360.792C347.434 0 335.225 7.56606 329.248 19.5489H329.261ZM452.615 225.996H339.005L282.647 338.988H114.134V227.417H227.157L284.09 114.426H452.603V225.996H452.615Z'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-corner { background: #F3F5F8; }
@supports (-moz-appearance: none) {
  html { scrollbar-color: #01152F #F3F5F8; scrollbar-width: thin; }
}

/* ---------- Cursor ---------- */
html.mo-cursor, html.mo-cursor * { cursor: none !important; }
html.mo-cursor [contenteditable="true"],
html.mo-cursor input:not([type=range]):not([type=button]):not([type=submit]):not([type=checkbox]):not([type=radio]),
html.mo-cursor textarea { cursor: text !important; }

.mo-cur, .mo-tag {
  position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none;
  opacity: 0; transition: opacity .15s ease;
}
html.mo-cur-on .mo-cur { opacity: 1; }
html.mo-cur-text .mo-cur, html.mo-cur-text .mo-tag { opacity: 0 !important; }
.mo-cur__arrow {
  width: 24px; height: 24px; display: block;
  transform-origin: 3px 2px;
  transition: transform .18s cubic-bezier(.23, 1, .32, 1);
  filter: drop-shadow(0 2px 3px rgba(1, 21, 47, .28));
}
.mo-cur__arrow path { fill: #01152F; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; transition: fill .15s ease; }
html.mo-cur-link .mo-cur__arrow { transform: scale(1.14); }
html.mo-cur-link .mo-cur__arrow path { fill: #191CFF; }
html.mo-cur-down .mo-cur__arrow { transform: scale(.86); }

.mo-tag span {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px 0 8px; border-radius: 8px;
  background: #D5FF2D; color: #01152F; font: 700 12px/1 var(--sans); letter-spacing: .01em;
  box-shadow: 0 0 0 1.5px #01152F, 0 8px 18px -8px rgba(1, 21, 47, .5);
  transform: scale(.6); opacity: 0; transform-origin: 0 0;
  transition: transform .2s cubic-bezier(.23, 1, .32, 1), opacity .12s ease;
}
.mo-tag span::before { content: ""; width: 12px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 567 454'%3E%3Cpath fill='%2301152F' d='M329.261 19.5489L282.647 112.992H35.2734C15.7977 112.992 0 128.815 0 148.351V418.029C0 437.552 15.7849 453.388 35.2734 453.388H226.902L284.09 340.396H531.463C550.939 340.396 566.737 324.573 566.737 305.037V35.3595C566.737 15.8363 550.952 0 531.463 0H360.792C347.434 0 335.225 7.56606 329.248 19.5489H329.261ZM452.615 225.996H339.005L282.647 338.988H114.134V227.417H227.157L284.09 114.426H452.603V225.996H452.615Z'/%3E%3C/svg%3E") center / contain no-repeat; }
html.mo-cur-on.mo-cur-label .mo-tag { opacity: 1; }
html.mo-cur-label .mo-tag span { transform: scale(1); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html.mo-cursor, html.mo-cursor * { cursor: auto !important; }
  .mo-cur, .mo-tag { display: none !important; }
}
@media (hover: none), (pointer: coarse) {
  html.mo-cursor, html.mo-cursor * { cursor: auto !important; }
  .mo-cur, .mo-tag { display: none !important; }
}

/* Chapter cards are dealt from beneath the footer, never across it */
.mo .foot { position: relative; z-index: 1; background: var(--bg); }

/* ---------- Home intro (once per session) ---------- */
html.mo-intro body::before { content: ""; position: fixed; inset: 0; z-index: 9000; background: #01152F; }
.sk-intro { position: fixed; inset: 0; z-index: 9001; background: #01152F; overflow: hidden; will-change: transform; }
.sk-intro__guides { position: absolute; inset: 0; width: 100%; height: 100%; }
.sk-intro__guides line, .sk-intro__guides circle {
  fill: none; stroke: #00EAE8; stroke-opacity: .24; stroke-width: 1; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.sk-intro__guides .f { stroke-opacity: .11; }
.sk-intro__guides .k { stroke-opacity: .5; }
.sk-intro__mark {
  --w: min(38vw, 300px);
  position: absolute; inset: 0; margin: auto; width: var(--w); height: calc(var(--w) * .8011); overflow: visible;
}
.sk-intro__mark path { fill: #00EAE8; fill-opacity: 0; stroke: #00EAE8; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
