/* All copy and controls are usable before the first animation frame. */
#guide-motion-toggle {
  padding:6px 1px;min-height:36px;border:0;background:none;color:var(--ice);
  font:inherit;text-align:start;text-decoration:underline;text-underline-offset:.24em;
}
#guide-motion-toggle:disabled { display:none }
.guide-light-pass,.guide-ink .action-bolt { display:none }
.guide-illustration { position:relative;isolation:isolate;overflow:hidden }
[data-electric-contact] { position:relative }
.guide-chapters a[aria-current="location"] {color:var(--paper);text-decoration:underline;text-decoration-color:var(--pink);text-decoration-thickness:2px}
main :target {scroll-margin-block-start:18px}

@media (prefers-reduced-motion:no-preference) and (forced-colors:none) {
  html:dir(rtl) { --ink-side:-1;--ink-start:100% }
  .guide-ink:not(.ink-still,.film-active) .guide-opening-copy > p {
    animation:guide-unfold .32s ease-out both;
  }
  .guide-ink:not(.ink-still,.film-active) .guide-opening h1 {
    animation:guide-title-register .52s cubic-bezier(.17,.74,.23,1) both;
  }
  .guide-ink.guide-new-language:not(.ink-still,.film-active) .guide-opening h1 {
    animation:guide-language-print .52s cubic-bezier(.22,.72,.31,1) both;
  }
  .guide-ink.guide-new-language:dir(rtl):not(.ink-still,.film-active) .guide-opening h1 {animation-name:guide-language-print-rtl}
  .guide-ink:not(.ink-still,.film-active) .guide-light-pass {
    display:block;position:absolute;inset:0;z-index:2;pointer-events:none;
    background:linear-gradient(106deg,transparent 36%,#ffb46f12 46%,#fff0bd42 50%,#ffe49b10 53%,transparent 62%);
    animation:guide-light-pass .95s cubic-bezier(.22,.68,.35,1) both;
  }
  .guide-ink:not(.ink-still,.film-active) .guide-ink-arrived {
    position:relative;animation:guide-section-settle .46s cubic-bezier(.18,.76,.3,1) both;
  }
  .guide-ink:not(.ink-still,.film-active) .guide-ink-arrived::before {
    content:"";pointer-events:none;position:absolute;bottom:-.17em;inset-inline-start:0;
    width:min(4.1em,60%);height:2px;background:linear-gradient(90deg,var(--pink),var(--ice),transparent);
    transform-origin:var(--ink-start,0) center;animation:guide-rule .64s ease-out both;
  }
  .guide-ink:not(.ink-still,.film-active) details[open]>:not(summary,script,video,.action-bolt) {
    animation:guide-unfold .24s ease-out both;
  }
  .guide-ink:not(.ink-still,.film-active) .action-bolt {
    display:block;position:absolute;z-index:4;pointer-events:none;
    inset-inline-end:1px;top:50%;width:clamp(24px,52%,86px);height:clamp(13px,58%,29px);
    transform:translateY(-48%) scaleX(var(--ink-side,1));overflow:visible;
    color:var(--contact-ink,var(--pink));filter:drop-shadow(0 0 2px currentColor);
  }
  .guide-ink .action-bolt path {
    fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;
    vector-effect:non-scaling-stroke;stroke-dasharray:1.02 1.14;
    animation:guide-electricity var(--bolt-life) linear both;
  }
  .guide-ink .action-bolt .arc-hot {stroke-width:3}
  .guide-ink .action-bolt .arc-core {stroke:#fff4d8;stroke-width:1.1;animation-delay:22ms}
  .guide-ink .action-bolt .arc-fork {stroke-width:1.5;animation-delay:34ms}
  .guide-ink .action-bolt .arc-tip {stroke-width:1.2;animation-delay:48ms}
}
@keyframes guide-title-register {
  from {transform:translateX(calc(-6px * var(--ink-side,1)));text-shadow:3px 0 #f549645e,-2px 0 #8adace52}
  to {transform:none;text-shadow:0 0 transparent}
}
@keyframes guide-language-print {
  from {clip-path:inset(-.12em 100% -.12em 0);text-shadow:2px 0 var(--pink)}
  to {clip-path:inset(-.12em 0 -.12em 0);text-shadow:0 0 transparent}
}
@keyframes guide-language-print-rtl {
  from {clip-path:inset(-.12em 0 -.12em 100%);text-shadow:-2px 0 var(--pink)}
  to {clip-path:inset(-.12em 0 -.12em 0);text-shadow:0 0 transparent}
}
@keyframes guide-light-pass {
  0% {transform:translateX(-90%);opacity:0}
  16% {opacity:.95}
  84% {opacity:.85}
  100% {transform:translateX(90%);opacity:0}
}
@keyframes guide-section-settle { from {transform:translateY(5px)} to {transform:none} }
@keyframes guide-rule {
  0% {transform:scaleX(.04);opacity:0}
  24% {opacity:1}
  74% {transform:scaleX(1);opacity:.85}
  100% {transform:scaleX(1);opacity:0}
}
@keyframes guide-unfold { from {opacity:.72;translate:0 -3px} to {opacity:1;translate:0 0} }
@keyframes guide-electricity {
  0% {stroke-dashoffset:1;opacity:0}
  21% {stroke-dashoffset:0;opacity:1}
  60% {stroke-dashoffset:0;opacity:.92}
  100% {stroke-dashoffset:-1.06;opacity:0}
}
@media print { #guide-motion-toggle,.action-bolt,.guide-light-pass {display:none!important} }
